Pushing updates done to the LVGL emulator project files
This commit is contained in:
parent
beb7a86af1
commit
fe94e2b896
@ -58,9 +58,7 @@
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="compass_screen.h" />
|
||||
<Unit filename="hour_hand.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="firmware_version.h" />
|
||||
<Unit filename="lv_conf.h" />
|
||||
<Unit filename="lv_drivers/display/ILI9341.h" />
|
||||
<Unit filename="lv_drivers/display/R61581.h" />
|
||||
@ -1651,13 +1649,7 @@
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="menu_screen.h" />
|
||||
<Unit filename="minute_hand.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="rsrc/hour_hand.png" />
|
||||
<Unit filename="second_hand.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="settings_screen.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
@ -1669,9 +1661,6 @@
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="watch_face.h" />
|
||||
<Unit filename="watch_img.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
<Unit filename="watch_mask.c">
|
||||
<Option compilerVar="CC" />
|
||||
</Unit>
|
||||
|
@ -2,9 +2,480 @@
|
||||
<CodeBlocks_layout_file>
|
||||
<FileVersion major="1" minor="0" />
|
||||
<ActiveTarget name="Debug" />
|
||||
<File name="watch_menu_icons.c" open="1" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<File name="lvgl\src\core\lv_obj_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="869291" topLine="15" />
|
||||
<Cursor1 position="29532" topLine="612" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1135" topLine="14" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7126" topLine="230" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win_drv.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="585" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\spinbox\lv_spinbox.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4262" topLine="120" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_pos.c" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10562" topLine="336" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_assets.c" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="143" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9059" topLine="238" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\list\lv_list.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="721" topLine="16" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="menu_screen.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3627" topLine="67" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="138" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1282774" topLine="472" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1299" topLine="36" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="615" topLine="25" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1969" topLine="47" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="firmware_version.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="160" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_indev_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="14405" topLine="323" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1028" topLine="30" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\examples\widgets\menu\lv_example_menu_5.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7631" topLine="141" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\roller\lv_roller.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="715" topLine="26" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7842" topLine="283" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\examples\widgets\bar\lv_example_bar_6.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="181" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5230" topLine="191" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_timer.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="635" topLine="36" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5517" topLine="93" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2184" topLine="61" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3097" topLine="74" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2129" topLine="53" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_screen.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1253" topLine="18" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_face.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="702" zoom_1="-1" zoom_2="-1">
|
||||
<Cursor>
|
||||
<Cursor1 position="649" topLine="389" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3034" topLine="107" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="456" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1234" topLine="139" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10782" topLine="316" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_timer.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5053" topLine="144" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2082" topLine="62" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\indev\keyboard.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="440" topLine="14" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\menu\lv_menu.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3321" topLine="109" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drv_conf.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6602" topLine="208" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="common_screen_components.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="498" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3835" topLine="68" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings_screen.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="527" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\img\lv_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1863" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_refr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2447" topLine="75" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5535" topLine="120" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_casio_assets.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3791697" topLine="77" />
|
||||
</Cursor>
|
||||
<Folding>
|
||||
<Collapse line="8" />
|
||||
<Collapse line="994" />
|
||||
<Collapse line="1386" />
|
||||
<Collapse line="1915" />
|
||||
<Collapse line="2436" />
|
||||
<Collapse line="2584" />
|
||||
<Collapse line="2752" />
|
||||
<Collapse line="2969" />
|
||||
<Collapse line="3186" />
|
||||
<Collapse line="3403" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1988" topLine="67" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\lv_demo_widgets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2825" topLine="122" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8074" topLine="159" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_screen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6172" topLine="154" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_area.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1789" topLine="74" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7273" topLine="217" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1563" topLine="27" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_class.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1857" topLine="35" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11123" topLine="327" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="menu_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="48" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win32drv\win32drv.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="524" topLine="954" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5065" topLine="123" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5784" topLine="170" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\display\monitor.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="289" topLine="31" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13638" topLine="409" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\lv_api_map.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="722" topLine="32" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6210" topLine="113" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="common_screen_components.h" open="1" top="1" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="215" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_montserrat_30.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="869" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1457" topLine="45" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\menu\lv_menu.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3706" topLine="117" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\lv_drv_conf_template.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10670" topLine="390" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings_screen.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4139" topLine="82" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_indev.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3566" topLine="102" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_log.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2557" topLine="68" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\label\lv_label.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5648" topLine="194" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="950" topLine="43" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_montserrat_12.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="22" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_fmt_txt.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="24" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1509" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="15" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_class.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3011" topLine="100" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12839" topLine="10" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\chart\lv_chart.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11658" topLine="336" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="823" topLine="24" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4439" topLine="123" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\tileview\lv_tileview.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1055" topLine="40" />
|
||||
</Cursor>
|
||||
<Folding>
|
||||
<Collapse line="8" />
|
||||
<Collapse line="995" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="19855" topLine="604" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_face.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="713" topLine="33" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen_assets.c" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="96342" topLine="161" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_color.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8562" topLine="290" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="56" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\list\lv_list.c" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2391" topLine="74" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="539" topLine="9" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12525" topLine="363" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_menu_icons.c" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="869291" topLine="156" />
|
||||
</Cursor>
|
||||
<Folding>
|
||||
<Collapse line="2" />
|
||||
@ -27,472 +498,14 @@
|
||||
<Collapse line="1729" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3034" topLine="107" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\lv_demo_widgets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2825" topLine="122" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\layouts\grid\lv_grid.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="579" topLine="17" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drv_conf.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6602" topLine="208" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="9059" topLine="238" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\spinbox\lv_spinbox.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4262" topLine="120" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_screen.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1253" topLine="18" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_color.h" open="1" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="23421" topLine="672" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_face.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="989" topLine="7" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2082" topLine="62" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12525" topLine="363" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5065" topLine="123" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1085" topLine="33" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1563" topLine="27" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_log.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2557" topLine="68" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1969" topLine="47" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="29009" topLine="605" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7612" topLine="142" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings_screen.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="860" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\indev\keyboard.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="440" topLine="14" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_indev.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3566" topLine="102" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_class.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1857" topLine="35" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="menu_screen.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="48" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\roller\lv_roller.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="715" topLine="26" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2184" topLine="61" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="615" topLine="25" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="12839" topLine="10" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="56" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_face.c" open="1" top="0" tabpos="10" split="0" active="1" splitpos="702" zoom_1="-1" zoom_2="-1">
|
||||
<Cursor>
|
||||
<Cursor1 position="11059" topLine="283" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="settings_screen.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5236" topLine="296" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\lv_api_map.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="722" topLine="32" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win_drv.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="585" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="138" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen.h" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1028" topLine="30" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7126" topLine="230" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="minute_hand.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="52426" topLine="414" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_area.h" open="1" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7684" topLine="259" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\list\lv_list.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="402" topLine="16" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen_assets.c" open="1" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="96342" topLine="161" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\menu\lv_menu.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3706" topLine="117" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\examples\widgets\bar\lv_example_bar_6.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="181" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="950" topLine="43" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6968" topLine="201" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\display\monitor.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="289" topLine="31" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\img\lv_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1863" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\tileview\lv_tileview.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1055" topLine="40" />
|
||||
</Cursor>
|
||||
<Folding>
|
||||
<Collapse line="8" />
|
||||
<Collapse line="995" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="539" topLine="9" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="altimeter_screen.c" open="1" top="1" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="13638" topLine="384" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_fmt_txt.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="24" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_img.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="4150889" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="menu_screen.c" open="1" top="0" tabpos="17" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5011" topLine="119" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5230" topLine="191" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\lv_drv_conf_template.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10670" topLine="390" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_scroll.h" open="1" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="8706" topLine="203" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3097" topLine="74" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1234" topLine="39" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_screen.c" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6172" topLine="154" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_montserrat_12.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="22" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6907" topLine="258" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_class.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3011" topLine="100" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="common_screen_components.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="229" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_pos.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7730" topLine="167" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1299" topLine="24" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1282774" topLine="472" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="823" topLine="24" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_refr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2447" topLine="75" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="18315" topLine="576" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="6210" topLine="113" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font_montserrat_30.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="869" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\chart\lv_chart.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11658" topLine="336" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\hal\lv_hal_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="11123" topLine="327" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_font.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5535" topLine="120" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="2129" topLine="53" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="15" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="5784" topLine="170" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7842" topLine="283" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="compass_assets.c" open="1" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="0" topLine="143" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7273" topLine="217" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1509" topLine="59" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_indev_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="14405" topLine="323" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="watch_casio_assets.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3451942" topLine="1065" />
|
||||
</Cursor>
|
||||
<Folding>
|
||||
<Collapse line="8" />
|
||||
<Collapse line="995" />
|
||||
</Folding>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="838" topLine="27" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="main.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1457" topLine="45" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\menu\lv_menu.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3321" topLine="109" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\widgets\list\lv_list.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1261" topLine="45" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="456" topLine="6" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="1135" topLine="14" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\examples\widgets\menu\lv_example_menu_5.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="7631" topLine="141" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="common_screen_components.c" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="757" topLine="0" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\core\lv_obj_pos.c" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="10562" topLine="336" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lvgl\src\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="3835" topLine="68" />
|
||||
</Cursor>
|
||||
</File>
|
||||
<File name="lv_drivers\win32drv\win32drv.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||
<Cursor>
|
||||
<Cursor1 position="524" topLine="954" />
|
||||
</Cursor>
|
||||
</File>
|
||||
</CodeBlocks_layout_file>
|
||||
|
@ -1,7 +1,37 @@
|
||||
#include "lvgl.h"
|
||||
|
||||
/***
|
||||
* It is needed to have a reference on two header_titles because when
|
||||
* switching from one screen using a header to an other screen which is also using one
|
||||
* the header of the new screen will be created BEFORE the header of the previous screen
|
||||
* is deleted ...
|
||||
*/
|
||||
|
||||
/* A reference to the current and previous header title */
|
||||
static lv_obj_t *header_title[2] = {NULL, NULL};
|
||||
/* Pointer to the header_title to use */
|
||||
lv_obj_t **header_title_p = &header_title[0];
|
||||
|
||||
|
||||
static void cleanup_event_cb(lv_event_t * e)
|
||||
{
|
||||
lv_obj_t **header_title_deleted_p = e->user_data;
|
||||
*header_title_deleted_p = NULL;
|
||||
LV_LOG_USER("header_title cleanup");
|
||||
}
|
||||
|
||||
void common_screen_header_component(lv_obj_t *parent, const char * title, lv_coord_t height)
|
||||
{
|
||||
if(header_title[0] == NULL)
|
||||
header_title_p = &header_title[0];
|
||||
else if(header_title[1] == NULL)
|
||||
header_title_p = &header_title[1];
|
||||
else
|
||||
{
|
||||
LV_LOG_ERROR("no free header_title");
|
||||
return;
|
||||
}
|
||||
|
||||
lv_obj_t *header = lv_obj_create(parent);
|
||||
lv_obj_set_style_bg_color(header, lv_color_make(129, 141,181), LV_PART_MAIN);
|
||||
lv_obj_set_size(header, lv_disp_get_hor_res(NULL), height);
|
||||
@ -9,9 +39,20 @@ void common_screen_header_component(lv_obj_t *parent, const char * title, lv_coo
|
||||
lv_obj_set_style_border_width(header, 0, LV_PART_MAIN);
|
||||
lv_obj_clear_flag(header, LV_OBJ_FLAG_SCROLLABLE);
|
||||
|
||||
lv_obj_t *header_title = lv_label_create(header);
|
||||
lv_label_set_text_static(header_title, title);
|
||||
lv_obj_set_style_text_color(header_title, lv_color_white(), LV_PART_MAIN);
|
||||
lv_obj_set_style_text_font(header_title, &lv_font_montserrat_30, LV_PART_MAIN);
|
||||
lv_obj_set_align(header_title, LV_ALIGN_CENTER);
|
||||
*header_title_p = lv_label_create(header);
|
||||
lv_label_set_text_static(*header_title_p, title);
|
||||
lv_obj_set_style_text_align(*header_title_p, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
|
||||
lv_obj_set_style_text_color(*header_title_p, lv_color_white(), LV_PART_MAIN);
|
||||
lv_obj_set_style_text_font(*header_title_p, &lv_font_montserrat_30, LV_PART_MAIN);
|
||||
lv_obj_set_width(*header_title_p, 150);
|
||||
lv_obj_set_align(*header_title_p, LV_ALIGN_CENTER);
|
||||
lv_label_set_long_mode(*header_title_p, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
/* Once the current header_title is destroyed, mark it as NULL to prevent any crashes when trying to change it's title */
|
||||
lv_obj_add_event_cb(*header_title_p, &(cleanup_event_cb), LV_EVENT_DELETE, header_title_p);
|
||||
}
|
||||
|
||||
void common_screen_header_update_title(const char * title)
|
||||
{
|
||||
if(!*header_title_p)return;
|
||||
lv_label_set_text_static(*header_title_p, title);
|
||||
}
|
||||
|
@ -3,6 +3,20 @@
|
||||
|
||||
#include "lvgl.h"
|
||||
|
||||
/**
|
||||
* @brief Adds a screen header with the defined title to the screen passed as parent with the provided height.
|
||||
*
|
||||
* @param parent the screen to which the header will be added
|
||||
* @param title a string used as the header's title
|
||||
* @param height the height in pixel of the header
|
||||
*/
|
||||
void common_screen_header_component(lv_obj_t *parent, const char * title, lv_coord_t height);
|
||||
|
||||
/**
|
||||
* @brief Updates the current title of displayed screen header
|
||||
*
|
||||
* @param title a string used as the new header's title
|
||||
*/
|
||||
void common_screen_header_update_title(const char * title);
|
||||
|
||||
#endif //COMMON_SCREEN_COMPONENTS_H
|
||||
|
@ -106,6 +106,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi
|
||||
|
||||
lv_scr_load(watchFace.display);
|
||||
|
||||
watch_face_set_step_count(&watchFace, 10258);
|
||||
|
||||
|
||||
//settings_screen();
|
||||
//watch_face();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
@ -2,16 +2,23 @@
|
||||
#include "common_screen_components.h"
|
||||
#include "settings_screen.h"
|
||||
#include "menu_screen.h"
|
||||
#include "firmware_version.h"
|
||||
|
||||
static const char *day_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31";
|
||||
static const char *month_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12";
|
||||
static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30";
|
||||
static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40";
|
||||
static const char *hour_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23";
|
||||
static const char *second_minute_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59";
|
||||
static const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
|
||||
|
||||
static const char *timeout_options = "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60";
|
||||
static const char *orientation_format = "Default\n90°\n180°\n270°";
|
||||
static const char *timeout_options = "Off\n5 seconds\n10 seconds\n15 seconds\n20 seconds\n25 seconds\n30 seconds\n35 seconds\n40 seconds\n45 seconds\n50 seconds\n55 seconds\n60 seconds";
|
||||
static const char *orientation_format = "Default\n90<EFBFBD>\n180<EFBFBD>\n270<EFBFBD>";
|
||||
static const char* vibration_duration = "None\n100 ms\n150 ms\n200 ms\n250 ms\n300 ms\n350 ms\n400 ms";
|
||||
static const char* vibration_force = "1\n2\n3\n4\n5\n6\n7\n8";
|
||||
|
||||
static const char* language_options = "Francais\nDeutsch\nEnglish";
|
||||
|
||||
static void _simulate_side_screen_item_click(SettingsScreen_t * const settingsScreen, lv_obj_t *item);
|
||||
|
||||
static void gesture_event_cb(lv_event_t * e)
|
||||
{
|
||||
@ -25,6 +32,8 @@ static void gesture_event_cb(lv_event_t * e)
|
||||
break;
|
||||
case LV_DIR_RIGHT:
|
||||
LV_LOG_USER("GESTURE : RIGHT");
|
||||
// We delete the timer if it was created
|
||||
if(settingsScreen->about_refresh_timer)lv_timer_del(settingsScreen->about_refresh_timer);
|
||||
// We create the menu screen and switch to it
|
||||
extern MenuScreen_t menuScreen;
|
||||
menu_screen_create(&menuScreen);
|
||||
@ -41,18 +50,36 @@ static void gesture_event_cb(lv_event_t * e)
|
||||
}
|
||||
}
|
||||
|
||||
static void cleanup_event_cb(lv_event_t * e)
|
||||
static void cleanup_event_cb(lv_event_t *e)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
settings_screen_destroy(settingsScreen);
|
||||
LV_LOG_USER("cleanup");
|
||||
}
|
||||
|
||||
static void time_roller_cb(lv_event_t * e)
|
||||
static void time_roller_cb(lv_event_t *e)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
}
|
||||
|
||||
static void time_format_cb(lv_event_t * e)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
|
||||
if(e->target == settingsScreen->checkbox_time_12H)
|
||||
{
|
||||
lv_obj_clear_state(settingsScreen->checkbox_time_24H, LV_STATE_CHECKED);
|
||||
lv_obj_clear_flag(settingsScreen->checkbox_time_12H, LV_OBJ_FLAG_CHECKABLE);
|
||||
lv_obj_add_flag(settingsScreen->checkbox_time_24H, LV_OBJ_FLAG_CHECKABLE);
|
||||
}
|
||||
else if(e->target == settingsScreen->checkbox_time_24H)
|
||||
{
|
||||
lv_obj_clear_state(settingsScreen->checkbox_time_12H, LV_STATE_CHECKED);
|
||||
lv_obj_clear_flag(settingsScreen->checkbox_time_24H, LV_OBJ_FLAG_CHECKABLE);
|
||||
lv_obj_add_flag(settingsScreen->checkbox_time_12H, LV_OBJ_FLAG_CHECKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
static void brightness_slider_cb(lv_event_t * e)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
@ -68,40 +95,354 @@ static void orientation_dropdown_cb(lv_event_t * e)
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
}
|
||||
|
||||
static lv_obj_t* add_sidebar_entry_to_menu(lv_obj_t *parent, const char *title, lv_obj_t *menu, lv_obj_t *pageToShow)
|
||||
static void ble_activation_switch_cb(lv_event_t *e)
|
||||
{
|
||||
lv_obj_t *container = lv_menu_cont_create(parent);
|
||||
lv_obj_t *label = lv_label_create(container);
|
||||
lv_label_set_text_static(label, title);
|
||||
lv_obj_set_style_text_color(label, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
lv_obj_set_flex_grow(label, 1);
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
|
||||
lv_menu_set_load_page_event(menu, label, pageToShow);
|
||||
|
||||
return label;
|
||||
if(lv_obj_has_state(e->target, LV_STATE_CHECKED))
|
||||
{
|
||||
LV_LOG_USER("BLE is on");
|
||||
}
|
||||
else
|
||||
{
|
||||
LV_LOG_USER("BLE is off");
|
||||
}
|
||||
}
|
||||
|
||||
static lv_obj_t* create_menu_page_section(lv_obj_t *menu_page)
|
||||
static void language_dropdown_cb(lv_event_t *e)
|
||||
{
|
||||
lv_obj_t *section = lv_menu_section_create(menu_page);
|
||||
lv_obj_set_style_pad_bottom(section, 50, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_top(section, 5, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(section, 5, LV_PART_MAIN);
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
|
||||
return section;
|
||||
lv_obj_t *dropdown = lv_event_get_target(e);
|
||||
uint8_t language = lv_dropdown_get_selected(dropdown);
|
||||
|
||||
switch(language)
|
||||
{
|
||||
case 0:
|
||||
common_screen_header_update_title("Parametres");
|
||||
break;
|
||||
case 1:
|
||||
common_screen_header_update_title("Settings");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static lv_obj_t* create_section_container(lv_obj_t *section)
|
||||
static void factory_reset_cb(lv_event_t *e)
|
||||
{
|
||||
lv_obj_t *container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
lv_obj_clear_flag(container, LV_OBJ_FLAG_SCROLLABLE);
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
static void about_refresh_timer_cb(lv_timer_t *timer)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = timer->user_data;
|
||||
|
||||
lv_label_set_text_static(settingsScreen->currentTime.current_time_label, settingsScreen->currentTime.current_time_text);
|
||||
}
|
||||
|
||||
static lv_obj_t *add_menu_list_item(lv_obj_t *list, const char *text, lv_event_cb_t event_cb, void *user_data)
|
||||
{
|
||||
lv_obj_t *btn = lv_list_add_btn(list, NULL, text);
|
||||
lv_obj_t *label = lv_obj_get_child(btn, 0);
|
||||
if(label)
|
||||
{
|
||||
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_set_style_pad_right(btn, 0, LV_PART_MAIN);
|
||||
}
|
||||
|
||||
lv_obj_add_event_cb(btn, event_cb, LV_EVENT_CLICKED, user_data);
|
||||
return btn;
|
||||
}
|
||||
|
||||
static void load_time_and_date_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Set Time & Date :");
|
||||
|
||||
lv_obj_t *toggle = lv_switch_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(toggle, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
|
||||
lv_label_set_text_static(label, "Automatic");
|
||||
lv_obj_align_to(label, toggle, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Time :");
|
||||
lv_obj_align_to(label, toggle, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
settingsScreen->hour_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
settingsScreen->minute_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
settingsScreen->second_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->hour_roller, hour_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->hour_roller, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_visible_row_count(settingsScreen->hour_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->hour_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->minute_roller, second_minute_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->minute_roller, settingsScreen->hour_roller, LV_ALIGN_OUT_RIGHT_TOP, 5, 0);
|
||||
lv_roller_set_visible_row_count(settingsScreen->minute_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->minute_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->second_roller, second_minute_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->second_roller, settingsScreen->minute_roller, LV_ALIGN_OUT_RIGHT_TOP, 5, 0);
|
||||
lv_roller_set_visible_row_count(settingsScreen->second_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->second_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Time Format :");
|
||||
lv_obj_align_to(label, settingsScreen->hour_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
settingsScreen->checkbox_time_12H = lv_checkbox_create(settingsScreen->side_screen);
|
||||
lv_checkbox_set_text(settingsScreen->checkbox_time_12H, "12H");
|
||||
lv_obj_set_style_radius(settingsScreen->checkbox_time_12H, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
lv_obj_align_to(settingsScreen->checkbox_time_12H, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_obj_add_event_cb(settingsScreen->checkbox_time_12H, &(time_format_cb), LV_EVENT_CLICKED, settingsScreen);
|
||||
|
||||
settingsScreen->checkbox_time_24H = lv_checkbox_create(settingsScreen->side_screen);
|
||||
lv_checkbox_set_text(settingsScreen->checkbox_time_24H, "24H");
|
||||
lv_obj_add_state(settingsScreen->checkbox_time_24H, LV_STATE_CHECKED);
|
||||
lv_obj_set_style_radius(settingsScreen->checkbox_time_24H, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
lv_obj_align_to(settingsScreen->checkbox_time_24H, settingsScreen->checkbox_time_12H, LV_ALIGN_OUT_RIGHT_TOP, 10, 0);
|
||||
lv_obj_add_event_cb(settingsScreen->checkbox_time_24H, &(time_format_cb), LV_EVENT_CLICKED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Date :");
|
||||
lv_obj_align_to(label, settingsScreen->checkbox_time_12H, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
settingsScreen->day_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
settingsScreen->month_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
settingsScreen->year_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->day_roller, day_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->day_roller, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_visible_row_count(settingsScreen->day_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->day_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->month_roller, month_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->month_roller, settingsScreen->day_roller, LV_ALIGN_OUT_RIGHT_TOP, 5, 0);
|
||||
lv_roller_set_visible_row_count(settingsScreen->month_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->month_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->year_roller, year_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_obj_align_to(settingsScreen->year_roller, settingsScreen->month_roller, LV_ALIGN_OUT_RIGHT_TOP, 5, 0);
|
||||
lv_roller_set_visible_row_count(settingsScreen->year_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->year_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Date Format :");
|
||||
lv_obj_align_to(label, settingsScreen->day_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
lv_obj_t *date_dropdown = lv_dropdown_create(settingsScreen->side_screen);
|
||||
lv_dropdown_set_options_static(date_dropdown, date_format);
|
||||
lv_obj_align_to(date_dropdown, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
}
|
||||
|
||||
static void load_display_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Brightness :");
|
||||
|
||||
lv_obj_t *slider = lv_slider_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(slider, label, LV_ALIGN_OUT_BOTTOM_LEFT, 10, 10);
|
||||
lv_obj_clear_flag(slider, LV_OBJ_FLAG_GESTURE_BUBBLE);
|
||||
lv_obj_set_width(slider, lv_pct(90));
|
||||
lv_obj_add_event_cb(slider, &(brightness_slider_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Display Off After :");
|
||||
lv_obj_align_to(label, slider, LV_ALIGN_OUT_BOTTOM_LEFT, -10, 10);
|
||||
|
||||
lv_obj_t *timeout_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(timeout_roller, label, LV_ALIGN_OUT_BOTTOM_LEFT, 10, 10);
|
||||
lv_roller_set_options(timeout_roller, timeout_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(timeout_roller, 2);
|
||||
lv_obj_add_event_cb(timeout_roller, &(timeout_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Screen Orientation :");
|
||||
lv_obj_align_to(label, timeout_roller, LV_ALIGN_OUT_BOTTOM_LEFT, -10, 10);
|
||||
|
||||
lv_obj_t *orientation_dropdown = lv_dropdown_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(orientation_dropdown, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_dropdown_set_options_static(orientation_dropdown, orientation_format);
|
||||
lv_obj_add_event_cb(orientation_dropdown, &(orientation_dropdown_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Wakeup :");
|
||||
lv_obj_align_to(label, orientation_dropdown, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
lv_obj_t *wrist_tilt_toggle = lv_switch_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(wrist_tilt_toggle, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Wrist Tilt");
|
||||
lv_obj_align_to(label, wrist_tilt_toggle, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Vibrate On Touch :");
|
||||
lv_obj_align_to(label, wrist_tilt_toggle, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
lv_obj_t *on_touch_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(on_touch_vibration_duration_roller, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_options(on_touch_vibration_duration_roller, vibration_duration, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(on_touch_vibration_duration_roller, 2);
|
||||
//lv_obj_add_event_cb(vibration_duration_roller, &(vibration_duration_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Duration");
|
||||
lv_obj_align_to(label, on_touch_vibration_duration_roller, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
|
||||
lv_obj_t *on_touch_vibration_strength_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(on_touch_vibration_strength_roller, on_touch_vibration_duration_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_options(on_touch_vibration_strength_roller, vibration_force, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(on_touch_vibration_strength_roller, 2);
|
||||
lv_obj_set_width(on_touch_vibration_strength_roller, lv_obj_get_width(on_touch_vibration_duration_roller));
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Strength");
|
||||
lv_obj_align_to(label, on_touch_vibration_strength_roller, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
}
|
||||
|
||||
static void load_notifications_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Vibrate on\nnotifications :");
|
||||
|
||||
lv_obj_t *on_touch_vibration_duration_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(on_touch_vibration_duration_roller, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_options(on_touch_vibration_duration_roller, vibration_duration, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(on_touch_vibration_duration_roller, 2);
|
||||
//lv_obj_add_event_cb(vibration_duration_roller, &(vibration_duration_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Duration");
|
||||
lv_obj_align_to(label, on_touch_vibration_duration_roller, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
|
||||
lv_obj_t *on_touch_vibration_force_roller = lv_roller_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(on_touch_vibration_force_roller, on_touch_vibration_duration_roller, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_roller_set_options(on_touch_vibration_force_roller, vibration_force, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(on_touch_vibration_force_roller, 2);
|
||||
lv_obj_set_width(on_touch_vibration_force_roller, lv_obj_get_width(on_touch_vibration_duration_roller));
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Force");
|
||||
lv_obj_align_to(label, on_touch_vibration_force_roller, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
}
|
||||
|
||||
static void load_connectivity_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Connectivity :");
|
||||
|
||||
lv_obj_t *ble_switch = lv_switch_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(ble_switch, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_obj_add_event_cb(ble_switch, &(ble_activation_switch_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Bluetooth");
|
||||
lv_obj_align_to(label, ble_switch, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Device Name :");
|
||||
lv_obj_align_to(label, ble_switch, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
lv_obj_t *dev_name_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(dev_name_label, "W800SW");
|
||||
lv_obj_set_style_text_color(dev_name_label, lv_color_make(130, 130, 130), LV_PART_MAIN);
|
||||
lv_obj_align_to(dev_name_label, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
|
||||
lv_obj_t *wifi_switch = lv_switch_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(wifi_switch, dev_name_label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "WiFi");
|
||||
lv_obj_align_to(label, wifi_switch, LV_ALIGN_OUT_RIGHT_MID, 10, 0);
|
||||
}
|
||||
|
||||
static void load_language_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Language :");
|
||||
|
||||
lv_obj_t *language_dropdown = lv_dropdown_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(language_dropdown, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
lv_dropdown_set_options_static(language_dropdown, language_options);
|
||||
lv_obj_add_event_cb(language_dropdown, &(language_dropdown_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
}
|
||||
|
||||
static void load_about_side_screen(SettingsScreen_t *settingsScreen)
|
||||
{
|
||||
lv_obj_clean(settingsScreen->side_screen);
|
||||
|
||||
lv_obj_t *label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "System Info :");
|
||||
|
||||
lv_obj_t *firmware_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(firmware_label, "Firmware :");
|
||||
lv_obj_align_to(firmware_label, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 10);
|
||||
|
||||
lv_obj_t *version_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(version_label, FIRMWARE_VERSION);
|
||||
lv_obj_set_style_text_color(version_label, lv_color_make(130, 130, 130), LV_PART_MAIN);
|
||||
lv_obj_align_to(version_label, firmware_label, LV_ALIGN_OUT_RIGHT_MID, 7, 0);
|
||||
|
||||
lv_obj_t* compile_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(compile_label, "Compile date :");
|
||||
lv_obj_align_to(compile_label, firmware_label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
lv_obj_t* compile_date_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(compile_date_label, FIRMWARE_TIME_DATE);
|
||||
lv_obj_set_style_text_color(compile_date_label, lv_color_make(130, 130, 130), LV_PART_MAIN);
|
||||
lv_obj_align_to(compile_date_label, compile_label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
lv_obj_t* rtc_time = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(rtc_time, "RTC :");
|
||||
lv_obj_align_to(rtc_time, compile_date_label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
/* Display current time and date with refresh */
|
||||
settingsScreen->currentTime.current_time_label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(settingsScreen->currentTime.current_time_label, "XX:XX:XX XX/XX/XXXX");
|
||||
lv_obj_set_style_text_color(settingsScreen->currentTime.current_time_label, lv_color_make(130, 130, 130), LV_PART_MAIN);
|
||||
lv_obj_align_to(settingsScreen->currentTime.current_time_label, rtc_time, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
label = lv_label_create(settingsScreen->side_screen);
|
||||
lv_label_set_text_static(label, "Factory Reset :");
|
||||
lv_obj_align_to(label, settingsScreen->currentTime.current_time_label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5);
|
||||
|
||||
lv_obj_t *factory_rst_btn = lv_btn_create(settingsScreen->side_screen);
|
||||
lv_obj_align_to(factory_rst_btn, label, LV_ALIGN_OUT_BOTTOM_MID, 0, 5);
|
||||
lv_obj_add_event_cb(factory_rst_btn, NULL, LV_EVENT_CLICKED, settingsScreen);
|
||||
|
||||
label = lv_label_create(factory_rst_btn);
|
||||
lv_label_set_text_static(label, "Reset");
|
||||
lv_obj_center(label);
|
||||
|
||||
/* Create and start the refresh timer */
|
||||
if(settingsScreen->about_refresh_timer)
|
||||
{
|
||||
LV_LOG_ERROR("about_refresh_timer should be NULL here !");
|
||||
lv_timer_del(settingsScreen->about_refresh_timer);
|
||||
settingsScreen->about_refresh_timer = NULL;
|
||||
}
|
||||
settingsScreen->about_refresh_timer = lv_timer_create(&(about_refresh_timer_cb), 1000, settingsScreen);
|
||||
}
|
||||
|
||||
static void menu_list_item_event_handler(lv_event_t * e)
|
||||
{
|
||||
SettingsScreen_t *settingsScreen = e->user_data;
|
||||
_simulate_side_screen_item_click(settingsScreen, e->target);
|
||||
}
|
||||
|
||||
void settings_screen_init(SettingsScreen_t * const settingsScreen)
|
||||
@ -149,169 +490,41 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
|
||||
//We add the screen header
|
||||
common_screen_header_component(settingsScreen->display, "Settings", 50);
|
||||
|
||||
//We create the menu
|
||||
lv_obj_t *menu = lv_menu_create(settingsScreen->display);
|
||||
lv_obj_set_size(menu, lv_pct(100), 240 - 50);
|
||||
lv_obj_set_pos(menu, 0, 50);
|
||||
//We create the menu list on the left hand side
|
||||
lv_obj_t *menu_list = lv_list_create(settingsScreen->display);
|
||||
lv_obj_set_size(menu_list, 75,190);
|
||||
lv_obj_set_pos(menu_list, 0, 50);
|
||||
lv_obj_set_style_radius(menu_list, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(menu_list, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_right(menu_list, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(menu_list, 7, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_bottom(menu_list, 50, LV_PART_MAIN);
|
||||
|
||||
//We create the menu page for the time and date settings
|
||||
lv_obj_t *menu_page_1 = lv_menu_page_create(menu, NULL);
|
||||
//We add the side screen containing the settings
|
||||
settingsScreen->side_screen = lv_obj_create(settingsScreen->display);
|
||||
lv_obj_set_size(settingsScreen->side_screen, 165,190);
|
||||
lv_obj_set_pos(settingsScreen->side_screen, 75, 50);
|
||||
lv_obj_set_style_radius(settingsScreen->side_screen, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(settingsScreen->side_screen, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(settingsScreen->side_screen, 5, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_bottom(settingsScreen->side_screen, 70, LV_PART_MAIN);
|
||||
lv_obj_set_scroll_dir(settingsScreen->side_screen, LV_DIR_VER);
|
||||
|
||||
lv_obj_t *section = create_menu_page_section(menu_page_1);
|
||||
|
||||
lv_obj_t *menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Set Time & Date :");
|
||||
|
||||
lv_obj_t *container = create_section_container(section);
|
||||
lv_obj_t *toggle = lv_switch_create(container);
|
||||
lv_obj_t *toggle_label = lv_label_create(container);
|
||||
lv_label_set_text_static(toggle_label, "Automatic");
|
||||
lv_obj_set_style_pad_top(toggle_label, 5, LV_PART_MAIN);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Time :");
|
||||
container = create_section_container(section);
|
||||
|
||||
/*container = lv_obj_create(section);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
lv_obj_clear_flag(container, LV_OBJ_FLAG_SCROLLABLE);
|
||||
|
||||
lv_obj_t *arc = lv_arc_create(container);
|
||||
lv_obj_center(arc);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_INDICATOR);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_MAIN);
|
||||
|
||||
arc = lv_arc_create(container);
|
||||
lv_obj_set_size(arc, 100, 100);
|
||||
lv_obj_center(arc);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_INDICATOR);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_MAIN);
|
||||
|
||||
arc = lv_arc_create(container);
|
||||
lv_obj_set_size(arc, 70, 70);
|
||||
lv_obj_center(arc);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_INDICATOR);
|
||||
lv_obj_set_style_arc_width(arc, 1, LV_PART_MAIN);*/
|
||||
|
||||
settingsScreen->hour_roller = lv_roller_create(container);
|
||||
settingsScreen->minute_roller = lv_roller_create(container);
|
||||
settingsScreen->second_roller = lv_roller_create(container);
|
||||
|
||||
lv_roller_set_options(settingsScreen->hour_roller, hour_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->hour_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->hour_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->minute_roller, second_minute_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->minute_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->minute_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->second_roller, second_minute_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->second_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->second_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Time Format :");
|
||||
container = create_section_container(section);
|
||||
|
||||
lv_obj_t *checkbox_12 = lv_checkbox_create(container), *checkbox_24 = lv_checkbox_create(container);
|
||||
lv_checkbox_set_text(checkbox_12, "12H");
|
||||
lv_obj_set_style_radius(checkbox_12, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
lv_checkbox_set_text(checkbox_24, "24H");
|
||||
lv_obj_add_state(checkbox_24, LV_STATE_CHECKED);
|
||||
lv_obj_set_style_radius(checkbox_24, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Date :");
|
||||
container = create_section_container(section);
|
||||
|
||||
settingsScreen->day_roller = lv_roller_create(container);
|
||||
settingsScreen->month_roller = lv_roller_create(container);
|
||||
settingsScreen->year_roller = lv_roller_create(container);
|
||||
|
||||
lv_roller_set_options(settingsScreen->day_roller, day_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->day_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->day_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->month_roller, month_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->month_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->month_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_roller_set_options(settingsScreen->year_roller, year_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(settingsScreen->year_roller, 2);
|
||||
lv_obj_add_event_cb(settingsScreen->year_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Date Format :");
|
||||
container = create_section_container(section);
|
||||
|
||||
lv_obj_t *date_dropdown = lv_dropdown_create(container);
|
||||
lv_dropdown_set_options_static(date_dropdown, date_format);
|
||||
|
||||
//We create the menu page for the display settings
|
||||
lv_obj_t *menu_page_2 = lv_menu_page_create(menu, NULL);
|
||||
|
||||
section = create_menu_page_section(menu_page_2);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Brightness :");
|
||||
container = create_section_container(section);
|
||||
|
||||
lv_obj_t *slider = lv_slider_create(container);
|
||||
lv_obj_clear_flag(slider, LV_OBJ_FLAG_GESTURE_BUBBLE);
|
||||
lv_obj_set_width(slider, lv_pct(90));
|
||||
lv_obj_set_align(slider, LV_ALIGN_CENTER);
|
||||
lv_obj_add_event_cb(slider, &(brightness_slider_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Sleep Timeout :");
|
||||
container = create_section_container(section);
|
||||
|
||||
lv_obj_t *timeout = lv_roller_create(container);
|
||||
lv_roller_set_options(timeout, timeout_options, LV_ROLLER_MODE_NORMAL);
|
||||
lv_roller_set_visible_row_count(timeout, 2);
|
||||
lv_obj_add_event_cb(timeout, &(timeout_roller_cb), LV_EVENT_RELEASED, settingsScreen);
|
||||
|
||||
lv_obj_t *timeout_label = lv_label_create(container);
|
||||
lv_label_set_text_static(timeout_label, "Second(s)");
|
||||
lv_obj_set_style_pad_top(timeout_label, 25, LV_PART_MAIN);
|
||||
|
||||
menu_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(menu_page_label, "Orientation :");
|
||||
container = create_section_container(section);
|
||||
|
||||
lv_obj_t *orientation_dropdown = lv_dropdown_create(container);
|
||||
lv_dropdown_set_options_static(orientation_dropdown, orientation_format);
|
||||
lv_obj_add_event_cb(orientation_dropdown, &(orientation_dropdown_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
|
||||
|
||||
//We create the side bar page
|
||||
lv_obj_t *sidebar_page = lv_menu_page_create(menu, NULL);
|
||||
lv_obj_t *settings_section_1 = lv_menu_section_create(sidebar_page);
|
||||
lv_obj_set_style_pad_all(settings_section_1, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_bottom(settings_section_1, 50 , LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_hor(settings_section_1, -10 ,LV_PART_MAIN);
|
||||
|
||||
lv_obj_t *selected = add_sidebar_entry_to_menu(settings_section_1, "Time & Date", menu, menu_page_1);
|
||||
|
||||
add_sidebar_entry_to_menu(settings_section_1, "Display", menu, menu_page_2);
|
||||
|
||||
add_sidebar_entry_to_menu(settings_section_1, "Notifications", menu, NULL);
|
||||
|
||||
add_sidebar_entry_to_menu(settings_section_1, "Connectivity", menu, NULL);
|
||||
|
||||
add_sidebar_entry_to_menu(settings_section_1, "Language", menu, NULL);
|
||||
|
||||
//We set the side bar page
|
||||
lv_menu_set_sidebar_page(menu, sidebar_page);
|
||||
|
||||
lv_event_send(selected, LV_EVENT_CLICKED, NULL);
|
||||
//We add all the menu list items
|
||||
settingsScreen->time_and_date_item = add_menu_list_item(menu_list, "Time & Date", &(menu_list_item_event_handler), settingsScreen);
|
||||
settingsScreen->display_item = add_menu_list_item(menu_list, "Display", &(menu_list_item_event_handler), settingsScreen);
|
||||
settingsScreen->notifications_item = add_menu_list_item(menu_list, "Notifications", &(menu_list_item_event_handler), settingsScreen);
|
||||
settingsScreen->connectivity_item = add_menu_list_item(menu_list, "Connectivity", &(menu_list_item_event_handler), settingsScreen);
|
||||
settingsScreen->language_item = add_menu_list_item(menu_list, "Language", &(menu_list_item_event_handler), settingsScreen);
|
||||
settingsScreen->about_item = add_menu_list_item(menu_list, "About", &(menu_list_item_event_handler), settingsScreen);
|
||||
|
||||
//We register the event callback to handle gesture
|
||||
lv_obj_add_event_cb(settingsScreen->display, &(gesture_event_cb), LV_EVENT_GESTURE, settingsScreen);
|
||||
//We register the event callback to handle the cleanup
|
||||
lv_obj_add_event_cb(settingsScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, settingsScreen);
|
||||
|
||||
//We load the default side screen content (time and date)
|
||||
_simulate_side_screen_item_click(settingsScreen, settingsScreen->time_and_date_item);
|
||||
}
|
||||
|
||||
void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
|
||||
@ -329,291 +542,45 @@ void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
|
||||
settingsScreen->month_roller = NULL;
|
||||
settingsScreen->year_roller = NULL;
|
||||
settingsScreen->display = NULL;
|
||||
settingsScreen->about_refresh_timer = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
const char *lang_options = "English\nFrench\nGerman\nItalian";
|
||||
|
||||
void settings_screen(void)
|
||||
static void _simulate_side_screen_item_click(SettingsScreen_t * const settingsScreen, lv_obj_t *item)
|
||||
{
|
||||
conf_screen = lv_obj_create(NULL);
|
||||
static lv_obj_t *last_target = NULL;
|
||||
|
||||
LV_LOG_USER("Adding event to screen");
|
||||
lv_obj_add_event_cb(conf_screen, &(event_cb), LV_EVENT_GESTURE, NULL);
|
||||
if(last_target == item) return;
|
||||
|
||||
lv_obj_t *config_bar = lv_obj_create(conf_screen);
|
||||
lv_obj_set_style_bg_color(config_bar, lv_color_make(129, 141,181), LV_PART_MAIN);
|
||||
lv_obj_set_size(config_bar, 240, 65);
|
||||
lv_obj_set_style_radius(config_bar, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(config_bar, 0, LV_PART_MAIN);
|
||||
if(last_target == settingsScreen->about_item)
|
||||
{
|
||||
lv_timer_del(settingsScreen->about_refresh_timer);
|
||||
settingsScreen->about_refresh_timer = NULL;
|
||||
}
|
||||
|
||||
lv_obj_t *config_label = lv_label_create(config_bar);
|
||||
lv_label_set_text_static(config_label, "Settings");
|
||||
lv_obj_set_style_text_color(config_label, lv_color_white(), LV_PART_MAIN);
|
||||
lv_obj_set_style_text_font(config_label, &lv_font_montserrat_30, LV_PART_MAIN);
|
||||
lv_obj_set_align(config_label, LV_ALIGN_CENTER);
|
||||
last_target = item;
|
||||
|
||||
lv_obj_t *menu = lv_menu_create(conf_screen);
|
||||
lv_obj_set_size(menu, lv_pct(100), 240 - 65);
|
||||
lv_obj_set_pos(menu, 0, 65);
|
||||
//lv_obj_set_style_text_color(menu, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_obj_set_style_text_font(menu, &lv_font_montserrat_16, LV_PART_MAIN);
|
||||
//lv_obj_set_style_pad_hor(menu,-10,LV_PART_MAIN);
|
||||
|
||||
//create sub page
|
||||
|
||||
lv_obj_t *time_sub_page = lv_menu_page_create(menu, NULL);
|
||||
lv_menu_separator_create(time_sub_page);
|
||||
lv_obj_t *section = lv_menu_section_create(time_sub_page);
|
||||
lv_obj_set_style_pad_bottom(section, 50, LV_PART_MAIN);
|
||||
|
||||
lv_obj_set_style_pad_left(section, 5, LV_PART_MAIN);
|
||||
|
||||
lv_obj_t *sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Time Setting :");
|
||||
|
||||
lv_obj_t *container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *toggle = lv_switch_create(container);
|
||||
lv_obj_add_state(toggle, LV_STATE_CHECKED);
|
||||
lv_obj_t *toggle_label = lv_label_create(container);
|
||||
lv_label_set_text_static(toggle_label, "Automatic");
|
||||
lv_obj_set_style_pad_top(toggle_label, 5, LV_PART_MAIN);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Date :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *day_roller = lv_roller_create(container), *month_roller = lv_roller_create(container), *year_roller = lv_roller_create(container);
|
||||
lv_roller_set_options(day_roller, day_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(day_roller, 2);
|
||||
|
||||
|
||||
lv_roller_set_options(month_roller, month_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(month_roller, 2);
|
||||
|
||||
lv_roller_set_options(year_roller, year_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(year_roller, 2);
|
||||
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Time :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
lv_obj_clear_flag(container, LV_OBJ_FLAG_SCROLLABLE);
|
||||
|
||||
lv_obj_t *hour_roller = lv_roller_create(container), *minute_roller = lv_roller_create(container), *second_roller = lv_roller_create(container);
|
||||
lv_roller_set_options(hour_roller, hour_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(hour_roller, 2);
|
||||
|
||||
|
||||
lv_roller_set_options(minute_roller, sec_min_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(minute_roller, 2);
|
||||
|
||||
lv_roller_set_options(second_roller, sec_min_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(second_roller, 2);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Time Format :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *btn_12 = lv_checkbox_create(container), *btn_24 = lv_checkbox_create(container);
|
||||
lv_checkbox_set_text(btn_12, "12H");
|
||||
lv_obj_set_style_radius(btn_12, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
lv_obj_add_state(btn_12, LV_STATE_CHECKED);
|
||||
lv_checkbox_set_text(btn_24, "24H");
|
||||
lv_obj_set_style_radius(btn_24, LV_RADIUS_CIRCLE, LV_PART_INDICATOR);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Date Format :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *date_drop = lv_dropdown_create(container);
|
||||
lv_dropdown_set_options_static(date_drop, date_format);
|
||||
|
||||
|
||||
lv_obj_t *screen_sub_page = lv_menu_page_create(menu, NULL);
|
||||
lv_menu_separator_create(screen_sub_page);
|
||||
section = lv_menu_section_create(screen_sub_page);
|
||||
lv_obj_set_style_pad_left(section, 5, LV_PART_MAIN);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Brightness :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *slider = lv_slider_create(container);
|
||||
lv_obj_clear_flag(slider, LV_OBJ_FLAG_GESTURE_BUBBLE);
|
||||
lv_obj_set_width(slider, lv_pct(80));
|
||||
lv_obj_set_align(slider, LV_ALIGN_CENTER);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Sleep Timeout :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *timeout = lv_roller_create(container);
|
||||
lv_roller_set_options(timeout, day_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(timeout, 2);
|
||||
lv_obj_t *timeout_lab = lv_label_create(container);
|
||||
lv_label_set_text_static(timeout_lab, "Second(s)");
|
||||
lv_obj_set_style_pad_top(timeout_lab, 25, LV_PART_MAIN);
|
||||
|
||||
|
||||
lv_obj_t *notify_sub_page = lv_menu_page_create(menu, NULL);
|
||||
lv_menu_separator_create(notify_sub_page);
|
||||
section = lv_menu_section_create(notify_sub_page);
|
||||
lv_obj_set_style_pad_left(section, 5, LV_PART_MAIN);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Vibrator :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *vib_toggle = lv_switch_create(container);
|
||||
lv_obj_add_state(vib_toggle, LV_STATE_CHECKED);
|
||||
lv_obj_t *vib_toggle_label = lv_label_create(container);
|
||||
lv_label_set_text_static(vib_toggle_label, "Enabled");
|
||||
lv_obj_set_style_pad_top(vib_toggle_label, 5, LV_PART_MAIN);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Vibration duration :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
timeout = lv_roller_create(container);
|
||||
lv_roller_set_options(timeout, day_options, LV_ROLLER_MODE_INFINITE);
|
||||
lv_roller_set_visible_row_count(timeout, 2);
|
||||
timeout_lab = lv_label_create(container);
|
||||
lv_label_set_text_static(timeout_lab, "Second(s)");
|
||||
lv_obj_set_style_pad_top(timeout_lab, 25, LV_PART_MAIN);
|
||||
|
||||
lv_obj_t *lan_sub_page = lv_menu_page_create(menu, NULL);
|
||||
lv_menu_separator_create(lan_sub_page);
|
||||
section = lv_menu_section_create(lan_sub_page);
|
||||
lv_obj_set_style_pad_left(section, 5, LV_PART_MAIN);
|
||||
|
||||
sub_page_label = lv_label_create(section);
|
||||
lv_label_set_text_static(sub_page_label, "Languages :");
|
||||
|
||||
container = lv_obj_create(section);
|
||||
lv_obj_set_flex_flow(container, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_style_pad_right(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_left(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(container,0, LV_PART_MAIN);
|
||||
lv_obj_set_size(container, lv_pct(100), LV_SIZE_CONTENT);
|
||||
|
||||
lv_obj_t *lang_drop = lv_dropdown_create(container);
|
||||
lv_dropdown_set_options(lang_drop, lang_options);
|
||||
|
||||
//Create root page
|
||||
lv_obj_t *main_page = lv_menu_page_create(menu, NULL);
|
||||
|
||||
lv_obj_t *settings_section = lv_menu_section_create(main_page);
|
||||
lv_obj_set_style_pad_all(settings_section, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_bottom(settings_section, 50, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_hor(settings_section,-10,LV_PART_MAIN);
|
||||
|
||||
lv_obj_t *date_categ = lv_menu_cont_create(settings_section);
|
||||
lv_obj_t *date_categ_text_1 = lv_label_create(date_categ);
|
||||
lv_label_set_text_static(date_categ_text_1, "Time & Date");
|
||||
lv_obj_set_style_text_color(date_categ_text_1, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_label_set_long_mode(date_categ_text_1, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(date_categ_text_1, 1);
|
||||
lv_obj_set_style_anim_speed(date_categ_text_1, 15, LV_PART_MAIN);
|
||||
|
||||
lv_menu_set_load_page_event(menu, date_categ_text_1, time_sub_page);
|
||||
|
||||
lv_obj_t *categ = lv_menu_cont_create(settings_section);
|
||||
lv_obj_t *categ_text_1 = lv_label_create(categ);
|
||||
lv_label_set_text_static(categ_text_1, "Screen");
|
||||
lv_obj_set_style_text_color(categ_text_1, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_label_set_long_mode(categ_text_1, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(categ_text_1, 1);
|
||||
lv_obj_set_style_anim_speed(categ_text_1, 15, LV_PART_MAIN);
|
||||
|
||||
lv_menu_set_load_page_event(menu, categ_text_1, screen_sub_page);
|
||||
|
||||
|
||||
lv_obj_t *vib_categ = lv_menu_cont_create(settings_section);
|
||||
lv_obj_t *vib_categ_text_1 = lv_label_create(vib_categ);
|
||||
lv_label_set_text_static(vib_categ_text_1, "Notifications");
|
||||
lv_obj_set_style_text_color(vib_categ_text_1, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_label_set_long_mode(vib_categ_text_1, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(vib_categ_text_1, 1);
|
||||
lv_obj_set_style_anim_speed(vib_categ_text_1, 15, LV_PART_MAIN);
|
||||
|
||||
lv_menu_set_load_page_event(menu, vib_categ_text_1, notify_sub_page);
|
||||
|
||||
lv_obj_t *con_categ = lv_menu_cont_create(settings_section);
|
||||
lv_obj_t *con_categ_text_1 = lv_label_create(con_categ);
|
||||
lv_label_set_text_static(con_categ_text_1, "Connectivity");
|
||||
lv_obj_set_style_text_color(con_categ_text_1, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_label_set_long_mode(con_categ_text_1, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(con_categ_text_1, 1);
|
||||
lv_obj_set_style_anim_speed(con_categ_text_1, 15, LV_PART_MAIN);
|
||||
|
||||
//lv_menu_set_load_page_event(menu, con_categ_text_1, notify_sub_page);
|
||||
|
||||
lv_obj_t *lan_categ = lv_menu_cont_create(settings_section);
|
||||
lv_obj_t *lan_categ_text_1 = lv_label_create(lan_categ);
|
||||
lv_label_set_text_static(lan_categ_text_1, "Language");
|
||||
lv_obj_set_style_text_color(lan_categ_text_1, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||
//lv_label_set_long_mode(lan_categ_text_1, LV_LABEL_LONG_SCROLL_CIRCULAR);
|
||||
lv_obj_set_flex_grow(lan_categ_text_1, 1);
|
||||
lv_obj_set_style_anim_speed(lan_categ_text_1, 15, LV_PART_MAIN);
|
||||
|
||||
lv_menu_set_load_page_event(menu, lan_categ_text_1, lan_sub_page);
|
||||
|
||||
lv_menu_set_sidebar_page(menu, main_page);
|
||||
|
||||
lv_event_send(date_categ_text_1, LV_EVENT_CLICKED, NULL);
|
||||
}*/
|
||||
if(item == settingsScreen->time_and_date_item)
|
||||
{
|
||||
load_time_and_date_side_screen(settingsScreen);
|
||||
}
|
||||
else if(item == settingsScreen->display_item)
|
||||
{
|
||||
load_display_side_screen(settingsScreen);
|
||||
}
|
||||
else if(item == settingsScreen->notifications_item)
|
||||
{
|
||||
load_notifications_side_screen(settingsScreen);
|
||||
}
|
||||
else if(item == settingsScreen->connectivity_item)
|
||||
{
|
||||
load_connectivity_side_screen(settingsScreen);
|
||||
}
|
||||
else if(item == settingsScreen->language_item)
|
||||
{
|
||||
load_language_side_screen(settingsScreen);
|
||||
}
|
||||
else if(item == settingsScreen->about_item)
|
||||
{
|
||||
load_about_side_screen(settingsScreen);
|
||||
}
|
||||
}
|
||||
|
@ -11,13 +11,36 @@ typedef struct SettingsScreenAPIInterface
|
||||
typedef struct SettingsScreen
|
||||
{
|
||||
SettingsScreenAPIInterface_t settingsScreenAPIInterface;
|
||||
/* Menu list items */
|
||||
lv_obj_t *time_and_date_item;
|
||||
lv_obj_t *display_item;
|
||||
lv_obj_t *notifications_item;
|
||||
lv_obj_t *connectivity_item;
|
||||
lv_obj_t *language_item;
|
||||
lv_obj_t *about_item;
|
||||
|
||||
lv_obj_t *side_screen;
|
||||
|
||||
/* Menu widgets */
|
||||
lv_obj_t *hour_roller;
|
||||
lv_obj_t *minute_roller;
|
||||
lv_obj_t *second_roller;
|
||||
lv_obj_t *checkbox_time_12H;
|
||||
lv_obj_t *checkbox_time_24H;
|
||||
lv_obj_t *day_roller;
|
||||
lv_obj_t *month_roller;
|
||||
lv_obj_t *year_roller;
|
||||
struct
|
||||
{
|
||||
lv_obj_t *current_time_label;
|
||||
char current_time_text[20];
|
||||
} currentTime;
|
||||
|
||||
/* Main screen */
|
||||
lv_obj_t *display;
|
||||
|
||||
/* Other */
|
||||
lv_timer_t *about_refresh_timer;
|
||||
} SettingsScreen_t;
|
||||
|
||||
void settings_screen_init(SettingsScreen_t * const settingsScreen);
|
||||
@ -28,6 +51,4 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen);
|
||||
|
||||
void settings_screen_destroy(SettingsScreen_t * const settingsScreen);
|
||||
|
||||
void settings_screen(void);
|
||||
|
||||
#endif //SETTINGS_SCREEN_H
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,6 +7,23 @@ LV_IMG_DECLARE(battery_low_icon)
|
||||
LV_IMG_DECLARE(battery_charging_icon)
|
||||
LV_IMG_DECLARE(battery_charged_icon)
|
||||
|
||||
static void _set_bluetooth_indicator(WatchFace_t * const watchFace)
|
||||
{
|
||||
switch(watchFace->bluetoothIndicator.bluetoothState)
|
||||
{
|
||||
case BLUETOOTH_STATE_ON:
|
||||
lv_obj_set_style_img_recolor_opa(watchFace->bluetoothIndicator.bluetoothIcon, 185, LV_PART_MAIN);
|
||||
lv_obj_clear_flag(watchFace->bluetoothIndicator.bluetoothIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
case BLUETOOTH_STATE_CONNECTED:
|
||||
lv_obj_set_style_img_recolor_opa(watchFace->bluetoothIndicator.bluetoothIcon, 0, LV_PART_MAIN);
|
||||
lv_obj_clear_flag(watchFace->bluetoothIndicator.bluetoothIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
break;
|
||||
default:
|
||||
lv_obj_add_flag(watchFace->bluetoothIndicator.bluetoothIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
static void gesture_event_cb(lv_event_t * e)
|
||||
{
|
||||
WatchFace_t *watchFace = e->user_data;
|
||||
@ -64,7 +81,7 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
|
||||
|
||||
//Don't forget to update the day date window
|
||||
sprintf(watchFace->dateWindow.dateWindowText, "%s%d", watchFace->dateTime.tm_mday < 10 ? " " : "", watchFace->dateTime.tm_mday);
|
||||
lv_obj_invalidate(watchFace->dateWindow.dateWindowWidget);
|
||||
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
|
||||
|
||||
if(watchFace->batteryIndicatorCb)
|
||||
{
|
||||
@ -89,18 +106,28 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
|
||||
lv_img_set_angle(watchFace->hourHand.handImg, (uint16_t) watchFace->hourHand.handAngle % 3600);
|
||||
lv_img_set_angle(watchFace->mediumHand24h.handImg, (uint16_t) watchFace->mediumHand24h.handAngle % 3600);
|
||||
|
||||
//To delete just for the preview
|
||||
/** To delete just for the preview **/
|
||||
static uint8_t percentage = 0;
|
||||
|
||||
BatteryState_e batteryState = BATTERY_STATE_DISCHARGING;
|
||||
if(percentage % 101 < 30)
|
||||
{
|
||||
batteryState = BATTERY_STATE_DISCHARGING;
|
||||
watch_face_set_bluetooth_indicator(watchFace, BLUETOOTH_STATE_OFF);
|
||||
}
|
||||
else if(percentage % 101 < 70)
|
||||
{
|
||||
batteryState = BATTERY_STATE_CHARGING;
|
||||
watch_face_set_bluetooth_indicator(watchFace, BLUETOOTH_STATE_ON);
|
||||
}
|
||||
else
|
||||
{
|
||||
batteryState = BATTERY_STATE_CHARGED;
|
||||
watch_face_set_bluetooth_indicator(watchFace, BLUETOOTH_STATE_CONNECTED);
|
||||
}
|
||||
|
||||
watch_face_set_battery_indicator(watchFace, percentage++ % 101, batteryState);
|
||||
/** END OF DELETE SECTION **/
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -133,10 +160,12 @@ static void set_battery_state_icon(WatchFace_t * const watchFace)
|
||||
switch(watchFace->batteryIndicator.batteryState)
|
||||
{
|
||||
case BATTERY_STATE_CHARGING:
|
||||
lv_timer_pause(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||
lv_obj_clear_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_img_set_src(watchFace->batteryIndicator.batteryIcon, &battery_charging_icon);
|
||||
break;
|
||||
case BATTERY_STATE_CHARGED:
|
||||
lv_timer_pause(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||
lv_obj_clear_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_img_set_src(watchFace->batteryIndicator.batteryIcon, &battery_charged_icon);
|
||||
break;
|
||||
@ -147,6 +176,22 @@ static void set_battery_state_icon(WatchFace_t * const watchFace)
|
||||
}
|
||||
}
|
||||
|
||||
static void hide_hour_and_minutes_hand_cb(lv_event_t *e)
|
||||
{
|
||||
WatchFace_t *watchFace = e->user_data;
|
||||
|
||||
if(lv_obj_has_flag(watchFace->hourHand.handImg, LV_OBJ_FLAG_HIDDEN))
|
||||
{
|
||||
lv_obj_clear_flag(watchFace->hourHand.handImg, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_clear_flag(watchFace->minuteHand.handImg, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
lv_obj_add_flag(watchFace->hourHand.handImg, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_add_flag(watchFace->minuteHand.handImg, LV_OBJ_FLAG_HIDDEN);
|
||||
}
|
||||
}
|
||||
|
||||
void watch_face_init(WatchFace_t * const watchFace)
|
||||
{
|
||||
if(!watchFace)
|
||||
@ -155,6 +200,7 @@ void watch_face_init(WatchFace_t * const watchFace)
|
||||
return;
|
||||
}
|
||||
memset(watchFace, 0, sizeof(WatchFace_t));
|
||||
strcpy(watchFace->stepCounter.text, "0");
|
||||
}
|
||||
|
||||
void watch_face_register_date_time_cb(WatchFace_t * const watchFace, DateTimeCb_t dateTimeCb)
|
||||
@ -196,12 +242,13 @@ void watch_face_create(WatchFace_t * const watchFace)
|
||||
watchFace->display = lv_img_create(NULL);
|
||||
lv_img_set_src(watchFace->display, &watch_casio_face_asset);
|
||||
lv_obj_set_style_bg_color(watchFace->display, lv_color_black(), LV_PART_MAIN);
|
||||
lv_obj_add_event_cb(watchFace->display, &(hide_hour_and_minutes_hand_cb), LV_EVENT_LONG_PRESSED, watchFace);
|
||||
|
||||
//We load our other assets :
|
||||
lv_obj_t *smallHandImg = lv_img_create(watchFace->display);
|
||||
/*lv_obj_t *smallHandImg = lv_img_create(watchFace->display);
|
||||
lv_img_set_src(smallHandImg, &watch_casio_small_hand_asset);
|
||||
lv_obj_set_pos(smallHandImg, 69, 98);
|
||||
lv_img_set_pivot(smallHandImg, 4, 20);
|
||||
lv_img_set_pivot(smallHandImg, 4, 20);*/
|
||||
|
||||
//Battery arc is created here
|
||||
if(watchFace->batteryIndicator.batteryArc)
|
||||
@ -256,13 +303,33 @@ void watch_face_create(WatchFace_t * const watchFace)
|
||||
watchFace->batteryIndicator.lowBatteryAnimationTimer = lv_timer_create(&(battery_timer_anim_cb), 500, watchFace);
|
||||
lv_timer_pause(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||
|
||||
// Bluetooth connection icon is created here
|
||||
lv_obj_t *bluetooth_img = lv_img_create(watchFace->display);
|
||||
lv_img_set_src(bluetooth_img, &bluetooth_icon);
|
||||
lv_img_set_zoom(bluetooth_img, 128);
|
||||
lv_obj_align_to(bluetooth_img, watchFace->batteryIndicator.batteryArc, LV_ALIGN_OUT_LEFT_BOTTOM, -9, 0);
|
||||
lv_obj_set_style_img_recolor_opa(bluetooth_img, 185, LV_PART_MAIN);
|
||||
lv_obj_set_style_img_recolor(bluetooth_img, lv_palette_main(LV_PALETTE_GREY), LV_PART_MAIN);
|
||||
// Bluetooth status icon is created here
|
||||
if(watchFace->bluetoothIndicator.bluetoothIcon)
|
||||
{
|
||||
LV_LOG_ERROR("bluetoothIcon be NULL here !");
|
||||
lv_obj_del(watchFace->bluetoothIndicator.bluetoothIcon);
|
||||
watchFace->bluetoothIndicator.bluetoothIcon = NULL;
|
||||
}
|
||||
watchFace->bluetoothIndicator.bluetoothIcon = lv_img_create(watchFace->display);
|
||||
lv_img_set_src(watchFace->bluetoothIndicator.bluetoothIcon, &bluetooth_icon);
|
||||
lv_img_set_zoom(watchFace->bluetoothIndicator.bluetoothIcon, 128);
|
||||
lv_obj_add_flag(watchFace->bluetoothIndicator.bluetoothIcon, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_obj_set_style_img_recolor(watchFace->bluetoothIndicator.bluetoothIcon, lv_palette_main(LV_PALETTE_GREY), LV_PART_MAIN);
|
||||
lv_obj_align_to(watchFace->bluetoothIndicator.bluetoothIcon, watchFace->batteryIndicator.batteryArc, LV_ALIGN_OUT_LEFT_BOTTOM, -9, 0);
|
||||
_set_bluetooth_indicator(watchFace);
|
||||
|
||||
// StepCounter label is created here
|
||||
if(watchFace->stepCounter.label)
|
||||
{
|
||||
LV_LOG_ERROR("stepCounter should be NULL here !");
|
||||
lv_obj_del(watchFace->stepCounter.label);
|
||||
watchFace->stepCounter.label = NULL;
|
||||
}
|
||||
|
||||
watchFace->stepCounter.label = lv_label_create(watchFace->display);
|
||||
lv_label_set_text_static(watchFace->stepCounter.label, watchFace->stepCounter.text);
|
||||
lv_obj_set_style_text_color(watchFace->stepCounter.label, lv_color_white(), LV_PART_MAIN);
|
||||
lv_obj_set_pos(watchFace->stepCounter.label, 63, 111);
|
||||
|
||||
if(watchFace->mediumHand24h.handImg)
|
||||
{
|
||||
@ -394,6 +461,43 @@ void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t lev
|
||||
}
|
||||
}
|
||||
|
||||
void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, BluetoothState_e bluetoothState)
|
||||
{
|
||||
if(!watchFace)
|
||||
{
|
||||
LV_LOG_ERROR("NULL pointer given !");
|
||||
return;
|
||||
}
|
||||
|
||||
if(watchFace->bluetoothIndicator.bluetoothState == bluetoothState) return;
|
||||
|
||||
watchFace->bluetoothIndicator.bluetoothState = bluetoothState;
|
||||
|
||||
if(!watchFace->display) return;
|
||||
|
||||
_set_bluetooth_indicator(watchFace);
|
||||
}
|
||||
|
||||
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count)
|
||||
{
|
||||
if(!watchFace)
|
||||
{
|
||||
LV_LOG_ERROR("NULL pointer given !");
|
||||
return;
|
||||
}
|
||||
|
||||
if(step_count < 1000)
|
||||
sprintf(watchFace->stepCounter.text, "%u", step_count);
|
||||
else if(step_count < 9996)
|
||||
sprintf(watchFace->stepCounter.text, "%.2fk", step_count/1000.0);
|
||||
else
|
||||
sprintf(watchFace->stepCounter.text, "%.1fk", step_count/1000.0);
|
||||
|
||||
if(!watchFace->display) return;
|
||||
|
||||
lv_label_set_text_static(watchFace->stepCounter.label, watchFace->stepCounter.text);
|
||||
}
|
||||
|
||||
void watch_face_destroy(WatchFace_t * const watchFace)
|
||||
{
|
||||
if(!watchFace)
|
||||
@ -413,6 +517,8 @@ void watch_face_destroy(WatchFace_t * const watchFace)
|
||||
watchFace->batteryIndicator.label = NULL;
|
||||
watchFace->batteryIndicator.batteryIcon = NULL;
|
||||
watchFace->batteryIndicator.lowBatteryAnimationTimer = NULL;
|
||||
watchFace->stepCounter.label = NULL;
|
||||
watchFace->bluetoothIndicator.bluetoothIcon = NULL;
|
||||
}
|
||||
|
||||
void watch_face_force_sync(WatchFace_t *const watchFace)
|
||||
|
@ -4,16 +4,23 @@
|
||||
#include "lvgl.h"
|
||||
#include <time.h>
|
||||
|
||||
typedef void (*DateTimeCb_t)(struct tm * const dateTime);
|
||||
|
||||
typedef enum BatteryState
|
||||
{
|
||||
BATTERY_STATE_DISCHARGING = 0,
|
||||
BATTERY_STATE_CHARGING,
|
||||
BATTERY_STATE_CHARGED
|
||||
BATTERY_STATE_CHARGED,
|
||||
} BatteryState_e;
|
||||
|
||||
typedef void (*BatteryIndicatorCb_t)(const uint8_t * levelInPercent, const BatteryState_e *batteryState);
|
||||
typedef enum BluetoothState
|
||||
{
|
||||
BLUETOOTH_STATE_OFF = 0,
|
||||
BLUETOOTH_STATE_ON,
|
||||
BLUETOOTH_STATE_CONNECTED
|
||||
} BluetoothState_e;
|
||||
|
||||
typedef void (*DateTimeCb_t)(struct tm * const dateTime);
|
||||
|
||||
typedef void (*BatteryIndicatorCb_t)(uint8_t *levelInPercent, BatteryState_e *batteryState);
|
||||
|
||||
typedef struct DateWindow
|
||||
{
|
||||
@ -31,12 +38,24 @@ typedef struct BatteryIndicator
|
||||
{
|
||||
lv_obj_t *label;
|
||||
lv_obj_t *batteryArc;
|
||||
lv_obj_t * batteryIcon;
|
||||
lv_obj_t *batteryIcon;
|
||||
lv_timer_t *lowBatteryAnimationTimer;
|
||||
char text[7];
|
||||
BatteryState_e batteryState:2;
|
||||
} BatteryIndicator_t;
|
||||
|
||||
typedef struct BluetoothIndicator
|
||||
{
|
||||
lv_obj_t *bluetoothIcon;
|
||||
BluetoothState_e bluetoothState;
|
||||
} BluetoothIndicator_t;
|
||||
|
||||
typedef struct StepCounter
|
||||
{
|
||||
lv_obj_t *label;
|
||||
char text[7];
|
||||
} StepCounter_t;
|
||||
|
||||
/* Watch face context object */
|
||||
typedef struct WatchFace
|
||||
{
|
||||
@ -50,22 +69,76 @@ typedef struct WatchFace
|
||||
lv_obj_t *display;
|
||||
DateWindow_t dateWindow;
|
||||
BatteryIndicator_t batteryIndicator;
|
||||
|
||||
StepCounter_t stepCounter;
|
||||
BluetoothIndicator_t bluetoothIndicator;
|
||||
struct tm dateTime;
|
||||
} WatchFace_t;
|
||||
|
||||
/* Initializes the watch face context object */
|
||||
void watch_face_init(WatchFace_t * const watchFace);
|
||||
|
||||
/* Registers a call back function to retrieve the time and date */
|
||||
/**
|
||||
* @brief Registers a call back function used by the watch face to retrieve the time and date
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param DateTimeCb a pointer to a function having the right definition.
|
||||
*/
|
||||
void watch_face_register_date_time_cb(WatchFace_t * const watchFace, DateTimeCb_t DateTimeCb);
|
||||
|
||||
/* Builds the watch face graphically */
|
||||
/**
|
||||
* @brief Registers a call back function used to refresh the battery indicator.
|
||||
* The refreshing is done every minute or every time the @ref watch_face_force_sync is called.
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param BatteryIndicatorCb a pointer to a function having the right definition.
|
||||
*/
|
||||
void watch_face_register_battery_indicator_cb(WatchFace_t * const watchFace, BatteryIndicatorCb_t BatteryIndicatorCb);
|
||||
|
||||
/**
|
||||
* @brief Graphically builds the watch face
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
*/
|
||||
void watch_face_create(WatchFace_t * const watchFace);
|
||||
|
||||
/**
|
||||
* @brief Sets the battery indicator to the given value in percent.
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param percentage the value to set the indicator to in percent.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Sets the battery level in percent as well as it's current state to draw on the watch face.
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param levelInPercent the level to set the indicator to in percent.
|
||||
* @param batteryState the current state of the battery : BATTERY_STATE_DISCHARGING, BATTERY_STATE_CHARGING or BATTERY_STATE_CHARGED
|
||||
*/
|
||||
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t levelInPercent, BatteryState_e batteryState);
|
||||
|
||||
/* Frees all resources used by the WatchFace object */
|
||||
/**
|
||||
* @brief Sets the current bluetooth state to display on the watch face
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
* @param bluetoothState the state of the bluetooth modem to show, can be : BLUETOOTH_STATE_OFF, BLUETOOTH_STATE_ON or BLUETOOTH_STATE_CONNECTED
|
||||
*/
|
||||
void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, BluetoothState_e bluetoothState);
|
||||
|
||||
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count);
|
||||
|
||||
/**
|
||||
* @brief Forces the watch face to sync up with the RTC by calling the provided date_time_cb
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
*/
|
||||
void watch_face_force_sync(WatchFace_t * const watchFace);
|
||||
|
||||
/**
|
||||
* @brief Frees all resources used by the WatchFace object
|
||||
*
|
||||
* @param watchFace a pointer to the watch face context structure.
|
||||
*/
|
||||
void watch_face_destroy(WatchFace_t * const watchFace);
|
||||
|
||||
#endif // WATCH_FACE_H
|
||||
|
Loading…
Reference in New Issue
Block a user