ZUNO_SETUP_BATTERY_LEVELS()
By default Z-Uno automatically maps battery voltage from 2.7V–3.0V to 0%–100% by measuring the voltage on the 3V3 pin. But some batteries might require different mapping. In thace case one can define the correct mapping.
ZUNO_SETUP_BATTERY_LEVELS(min, max)
min
value corresponding to empty battery (0%) in mV, WORD
max
value corresponding to full battery (100%) in mV, WORD
Battery is reported only if device is configured as sleeping (ZUNO_SLEEPING_MODE_SLEEPING or ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE).
Ignored if ZUNO_SETUP_BATTERY_HANDLER() is specified.
ZUNO_SETUP_BATTERY_LEVELS(2700, 3300);
ZUNO_SETUP_BATTERY_HANDLER