Skip to content

fix: honor CONFIG_NICE_OLED_WIDGET_WPM_LUNA_ANIMATION_MS and WPM_BONGO_CAT_ANIMATION_MS - #34

Open
delneet wants to merge 1 commit into
mctechnology17:mainfrom
delneet:fix/wpm-animation-ms
Open

delneet wants to merge 1 commit into
mctechnology17:mainfrom
delneet:fix/wpm-animation-ms

Conversation

@delneet

@delneet delneet commented Jul 3, 2026

Copy link
Copy Markdown

Problem

CONFIG_NICE_OLED_WIDGET_WPM_LUNA_ANIMATION_MS and CONFIG_NICE_OLED_WIDGET_WPM_BONGO_CAT_ANIMATION_MS exist in Kconfig and are documented in docs/OPTIMIZE.md as the CPU tuning knob for these animations, but neither widget reads them: luna.c and bongo_cat.c use hardcoded cycle times (200 ms for walk/run — ~10 redraws/s while typing fast).

Change

  • luna.c: all states derive from the Kconfig value; idle runs at 3x the base so the sitting dog stays calm (default 300 → idle 900 ms, close to the previous 960 ms).
  • bongo_cat.c: the fast state (the one that dominates CPU while typing) uses the Kconfig value; idle/slow/mid keep their existing slow timings.

Note — effective default changes from the hardcoded 200 ms to the Kconfig default of 300 ms (slightly slower, cheaper). Users can restore the old feel with ..._ANIMATION_MS=200.

luna.c falls back to 300 ms when the symbol is undefined, since the option only exists on the central but the file is also compiled for NICE_OLED_WIDGET_ANIMATION_PERIPHERAL_WPM. (Unrelated: that peripheral config currently fails to link on ZMK v0.3.0 because ZMK_WPM needs keycode events that don't exist on the peripheral — pre-existing, reproduced with unmodified main.)

Verification

Built against ZMK v0.3.0 (nice_nano_v2): default config (Bongo Cat) and a Luna config with ..._LUNA_ANIMATION_MS=400; the value lands in .config and builds are clean.

…ANIMATION_MS are now honored

Both options are documented in docs/OPTIMIZE.md as the CPU tuning knob
for the WPM animations, but luna.c and bongo_cat.c used hardcoded cycle
times (200ms walk/run). Luna now derives all states from the Kconfig
value (idle runs at 3x the base), Bongo Cat uses it for the fast state.
Note: this changes the effective default from 200ms to the Kconfig
default of 300ms. Peripheral builds with ANIMATION_PERIPHERAL_WPM fall
back to 300ms since the symbol only exists on central.
@delneet
delneet marked this pull request as ready for review July 3, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant