meetjestad / mjs_firmware

8 stars 4 forks source link

MJS2020: Skip SPS30 and GPS when battery is low (and related improvements) #22

Closed matthijskooijman closed 3 years ago

matthijskooijman commented 3 years ago

This PR contains some work based on improvements by @Peter-dM, but split into multiple commits and with some additional changes from my side.

The primary change that motivated this PR is the last commit, which ensures that when the battery voltage becomes low, the SPS30 and GPS readouts are skipped, limiting the readings to only the more low-power sensors. For nodes that run on solar, this should ensure that even in bad solar conditions, the node will never completely run out of battery.

There are a number of other changes making the battery and solar readouts a bit more consistent. Additionally, there is a commit that compresses the transmission of extra fields by not transmitting leading zero bits.