You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add LMIC_setBatteryLevel() (and LMIC_getBatteryLevel()) in header file (note slightly different name to os_getBattLevel()
add a private LMIC field to hold the recorded value
change LMIC initializations to initialize the default value of the private field to 0xFF (the value that indicates that the battery level is not known). Client is required to call LMIC_setBatteryLevel() after a re-initialization. I'm avoiding the question of "what happens at LMIC_reset()", because it's used internally as well as externally -- sorting that out requires some analysis.
change os_getBattLevel() so that it returns the private field. (The change to LMIC initialization ensures that behavior is unchanged for existing applications.)
update the documentation
Footprint impact of this would be minimal -- a byte of RAM and a few bytes of code for init and the change to os_getBattLevel().
The text was updated successfully, but these errors were encountered:
Per @altishchenko in #560, we need a way to provide proper data for battery level in the DeviceStatusAns message.
The proposed approach (from here):
LMIC_setBatteryLevel()
(andLMIC_getBatteryLevel()
) in header file (note slightly different name toos_getBattLevel()
LMIC_setBatteryLevel()
after a re-initialization. I'm avoiding the question of "what happens atLMIC_reset()
", because it's used internally as well as externally -- sorting that out requires some analysis.os_getBattLevel()
so that it returns the private field. (The change to LMIC initialization ensures that behavior is unchanged for existing applications.)Footprint impact of this would be minimal -- a byte of RAM and a few bytes of code for init and the change to
os_getBattLevel()
.The text was updated successfully, but these errors were encountered: