Add charging indication to battery event

This commit is contained in:
ReFil 2024-03-21 14:35:59 +00:00
parent ef20c7f473
commit ba810177d5

View file

@ -12,6 +12,7 @@
struct zmk_battery_state_changed { struct zmk_battery_state_changed {
// TODO: Other battery channels // TODO: Other battery channels
uint8_t state_of_charge; uint8_t state_of_charge;
bool charging;
}; };
ZMK_EVENT_DECLARE(zmk_battery_state_changed); ZMK_EVENT_DECLARE(zmk_battery_state_changed);
@ -19,6 +20,7 @@ ZMK_EVENT_DECLARE(zmk_battery_state_changed);
struct zmk_peripheral_battery_state_changed { struct zmk_peripheral_battery_state_changed {
uint8_t source; uint8_t source;
// TODO: Other battery channels // TODO: Other battery channels
// Charging state not broadcast over BAS so no need to have it in peripheral event
uint8_t state_of_charge; uint8_t state_of_charge;
}; };