Showing battery percentage instead of icon?

I entered the code "CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y" into my lily58.conf file but the display is still showing the battery icon instead of the percentage. Any help would be much appreciated!
6 Replies
TyperAI
TyperAI4w ago
It sounds like you're on the right track with the configuration. However, make sure that you have also enabled the battery widget in your configuration file. You should have the following lines in your lily58.conf:
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
After making these changes, ensure you rebuild your firmware and flash it to your nice!nano. If the issue persists, double-check that there are no conflicting settings in your configuration that might override the battery display settings. If you've confirmed all of this and it still doesn't work, please let me know, and we can troubleshoot further!
dodo628
dodo628OP4w ago
Adding the line CONFIG_ZMK_WIDGET_BATTERY_STATUS=y results in an error
PurpleTaro
PurpleTaro4w ago
What's the error message coming back?
dodo628
dodo628OP4w ago
@PurpleTaro I think the relevant part of the log is the following:
/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(peripheral_status.c.obj):/__w/lily58-wireless-view-zmk-config/lily58-wireless-view-zmk-config/zmk/app/boards/shields/nice_view/widgets/peripheral_status.c:82: multiple definition of `widget_battery_status_mutex'; app/libapp.a(battery_status.c.obj):/__w/lily58-wireless-view-zmk-config/lily58-wireless-view-zmk-config/zmk/app/src/display/widgets/battery_status.c:76: first defined here
/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/libzephyr.a(peripheral_status.c.obj):/__w/lily58-wireless-view-zmk-config/lily58-wireless-view-zmk-config/zmk/app/boards/shields/nice_view/widgets/peripheral_status.c:82: multiple definition of `widget_battery_status_mutex'; app/libapp.a(battery_status.c.obj):/__w/lily58-wireless-view-zmk-config/lily58-wireless-view-zmk-config/zmk/app/src/display/widgets/battery_status.c:76: first defined here
There are also similar statements for widget_battery_status_work and zmk_event_sub_widget_battery_statuszmk_usb_conn_state_changed and zmk_listener_widget_battery_status and zmk_event_sub_widget_battery_statuszmk_battery_state_changed
PurpleTaro
PurpleTaro4w ago
Gotcha, i have no idea, but am curious so will have a poke when i get some clear air Ah, found this old thread: https://discord.com/channels/924164891990978570/924170569543483424/1132451125438726174 So it looks like it's a config option that's for an older status display. I haven't mentally worked through the code yet, but quickly built using the older display status screen (ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN) and the other font settings and getting a result.
dodo628
dodo628OP4w ago
Ah, thank you so much for digging that out for me!

Did you find this page helpful?