1#include "screen/status.h"
11 lv_event_code_t code = lv_event_get_code(e);
12 lv_obj_t *obj = lv_event_get_current_target(e);
14 if (code == LV_EVENT_VALUE_CHANGED) {
15 lv_calendar_date_t date;
16 if (lv_calendar_get_pressed_date(obj, &date)) {
17 LV_LOG_USER(
"Clicked date: %02d.%02d.%d", date.day, date.month, date.year);
22status_screen::status_screen() {}
26void status_screen::status() {
27 lv_obj_t *calendar = lv_calendar_create(lv_scr_act());
28 lv_obj_set_size(calendar, 185, 230);
29 lv_obj_align(calendar, LV_ALIGN_CENTER, 0, 27);
32 lv_calendar_set_today_date(calendar, 2021, 02, 23);
33 lv_calendar_set_showed_date(calendar, 2021, 02);
36 static lv_calendar_date_t highlighted_days[3];
38 highlighted_days[0].year = 2021;
39 highlighted_days[0].month = 02;
40 highlighted_days[0].day = 6;
42 highlighted_days[1].year = 2021;
43 highlighted_days[1].month = 02;
44 highlighted_days[1].day = 11;
46 highlighted_days[2].year = 2022;
47 highlighted_days[2].month = 02;
48 highlighted_days[2].day = 22;
50 lv_calendar_set_highlighted_dates(calendar, highlighted_days, 3);
52#if LV_USE_CALENDAR_HEADER_DROPDOWN
53 lv_calendar_header_dropdown_create(calendar);
54#elif LV_USE_CALENDAR_HEADER_ARROW
55 lv_calendar_header_arrow_create(calendar);
Contains the declaration of the Drivetrain class.
static void slider_event_cb(lv_event_t *e)