mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2025-05-02 14:46:16 -04:00
Added battery state reporting over USB/Serial/Bluetooth. Implements #39.
This commit is contained in:
parent
e4245c6177
commit
6d26997fa4
4 changed files with 24 additions and 1 deletions
10
Utilities.h
10
Utilities.h
|
@ -755,6 +755,16 @@ void kiss_indicate_phy_stats() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void kiss_indicate_battery() {
|
||||
#if MCU_VARIANT == MCU_ESP32
|
||||
serial_write(FEND);
|
||||
serial_write(CMD_STAT_BAT);
|
||||
escaped_serial_write(battery_state);
|
||||
escaped_serial_write((uint8_t)int(battery_percent));
|
||||
serial_write(FEND);
|
||||
#endif
|
||||
}
|
||||
|
||||
void kiss_indicate_btpin() {
|
||||
#if HAS_BLUETOOTH
|
||||
serial_write(FEND);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue