This shows you the differences between two versions of the page.
|
si:laboratoare:2025:05 [2025/11/03 07:58] cosmin.chenaru [Exercitii] |
si:laboratoare:2025:05 [2025/11/03 19:31] (current) cosmin.chenaru cb_night_mode_event_handler |
||
|---|---|---|---|
| Line 122: | Line 122: | ||
| <code> | <code> | ||
| /tools/configure.sh -l hacktorwatch:lvgl | /tools/configure.sh -l hacktorwatch:lvgl | ||
| - | cp hacktorwatch_main.c.txt nuttx-apps/hacktorwatch-rev2/main/hacktorwatch_main.c | + | cp ~/Downloads/hacktorwatch_main.c.txt nuttx-apps/hacktorwatch-rev2/main/hacktorwatch_main.c |
| + | cd nuttx | ||
| make flash ESPTOOL_PORT=/dev/ttyACM0 ESPTOOL_BAUD=115200 ESPTOOL_BINDIR=../esp32s3-bins -j$(nproc) | make flash ESPTOOL_PORT=/dev/ttyACM0 ESPTOOL_BAUD=115200 ESPTOOL_BINDIR=../esp32s3-bins -j$(nproc) | ||
| </code> | </code> | ||
| Line 160: | Line 161: | ||
| lv_obj_add_state(cb_night_mode, 0); | lv_obj_add_state(cb_night_mode, 0); | ||
| lv_obj_align(cb_night_mode, LV_ALIGN_LEFT_MID, 0, -30); | lv_obj_align(cb_night_mode, LV_ALIGN_LEFT_MID, 0, -30); | ||
| - | + lv_obj_add_event_cb(cb_night_mode, NULL, LV_EVENT_ALL, NULL); | + | + lv_obj_add_event_cb(cb_night_mode, cb_night_mode_event_handler, LV_EVENT_ALL, NULL); |
| </code> | </code> | ||