Fix logic for rak12035 sensor default config and improve messaging #9414
+24
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🙏 Thank you for sending in a pull request, here's some tips to get started!
bug ##9410
fixed and tested..
logs (also in bug report)...
... a sensor that is precalibrated
INFO | ??:??:?? 13 Dry calibration value is 505
INFO | ??:??:?? 13 Wet calibration value is 382
...
... a sensor that is not precalibrated
INFO | ??:??:?? 5 Init sensor: RAK12035
INFO | ??:??:?? 5 RAK12035Sensor Init Succeed
Sensor Firmware version: 2, Sensor Name: RAK12035
INFO | ??:??:?? 7 Dry calibration not set, using default: 510
INFO | ??:??:?? 7 Wet calibration not set, using default: 390
INFO | ??:??:?? 7 Consider running the calibration sketch to improve accuracy.You can recalibrate this sensor using the calibration sketch included here: https://github.com/RAK
INFO | ??:??:?? 7 Dry calibration value: 510, Wet calibration value: 390
INFO | ??:??:?? 7 Opened RAK12035 sensor on i2c bus
...
... showing that it is reading after default calibration values set
.. probe out of water snippet
INFO | 19:02:59 89 [EnvironmentTelemetry] Send: barometric_pressure=0.000000, current=0.000000, gas_resistance=0.000000, relative_humidity=0.000000, temperature=0.000000
INFO | 19:02:59 89 [EnvironmentTelemetry] Send: voltage=0.000000, IAQ=0, distance=0.000000, lux=0.000000
INFO | 19:02:59 89 [EnvironmentTelemetry] Send: wind speed=0.000000m/s, direction=0 degrees, weight=0.000000kg
INFO | 19:02:59 89 [EnvironmentTelemetry] Send: radiation=0.000000##R/h
INFO | 19:02:59 89 [EnvironmentTelemetry] Send: soil_temperature=17.700001, soil_moisture=0
..
.. probe in water snippet
INFO | 19:59:12 123 Tell client we have new packets 11
INFO | 19:59:12 123 BLE notify fromNum
DEBUG | 19:59:12 123 FromRadio=STATE_SEND_PACKETS
DEBUG | 19:59:12 123 phone downloaded packet (id=0x175c392b fr=0xf5032f44 to=0xffffffff, transport = 0, WantAck=0, HopLim=6 Ch=0x0 Portnum=67 rxtime=1769198352 priority=10)
INFO | 19:59:44 155 [EnvironmentTelemetry] Send: barometric_pressure=0.000000, current=0.000000, gas_resistance=0.000000, relative_humidity=0.000000, temperature=0.000000
INFO | 19:59:44 155 [EnvironmentTelemetry] Send: voltage=0.000000, IAQ=0, distance=0.000000, lux=0.000000
INFO | 19:59:44 155 [EnvironmentTelemetry] Send: wind speed=0.000000m/s, direction=0 degrees, weight=0.000000kg
INFO | 19:59:44 155 [EnvironmentTelemetry] Send: radiation=0.000000##R/h
INFO | 19:59:44 155 [EnvironmentTelemetry] Send: soil_temperature=17.500000, soil_moisture=64
DEBUG | 19:59:44 155 [EnvironmentTelemetry] Partially randomized packet id 2420827436
INFO | 19:59:44 155 [EnvironmentTelemetry] Send packet to mesh
..
...
(not sure why my sensor is reading temp in Celsius atm.. not too worried about it.)
No GPS fix in this branch, isolated to other branch so no GPS icon in SS.
🤝 Attestations