mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-02-04 08:55:24 -05:00
Report battery percentage over BLE battery service
This commit is contained in:
parent
9473b9df82
commit
6bbcaa0ba9
4
Power.h
4
Power.h
@ -232,6 +232,10 @@ void measure_battery() {
|
||||
}
|
||||
}
|
||||
|
||||
#if MCU_VARIANT == MCU_NRF52
|
||||
if (bt_state != BT_STATE_OFF) { blebas.write(battery_percent); }
|
||||
#endif
|
||||
|
||||
// if (bt_state == BT_STATE_CONNECTED) {
|
||||
// SerialBT.printf("Bus voltage %.3fv. Unfiltered %.3fv.", battery_voltage, bat_v_samples[BAT_SAMPLES-1]);
|
||||
// if (bat_voltage_dropping) { SerialBT.printf(" Voltage is dropping. Percentage %.1f%%.", battery_percent); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user