little bit of cleanup and recompile/upload/test on RAK WISBLAOCK STACK: RAK19007/RAK4631/RAK12035VB/RAK12500

looks like soil monitor is working correctly, new environmental metrics are comming thru [new protos soil_moisture, soil_temperature] and GPS is working again with the RAK 12500.

improvements could be made around the configuration of the monitor.

next steps include updating the client(s) to react to, log and display the new proto metrics for soil temp and humidity.
This commit is contained in:
Justin E. Mann 2025-05-05 12:05:25 -06:00
parent 0a3f27bf5b
commit 440f3fd47f
3 changed files with 7 additions and 7 deletions

View File

@ -94,11 +94,11 @@ SHTC3Sensor shtc3Sensor;
NullSensor shtc3Sensor;
#endif
#if __has_include(<RAK12035Sensor.h>) && defined(RAK4630)
#if __has_include(<RAK12035_SoilMoisture.h>) && defined(RAK_4631)
#include "Sensor/RAK12035Sensor.h"
RAK12035Sensor rak12035Sensor;
#else
NullSensor shtc3Sensor;
NullSensor rak12035Sensor;
#endif
#if __has_include(<Adafruit_VEML7700.h>)
@ -279,7 +279,7 @@ int32_t EnvironmentTelemetryModule::runOnce()
result = rak9154Sensor.runOnce();
#endif
#ifdef RAK4630
#if __has_include("RAK12035_SoilMoisture.h") && defined(RAK_4631)
if (rak12035Sensor.hasSensor()) {
result = rak12035Sensor.runOnce();
}
@ -613,7 +613,7 @@ bool EnvironmentTelemetryModule::getEnvironmentTelemetry(meshtastic_Telemetry *m
valid = valid && rak9154Sensor.getMetrics(m);
hasSensor = true;
#endif
#ifdef RAK4630
#if __has_include(<RAK12035_SoilMoisture.h>) && defined(RAK_4631) // Not really needed, but may as well just skip at a lower level it if no library or not a RAK_4631
if (rak12035Sensor.hasSensor()) {
valid = valid && rak12035Sensor.getMetrics(m);
hasSensor = true;
@ -834,7 +834,7 @@ AdminMessageHandleResult EnvironmentTelemetryModule::handleAdminMessageForModule
if (result != AdminMessageHandleResult::NOT_HANDLED)
return result;
}
#ifdef RAK4630
#if __has_include(<RAK12035_SoilMoisture.h>) && defined(RAK_4631) // Not really needed, but may as well just skip it at a lower level if no library or not a RAK_4631
if (rak12035Sensor.hasSensor()) {
result = rak12035Sensor.handleAdminMessage(mp, request, response);
if (result != AdminMessageHandleResult::NOT_HANDLED)

View File

@ -1,5 +1,5 @@
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(RAK4630)
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include("RAK12035_SoilMoisture.h") && defined(RAK_4631)
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "RAK12035Sensor.h"

View File

@ -2,7 +2,7 @@
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && defined(RAK4630)
#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR && __has_include(<RAK12035_SoilMoisture.h>) && defined(RAK_4631)
#ifndef _MT_RAK12035VBSENSOR_H
#define _MT_RAK12035VBSENSOR_H
#endif