From ad9bc53807e95771c7a43ea7e9159ae964089e6f Mon Sep 17 00:00:00 2001 From: "Justin E. Mann" Date: Mon, 5 May 2025 21:08:37 -0600 Subject: [PATCH] cleanup after a few experiments --- .../Telemetry/Sensor/RAK12035Sensor.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/modules/Telemetry/Sensor/RAK12035Sensor.cpp b/src/modules/Telemetry/Sensor/RAK12035Sensor.cpp index aa31dc2cd..6f263e57c 100644 --- a/src/modules/Telemetry/Sensor/RAK12035Sensor.cpp +++ b/src/modules/Telemetry/Sensor/RAK12035Sensor.cpp @@ -14,20 +14,20 @@ int32_t RAK12035Sensor::runOnce() { return DEFAULT_SENSOR_MINIMUM_WAIT_TIME_BETWEEN_READS; } - sensor.set_sensor_addr(RAK120351_ADDR); - delay(500); - sensor.begin(nodeTelemetrySensorsMap[sensorType].first); // TODO:: check for up to 2 additional sensors and start them if present. + sensor.set_sensor_addr(RAK120351_ADDR); + delay(100); + sensor.begin(nodeTelemetrySensorsMap[sensorType].first); // Get sensor firmware version uint8_t data = 0; sensor.get_sensor_version(&data); - LOG_INFO("Sensor Firmware version: %i", data); + LOG_INFO("Sensor1 Firmware version: %i", data); if (data != 0) { - LOG_DEBUG("RAK12035Sensor Init Succeed"); + LOG_INFO("RAK12035Sensor Init Succeed"); status = true; } else @@ -55,25 +55,25 @@ void RAK12035Sensor::setup() delay(200); if (zero_val == 0 || zero_val <= hundred_val) { - LOG_ERROR("Dry calibration value is %d", zero_val); - LOG_ERROR("Wet calibration value is %d", hundred_val); - LOG_ERROR("This does not make sense. Youc can recalibrate this sensor using the calibration sketch included here: " - "https://github.com/RAKWireless/RAK12035_SoilMoisture."); - LOG_ERROR("For now, setting default calibration value for Dry Calibration: %d", default_zero_val); + LOG_INFO("Dry calibration value is %d", zero_val); + LOG_INFO("Wet calibration value is %d", hundred_val); + LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: " + "https://github.com/RAKWireless/RAK12035_SoilMoisture."); + LOG_INFO("For now, setting default calibration value for Dry Calibration: %d", default_zero_val); sensor.set_dry_cal(default_zero_val); sensor.get_dry_cal(&zero_val); - LOG_ERROR("Dry calibration reset complete. New value is %d", zero_val); + LOG_INFO("Dry calibration reset complete. New value is %d", zero_val); } if (hundred_val == 0 || hundred_val >= zero_val) { - LOG_ERROR("Dry calibration value is %d", zero_val); - LOG_ERROR("Wet calibration value is %d", hundred_val); - LOG_ERROR("This does not make sense. Youc can recalibrate this sensor using the calibration sketch included here: " - "https://github.com/RAKWireless/RAK12035_SoilMoisture."); - LOG_ERROR("For now, setting default calibration value for Wet Calibration: %d", default_hundred_val); + LOG_INFO("Dry calibration value is %d", zero_val); + LOG_INFO("Wet calibration value is %d", hundred_val); + LOG_INFO("This does not make sense. You can recalibrate this sensor using the calibration sketch included here: " + "https://github.com/RAKWireless/RAK12035_SoilMoisture."); + LOG_INFO("For now, setting default calibration value for Wet Calibration: %d", default_hundred_val); sensor.set_wet_cal(default_hundred_val); sensor.get_wet_cal(&hundred_val); - LOG_ERROR("Wet calibration reset complete. New value is %d", hundred_val); + LOG_INFO("Wet calibration reset complete. New value is %d", hundred_val); } sensor.sensor_sleep(); delay(200);