Skip to content

Commit 04c581f

Browse files
committed
[WIP] config: Adapt latest LVGL changes
1 parent dd3cfa5 commit 04c581f

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

config/app/behaviors/behavior_lvgl_key_press.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
1414
#include <zmk/behavior.h>
1515
#include <drivers/behavior/lvgl_key_press.h>
1616

17-
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
17+
#if 0
1818

1919
#define LVKP_MSGQ_COUNT 10
2020
K_MSGQ_DEFINE(lvkp_msgq, sizeof(lv_indev_data_t), LVKP_MSGQ_COUNT, 4);

config/app/behaviors/behavior_mouse_wheel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static int behavior_mouse_wheel_init(const struct device *dev)
3939
return 0;
4040
};
4141

42-
DEVICE_DT_INST_DEFINE(0, behavior_mouse_wheel_init, NULL, NULL, NULL, APPLICATION,
42+
DEVICE_DT_INST_DEFINE(0, behavior_mouse_wheel_init, NULL, NULL, NULL, POST_KERNEL,
4343
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &behavior_mouse_wheel_driver_api);
4444

4545
#endif /* DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT) */

config/boards/helloword/hw75_dynamic/app/screen/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
55
select LV_USE_LABEL
6-
select LV_USE_BTN
6+
select LV_USE_BUTTON
77
select LV_USE_LIST
88
select LV_USE_FLEX
99
select LV_USE_PAGE

config/boards/helloword/hw75_dynamic/app/screen/layer_status.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
2020

2121
#define DISPLAY_NODE DT_CHOSEN(zephyr_display)
2222

23-
#define SCREEN_W DT_PROP(DISPLAY_NODE, width)
24-
#define SCREEN_H DT_PROP(DISPLAY_NODE, height)
23+
#define SCREEN_W DT_PROP(DISPLAY_NODE, width)
24+
#define SCREEN_H DT_PROP(DISPLAY_NODE, height)
2525
#define ITEM_SIZE MIN(SCREEN_W, SCREEN_H)
2626

2727
#define KEYMAP_NODE DT_INST(0, zmk_keymap)
2828

2929
#define LAYER_CHILD_LEN(node) 1 +
30-
#define KEYMAP_LAYERS_NUM (DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_CHILD_LEN) 0)
30+
#define KEYMAP_LAYERS_NUM (DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_CHILD_LEN) 0)
3131

3232
#define LAYER_LABEL(node) \
3333
COND_CODE_0(DT_NODE_HAS_PROP(node, label), (NULL), (DT_PROP(node, label))),
@@ -37,8 +37,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
3737
LV_FONT_DECLARE(mono_19);
3838
LV_FONT_DECLARE(zfull_9);
3939

40-
static const char *layer_names[KEYMAP_LAYERS_NUM] = { DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_LABEL) };
41-
static const char layer_icons[KEYMAP_LAYERS_NUM][4] = { DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_ICON) };
40+
static const char *layer_names[KEYMAP_LAYERS_NUM] = {DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_LABEL)};
41+
static const char layer_icons[KEYMAP_LAYERS_NUM][4] = {DT_FOREACH_CHILD(KEYMAP_NODE, LAYER_ICON)};
4242

4343
static lv_obj_t *layer_name;
4444
static lv_obj_t *layer_list;
@@ -67,7 +67,7 @@ static void layer_status_update_cb(struct layer_status_state state)
6767
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh)
6868
{
6969
uint8_t index = zmk_keymap_highest_layer_active();
70-
return (struct layer_status_state){ .index = index };
70+
return (struct layer_status_state){.index = index};
7171
}
7272

7373
ZMK_DISPLAY_WIDGET_LISTENER(layer_status_subscribtion, struct layer_status_state,
@@ -77,10 +77,10 @@ ZMK_SUBSCRIPTION(layer_status_subscribtion, zmk_layer_state_changed);
7777

7878
static void layer_button_selected(lv_event_t *event)
7979
{
80-
int layer_id = (int)event->user_data;
81-
if (layer_id != zmk_keymap_highest_layer_active()) {
82-
zmk_keymap_layer_to((uint8_t)layer_id);
83-
}
80+
// int layer_id = (int)event->user_data;
81+
// if (layer_id != zmk_keymap_highest_layer_active()) {
82+
// zmk_keymap_layer_to((uint8_t)layer_id);
83+
// }
8484
}
8585

8686
int layer_status_init(lv_obj_t *parent, lv_group_t *group)

config/boards/helloword/hw75_dynamic/app/screen/status_screen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ lv_obj_t *zmk_display_status_screen()
2222
knob_status_init(screen);
2323
knob_indicator_init(screen);
2424

25-
lv_indev_t *indev = behavior_lvgl_get_indev();
26-
lv_indev_set_group(indev, group);
25+
// lv_indev_t *indev = behavior_lvgl_get_indev();
26+
// lv_indev_set_group(indev, group);
2727

2828
return screen;
2929
}

config/boards/helloword/hw75_dynamic/app/uart_comm/handler/handler_fn_state.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ bool handle_fn_state(const uart_comm_MessageK2D *k2d)
1515

1616
if (report->pressed) {
1717
current_layer = zmk_keymap_highest_layer_active();
18-
zmk_keymap_layer_to(1);
18+
// zmk_keymap_layer_to(1);
1919
} else {
20-
zmk_keymap_layer_to(current_layer);
20+
// zmk_keymap_layer_to(current_layer);
2121
}
2222

2323
return true;

0 commit comments

Comments
 (0)