mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2025-05-04 07:34:49 -04:00
Improve BLE serial performance + add BLE battery display
This commit is contained in:
parent
c9fd5f7d3b
commit
7f787d5910
4 changed files with 31 additions and 0 deletions
10
Power.h
10
Power.h
|
@ -273,6 +273,16 @@ void measure_battery() {
|
|||
if (battery_percent >= 98) {
|
||||
battery_state = BATTERY_STATE_CHARGED;
|
||||
}
|
||||
|
||||
#if HAS_BLE
|
||||
if ((bt_state == BT_STATE_ON) || bt_state == BT_STATE_CONNECTED) {
|
||||
if (battery_state != BATTERY_STATE_CHARGING) {
|
||||
blebas.write(battery_percent);
|
||||
} else {
|
||||
blebas.write(100);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (battery_ready) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue