From a73cab1e6524f9d35156b3b15c157ab83c2eac42 Mon Sep 17 00:00:00 2001 From: Darryldh Date: Thu, 5 Aug 2021 19:46:19 -0400 Subject: [PATCH] Update battery_state_changed.h New channels added to struct. --- .../zmk/events/battery_state_changed.h | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/app/include/zmk/events/battery_state_changed.h b/app/include/zmk/events/battery_state_changed.h index 6a003d8d..3f84760a 100644 --- a/app/include/zmk/events/battery_state_changed.h +++ b/app/include/zmk/events/battery_state_changed.h @@ -10,8 +10,40 @@ #include struct zmk_battery_state_changed { - // TODO: Other battery channels + + /* Remaining capacity as a %age */ uint8_t state_of_charge; + + /* State of Health */ + int16_t state_of_health; + + /* Current cell voltage in units of 1.25/16mV */ + uint32_t voltage; + + /* Average current in units of 1.5625uV / Rsense */ + uint32_t current; + + /* Standby current in mA? uA? */ + int32_t current_standby; + + /* Maximum Load Current in mA? uA? */ + int32_t current_max_load; + + /* Full charge capacity in 5/Rsense uA */ + int32_t full_charge_capacity; + + /* Remaining capacity in 5/Rsense uA */ + int32_t remaining_charge_capacity; + + int32_t nominal_available_capacity; + + int32_t full_available_capacity; + + /* Average power consumption in mA? uA? */ + int32_t avg_power; + + /* Internal temperature in units of 1/256 degrees C */ + int32_t int_temp; }; ZMK_EVENT_DECLARE(zmk_battery_state_changed); \ No newline at end of file