diff options
| author | Ally Parker <ally.parker@red-gate.com> | 2021-01-22 16:23:21 +0000 |
|---|---|---|
| committer | Pete Johanson <peter@peterjohanson.com> | 2021-01-23 18:38:31 -0500 |
| commit | a4aaa73f06939417a911c5213480efe78aa70fab (patch) | |
| tree | ca38fa9f6dff26cdc8563f47008322370f2e448d /app/src/display/status_screen.c | |
| parent | c0cab57c2d4d1fd4a7db4e7d6edda7bdc6549619 (diff) | |
feat: Add WPM calculator and display widget
Diffstat (limited to 'app/src/display/status_screen.c')
| -rw-r--r-- | app/src/display/status_screen.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/src/display/status_screen.c b/app/src/display/status_screen.c index 0c88717..6f32b28 100644 --- a/app/src/display/status_screen.c +++ b/app/src/display/status_screen.c @@ -7,6 +7,7 @@ #include <zmk/display/widgets/output_status.h> #include <zmk/display/widgets/battery_status.h> #include <zmk/display/widgets/layer_status.h> +#include <zmk/display/widgets/wpm_status.h> #include <zmk/display/status_screen.h> #include <logging/log.h> @@ -24,6 +25,10 @@ static struct zmk_widget_output_status output_status_widget; static struct zmk_widget_layer_status layer_status_widget; #endif +#if IS_ENABLED(CONFIG_ZMK_WIDGET_WPM_STATUS) +static struct zmk_widget_wpm_status wpm_status_widget; +#endif + lv_obj_t *zmk_display_status_screen() { lv_obj_t *screen; @@ -47,5 +52,10 @@ lv_obj_t *zmk_display_status_screen() { 0, 0); #endif +#if IS_ENABLED(CONFIG_ZMK_WIDGET_WPM_STATUS) + zmk_widget_wpm_status_init(&wpm_status_widget, screen); + lv_obj_align(zmk_widget_wpm_status_obj(&wpm_status_widget), NULL, LV_ALIGN_IN_BOTTOM_RIGHT, -12, + 0); +#endif return screen; } |
