Use zmk_battery_state_of_charge
in battery widgets
This commit is contained in:
parent
a593c7260a
commit
39825fee6c
4 changed files with 4 additions and 4 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) */
|
||||
|
|
|
@ -64,7 +64,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) */
|
||||
|
|
Loading…
Add table
Reference in a new issue