fix: Use zmk_battery_state_of_charge
in battery widgets
This commit is contained in:
parent
b3146e665e
commit
6f8d080b6a
3 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ void battery_status_update_cb(struct battery_status_state state) {
|
|||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
return (struct battery_status_state) {
|
||||
.level = bt_bas_get_battery_level(),
|
||||
.level = zmk_battery_state_of_charge(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
|
|
@ -71,7 +71,7 @@ static void battery_status_update_cb(struct battery_status_state state) {
|
|||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
return (struct battery_status_state) {
|
||||
.level = bt_bas_get_battery_level(),
|
||||
.level = zmk_battery_state_of_charge(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
|
|
@ -211,7 +211,7 @@ static void battery_status_update_cb(struct battery_status_state state) {
|
|||
|
||||
static struct battery_status_state battery_status_get_state(const zmk_event_t *eh) {
|
||||
return (struct battery_status_state) {
|
||||
.level = bt_bas_get_battery_level(),
|
||||
.level = zmk_battery_state_of_charge(),
|
||||
#if IS_ENABLED(CONFIG_USB_DEVICE_STACK)
|
||||
.usb_present = zmk_usb_is_powered(),
|
||||
#endif /* IS_ENABLED(CONFIG_USB_DEVICE_STACK) */
|
||||
|
|
Loading…
Add table
Reference in a new issue