Updated the lvgl simulator project
This commit is contained in:
parent
9e16ed302d
commit
c0484e3760
@ -1666,13 +1666,26 @@
|
|||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="settings_screen.h" />
|
<Unit filename="settings_screen.h" />
|
||||||
|
<Unit filename="watch_carbon_assets.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="watch_casio_assets.c">
|
<Unit filename="watch_casio_assets.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
<Unit filename="watch_face.c">
|
<Unit filename="watch_face.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
<Unit filename="watch_face.c.bck">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
<Option compile="1" />
|
||||||
|
<Option link="1" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="watch_face.h" />
|
<Unit filename="watch_face.h" />
|
||||||
|
<Unit filename="watch_face_carbon.c">
|
||||||
|
<Option compilerVar="CC" />
|
||||||
|
<Option compile="0" />
|
||||||
|
<Option link="0" />
|
||||||
|
</Unit>
|
||||||
<Unit filename="watch_mask.c">
|
<Unit filename="watch_mask.c">
|
||||||
<Option compilerVar="CC" />
|
<Option compilerVar="CC" />
|
||||||
</Unit>
|
</Unit>
|
||||||
|
@ -2,129 +2,19 @@
|
|||||||
<CodeBlocks_layout_file>
|
<CodeBlocks_layout_file>
|
||||||
<FileVersion major="1" minor="0" />
|
<FileVersion major="1" minor="0" />
|
||||||
<ActiveTarget name="Debug" />
|
<ActiveTarget name="Debug" />
|
||||||
<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="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\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="music_player_screen.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="22334" topLine="0" />
|
|
||||||
</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="find_my_phone_screen.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1078" topLine="3" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="2886" topLine="90" />
|
|
||||||
</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\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\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\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\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="compass_screen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1480" topLine="179" />
|
|
||||||
</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\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="10233" topLine="226" />
|
|
||||||
</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="242" />
|
|
||||||
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="1563" topLine="27" />
|
<Cursor1 position="1563" topLine="27" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="950" topLine="43" />
|
<Cursor1 position="715" topLine="26" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="lvgl\src\widgets\list\lv_list.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
|
<File name="watch_casio_assets.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="2391" topLine="53" />
|
<Cursor1 position="99" topLine="968" />
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="menu_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="8350" topLine="165" />
|
|
||||||
</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="31" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="969" topLine="39" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="settings_screen.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="6343" topLine="145" />
|
|
||||||
</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="watch_face.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="225" topLine="6" />
|
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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">
|
||||||
@ -132,19 +22,39 @@
|
|||||||
<Cursor1 position="0" topLine="24" />
|
<Cursor1 position="0" topLine="24" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="3097" topLine="74" />
|
<Cursor1 position="1135" topLine="14" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="find_my_phone_screen.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="96342" topLine="161" />
|
<Cursor1 position="1081" topLine="138" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="music_player_screen.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="11658" topLine="336" />
|
<Cursor1 position="22334" topLine="0" />
|
||||||
|
</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="6135" topLine="182" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="common_screen_components.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="517" topLine="0" />
|
||||||
|
</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="1102" topLine="35" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="find_my_phone_screen.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="1078" topLine="3" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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">
|
||||||
@ -152,49 +62,44 @@
|
|||||||
<Cursor1 position="1234" topLine="30" />
|
<Cursor1 position="1234" topLine="30" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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\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\core\lv_event.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="5365" topLine="214" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="watch_face.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="702" zoom_1="0" zoom_2="-1">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="8554" topLine="425" />
|
|
||||||
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="6210" topLine="113" />
|
<Cursor1 position="6210" topLine="113" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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="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\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_obj_style_gen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="20039" topLine="604" />
|
<Cursor1 position="20039" topLine="604" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="lvgl\src\core\lv_event.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="11297" topLine="329" />
|
<Cursor1 position="579" topLine="17" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="2557" topLine="68" />
|
<Cursor1 position="2447" topLine="75" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="0" topLine="138" />
|
<Cursor1 position="721" topLine="16" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="watch_menu_icons.c" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
@ -222,64 +127,9 @@
|
|||||||
<Collapse line="1729" />
|
<Collapse line="1729" />
|
||||||
</Folding>
|
</Folding>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="3566" topLine="102" />
|
<Cursor1 position="9479" topLine="300" />
|
||||||
</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="compass_screen.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="3981" topLine="81" />
|
|
||||||
</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_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_obj_scroll.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="4372" topLine="104" />
|
|
||||||
</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\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="find_my_phone_screen.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1081" topLine="138" />
|
|
||||||
</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\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\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>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="music_player_screen.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="music_player_screen.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
@ -287,74 +137,44 @@
|
|||||||
<Cursor1 position="1263" topLine="38" />
|
<Cursor1 position="1263" topLine="38" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="5535" topLine="120" />
|
<Cursor1 position="3011" topLine="100" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="1135" topLine="14" />
|
<Cursor1 position="3097" topLine="74" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="notification_screen.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="common_screen_components.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="2362" topLine="27" />
|
<Cursor1 position="496" topLine="3" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="456" topLine="6" />
|
<Cursor1 position="2886" topLine="90" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="lv_conf.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="572" topLine="15" />
|
<Cursor1 position="950" topLine="43" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="notification_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="8525" topLine="257" />
|
<Cursor1 position="15816" topLine="373" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="1759" topLine="61" />
|
<Cursor1 position="7273" topLine="217" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="11878" topLine="258" />
|
<Cursor1 position="524" topLine="954" />
|
||||||
</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="menu_screen.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="48" topLine="0" />
|
|
||||||
</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="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_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="firmware_version.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="160" topLine="0" />
|
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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">
|
||||||
@ -362,9 +182,114 @@
|
|||||||
<Cursor1 position="29532" topLine="611" />
|
<Cursor1 position="29532" topLine="611" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="compass_assets.c" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="0" topLine="143" />
|
<Cursor1 position="722" topLine="32" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="lvgl\src\core\lv_event.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="5365" topLine="214" />
|
||||||
|
</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\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\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\font\lv_font_montserrat_14.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2108" topLine="21" />
|
||||||
|
</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="11878" topLine="258" />
|
||||||
|
</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="971" topLine="3" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="menu_screen.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="350" topLine="0" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="watch_carbon_assets.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="3114203" topLine="961" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="lvgl\src\widgets\list\lv_list.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2391" topLine="53" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="watch_face_carbon.c" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="239" />
|
||||||
|
</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="settings_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="551" topLine="12" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="969" topLine="39" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="firmware_version.h" open="0" 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="menu_screen.c" open="0" top="0" tabpos="6" 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\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="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="3981" topLine="81" />
|
||||||
|
</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\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="6960" topLine="203" />
|
||||||
|
</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>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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">
|
||||||
@ -372,14 +297,204 @@
|
|||||||
<Cursor1 position="749" topLine="34" />
|
<Cursor1 position="749" topLine="34" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="579" topLine="17" />
|
<Cursor1 position="10562" topLine="336" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
<File name="common_screen_components.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<File name="compass_screen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="517" topLine="0" />
|
<Cursor1 position="1480" topLine="179" />
|
||||||
|
</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\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="1759" topLine="61" />
|
||||||
|
</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\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="10348" topLine="265" />
|
||||||
|
</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\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="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="altimeter_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2832" topLine="27" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="watch_face.h" open="0" top="0" tabpos="14" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="225" topLine="44" />
|
||||||
|
</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="5010" topLine="164" />
|
||||||
|
</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\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\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\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="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\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="settings_screen.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="38468" topLine="687" />
|
||||||
|
</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\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\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\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="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="notification_screen.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2362" topLine="39" />
|
||||||
|
</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\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_event.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2085" topLine="26" />
|
||||||
|
</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="1489" topLine="74" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="lv_conf.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="572" topLine="0" />
|
||||||
|
</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\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="watch_face.c.bck" open="0" top="0" tabpos="4" split="0" active="1" splitpos="702" zoom_1="0" zoom_2="-1">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="678" topLine="0" />
|
||||||
|
</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\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.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\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_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="242" />
|
||||||
|
</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="main.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="2731" topLine="141" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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">
|
||||||
@ -391,144 +506,44 @@
|
|||||||
<Collapse line="995" />
|
<Collapse line="995" />
|
||||||
</Folding>
|
</Folding>
|
||||||
</File>
|
</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="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="9479" topLine="300" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="main.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1743" topLine="54" />
|
|
||||||
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="3034" topLine="107" />
|
<Cursor1 position="3034" topLine="107" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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="10233" topLine="226" />
|
||||||
|
</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\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\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\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="10782" topLine="316" />
|
<Cursor1 position="10782" topLine="316" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<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>
|
<Cursor>
|
||||||
<Cursor1 position="2184" topLine="61" />
|
<Cursor1 position="5784" topLine="170" />
|
||||||
</Cursor>
|
</Cursor>
|
||||||
</File>
|
</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">
|
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
<Cursor>
|
<Cursor>
|
||||||
<Cursor1 position="0" topLine="15" />
|
<Cursor1 position="4372" topLine="104" />
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="watch_casio_assets.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="2981397" topLine="949" />
|
|
||||||
</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.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="498" topLine="21" />
|
|
||||||
</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\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\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_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_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="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\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="settings_screen.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1893" topLine="6" />
|
|
||||||
</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\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="5010" topLine="164" />
|
|
||||||
</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="6135" topLine="182" />
|
|
||||||
</Cursor>
|
|
||||||
</File>
|
|
||||||
<File name="notification_screen.c" open="1" top="1" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1528" topLine="15" />
|
|
||||||
</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.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="1102" topLine="35" />
|
|
||||||
</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.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
|
||||||
<Cursor>
|
|
||||||
<Cursor1 position="9615" topLine="246" />
|
|
||||||
</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="10255" topLine="265" />
|
|
||||||
</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>
|
</Cursor>
|
||||||
</File>
|
</File>
|
||||||
</CodeBlocks_layout_file>
|
</CodeBlocks_layout_file>
|
||||||
|
@ -12,7 +12,6 @@ static lv_obj_t *header_title[2] = {NULL, NULL};
|
|||||||
/* Pointer to the header_title to use */
|
/* Pointer to the header_title to use */
|
||||||
lv_obj_t **header_title_p = &header_title[0];
|
lv_obj_t **header_title_p = &header_title[0];
|
||||||
|
|
||||||
|
|
||||||
static void cleanup_event_cb(lv_event_t *e)
|
static void cleanup_event_cb(lv_event_t *e)
|
||||||
{
|
{
|
||||||
lv_obj_t **header_title_deleted_p = e->user_data;
|
lv_obj_t **header_title_deleted_p = e->user_data;
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "find_my_phone_screen.h"
|
#include "find_my_phone_screen.h"
|
||||||
#include "music_player_screen.h"
|
#include "music_player_screen.h"
|
||||||
|
|
||||||
#define array_size(array) (sizeof(array)/sizeof(array[0]))
|
|
||||||
|
|
||||||
static void item_container_scroll_event_cb(lv_event_t *e)
|
static void item_container_scroll_event_cb(lv_event_t *e)
|
||||||
{
|
{
|
||||||
lv_obj_t * item_container = lv_event_get_target(e);
|
lv_obj_t * item_container = lv_event_get_target(e);
|
||||||
@ -32,33 +30,30 @@ static void item_container_scroll_event_cb(lv_event_t *e)
|
|||||||
lv_coord_t diff_y = child_y_center - cont_y_center;
|
lv_coord_t diff_y = child_y_center - cont_y_center;
|
||||||
diff_y = LV_ABS(diff_y);
|
diff_y = LV_ABS(diff_y);
|
||||||
|
|
||||||
/*Get the x of diff_y on a circle.*/
|
// Get the x of diff_y on a circle.
|
||||||
lv_coord_t x;
|
lv_coord_t x;
|
||||||
/*If diff_y is out of the circle use the last point of the circle (the radius)*/
|
// If diff_y is out of the circle use the last point of the circle (the radius)
|
||||||
if(diff_y >= r)
|
if(diff_y >= r)
|
||||||
{
|
{
|
||||||
x = r;
|
x = r;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*Use Pythagoras theorem to get x from radius and y*/
|
// Use Pythagoras theorem to get x from radius and y
|
||||||
uint32_t x_sqr = r * r - diff_y * diff_y;
|
uint32_t x_sqr = r * r - diff_y * diff_y;
|
||||||
lv_sqrt_res_t res;
|
lv_sqrt_res_t res;
|
||||||
lv_sqrt(x_sqr, &res, 0x8000); /*Use lvgl's built in sqrt root function*/
|
lv_sqrt(x_sqr, &res, 0x8000); /*Use lvgl's built in sqrt root function*/
|
||||||
x = r - res.i;
|
x = r - res.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Translate the item by the calculated X coordinate*/
|
// Translate the item by the calculated X coordinate
|
||||||
lv_obj_set_style_translate_x(child, x, 0);
|
lv_obj_set_style_translate_x(child, x, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void menu_item_cb(lv_event_t *e)
|
static void simulate_menu_item_click(uint8_t menu_item_id)
|
||||||
{
|
{
|
||||||
uint64_t icon_id = (uint64_t)e->user_data;
|
switch(menu_item_id)
|
||||||
LV_LOG_USER("Menu icon pressed : %llu", icon_id);
|
|
||||||
|
|
||||||
switch(icon_id)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
@ -118,9 +113,45 @@ static void menu_item_cb(lv_event_t *e)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void menu_item_cb(lv_event_t *e)
|
||||||
|
{
|
||||||
|
lv_obj_t *item = lv_event_get_target(e);
|
||||||
|
uint64_t clicked_item_id = (uint64_t) lv_obj_get_user_data(item);
|
||||||
|
MenuScreen_t *menuScreen = (MenuScreen_t*) lv_event_get_user_data(e);
|
||||||
|
|
||||||
|
LV_LOG_USER("Menu item clicked : %llu", clicked_item_id);
|
||||||
|
|
||||||
|
menuScreen->lastClickedMenuItem = clicked_item_id;
|
||||||
|
|
||||||
|
// Give some user feedback that an item was clicked by calling the
|
||||||
|
// callback if one is registered
|
||||||
|
if(menuScreen->menuScreenUserFeedbackCb)
|
||||||
|
menuScreen->menuScreenUserFeedbackCb();
|
||||||
|
|
||||||
|
// Switch application depending on the clicked menu item id
|
||||||
|
simulate_menu_item_click(clicked_item_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void gesture_event_cb(lv_event_t *e)
|
||||||
|
{
|
||||||
|
MenuScreen_t *menuScreen = lv_event_get_user_data(e);
|
||||||
|
|
||||||
|
lv_dir_t gesture;
|
||||||
|
switch(gesture = lv_indev_get_gesture_dir(lv_indev_get_act()))
|
||||||
|
{
|
||||||
|
case LV_DIR_LEFT:
|
||||||
|
LV_LOG_USER("GESTURE : LEFT");
|
||||||
|
// Go back to the previously clicked application
|
||||||
|
simulate_menu_item_click(menuScreen->lastClickedMenuItem);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LV_LOG_USER("GESTURE : %u", gesture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void cleanup_event_cb(lv_event_t * e)
|
static void cleanup_event_cb(lv_event_t * e)
|
||||||
{
|
{
|
||||||
MenuScreen_t *menuScreen = e->user_data;
|
MenuScreen_t *menuScreen = lv_event_get_user_data(e);
|
||||||
menu_screen_destroy(menuScreen);
|
menu_screen_destroy(menuScreen);
|
||||||
LV_LOG_USER("cleanup");
|
LV_LOG_USER("cleanup");
|
||||||
}
|
}
|
||||||
@ -135,28 +166,40 @@ void menu_screen_init(MenuScreen_t * const menuScreen)
|
|||||||
memset(menuScreen, 0, sizeof(MenuScreen_t));
|
memset(menuScreen, 0, sizeof(MenuScreen_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void menu_screen_add_item(lv_obj_t *scroll_item_container, uint8_t position, const lv_img_dsc_t *itemImg,const char *itemTitle, lv_event_cb_t itemClickEventCb)
|
void menu_screen_register_user_feedback_cb(MenuScreen_t * const menuScreen, MenuScreenUserFeedbackCb_t menuScreenUserFeedbackCb)
|
||||||
|
{
|
||||||
|
if(!menuScreen)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
menuScreen->menuScreenUserFeedbackCb = menuScreenUserFeedbackCb;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void menu_screen_add_item(MenuScreen_t * const menuScreen, uint8_t position, const lv_img_dsc_t *itemImg,const char *itemTitle, lv_event_cb_t itemClickEventCb)
|
||||||
{
|
{
|
||||||
// We add the image button with the icon of the item
|
// We add the image button with the icon of the item
|
||||||
lv_obj_t *item_btn = lv_img_create(scroll_item_container);
|
lv_obj_t *item_btn = lv_img_create(menuScreen->scrollItemContainer);
|
||||||
lv_obj_set_user_data(item_btn, (void *)(uint32_t)position);
|
lv_obj_set_user_data(item_btn, (void *)(uint64_t)position);
|
||||||
lv_obj_set_size(item_btn, itemImg->header.w, itemImg->header.h);
|
lv_obj_set_size(item_btn, itemImg->header.w, itemImg->header.h);
|
||||||
lv_obj_add_flag(item_btn, LV_OBJ_FLAG_ADV_HITTEST | LV_OBJ_FLAG_CLICKABLE);
|
lv_obj_add_flag(item_btn, LV_OBJ_FLAG_ADV_HITTEST | LV_OBJ_FLAG_CLICKABLE);
|
||||||
const uint8_t left_margin = 10;
|
const uint8_t left_margin = 10;
|
||||||
lv_obj_set_pos(item_btn, left_margin, 52 * position);
|
lv_obj_set_pos(item_btn, left_margin, 52 * position);
|
||||||
//lv_imgbtn_set_src(item_btn, LV_IMGBTN_STATE_RELEASED, NULL, itemImg, NULL);
|
//lv_imgbtn_set_src(item_btn, LV_IMGBTN_STATE_RELEASED, NULL, itemImg, NULL);
|
||||||
lv_img_set_src(item_btn, itemImg);
|
lv_img_set_src(item_btn, itemImg);
|
||||||
lv_obj_add_event_cb(item_btn, itemClickEventCb, LV_EVENT_CLICKED, (void *)(uint64_t)position);
|
lv_obj_add_event_cb(item_btn, itemClickEventCb, LV_EVENT_CLICKED, (void *)menuScreen);
|
||||||
|
|
||||||
// We add the click-able label with the title of the item
|
// We add the click-able label with the title of the item
|
||||||
lv_obj_t *item_label = lv_label_create(scroll_item_container);
|
lv_obj_t *item_label = lv_label_create(menuScreen->scrollItemContainer);
|
||||||
|
lv_obj_set_user_data(item_label, (void *)(uint64_t)position);
|
||||||
lv_label_set_text_static(item_label, itemTitle);
|
lv_label_set_text_static(item_label, itemTitle);
|
||||||
lv_obj_set_style_text_font(item_label, &lv_font_montserrat_16, LV_PART_MAIN);
|
lv_obj_set_style_text_font(item_label, &lv_font_montserrat_16, LV_PART_MAIN);
|
||||||
lv_obj_set_pos(item_label, 42 + left_margin + 12, 15 + 52 * position);
|
lv_obj_set_pos(item_label, 42 + left_margin + 12, 15 + 52 * position);
|
||||||
lv_obj_set_style_text_color(item_label, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
lv_obj_set_style_text_color(item_label, lv_color_make(145, 145, 145), LV_PART_MAIN);
|
||||||
lv_obj_set_ext_click_area(item_label, 10);
|
lv_obj_set_ext_click_area(item_label, 10);
|
||||||
lv_obj_add_flag(item_label, LV_OBJ_FLAG_CLICKABLE);
|
lv_obj_add_flag(item_label, LV_OBJ_FLAG_CLICKABLE);
|
||||||
lv_obj_add_event_cb(item_label, itemClickEventCb, LV_EVENT_CLICKED , (void *)(uint64_t)position);
|
lv_obj_add_event_cb(item_label, itemClickEventCb, LV_EVENT_CLICKED , (void *)menuScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_screen_create(MenuScreen_t * const menuScreen)
|
void menu_screen_create(MenuScreen_t * const menuScreen)
|
||||||
@ -212,17 +255,20 @@ void menu_screen_create(MenuScreen_t * const menuScreen)
|
|||||||
|
|
||||||
lv_obj_add_event_cb(menuScreen->scrollItemContainer, &(item_container_scroll_event_cb), LV_EVENT_SCROLL, NULL);
|
lv_obj_add_event_cb(menuScreen->scrollItemContainer, &(item_container_scroll_event_cb), LV_EVENT_SCROLL, NULL);
|
||||||
|
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 0, &watch_menu_clock_icon, "Watch", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 0, &watch_menu_clock_icon, "Watch", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 1, &watch_menu_alarm_icon, "Alarm", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 1, &watch_menu_alarm_icon, "Alarm", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 2, &watch_menu_music_player_icon, "Music player", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 2, &watch_menu_music_player_icon, "Music player", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 3, &watch_menu_compass_icon, "Compass", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 3, &watch_menu_compass_icon, "Compass", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 4, &watch_menu_altimeter_icon, "Altimeter", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 4, &watch_menu_altimeter_icon, "Altimeter", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 5, &watch_menu_lost_phone_icon, "Find my phone", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 5, &watch_menu_lost_phone_icon, "Find my phone", &(menu_item_cb));
|
||||||
//menu_screen_add_item(scroll_item_container, 3, &watch_menu_messages_icon, "Text messages", &(menu_item_cb));
|
//menu_screen_add_item(scroll_item_container, 3, &watch_menu_messages_icon, "Text messages", &(menu_item_cb));
|
||||||
//menu_screen_add_item(scroll_item_container, 4, &watch_menu_mail_icon, "Mails", &(menu_item_cb));
|
//menu_screen_add_item(scroll_item_container, 4, &watch_menu_mail_icon, "Mails", &(menu_item_cb));
|
||||||
//menu_screen_add_item(scroll_item_container, 5, &watch_menu_dialer_icon, "Phone", &(menu_item_cb));
|
//menu_screen_add_item(scroll_item_container, 5, &watch_menu_dialer_icon, "Phone", &(menu_item_cb));
|
||||||
//menu_screen_add_item(scroll_item_container, 6, &watch_menu_contacts_icon, "Contacts", &(menu_item_cb));
|
//menu_screen_add_item(scroll_item_container, 6, &watch_menu_contacts_icon, "Contacts", &(menu_item_cb));
|
||||||
menu_screen_add_item(menuScreen->scrollItemContainer, 6, &watch_menu_settings_icon, "Settings", &(menu_item_cb));
|
menu_screen_add_item(menuScreen, 6, &watch_menu_settings_icon, "Settings", &(menu_item_cb));
|
||||||
|
|
||||||
|
// We register the event callback to handle the right to left swipe gesture
|
||||||
|
lv_obj_add_event_cb(menuScreen->display, &(gesture_event_cb), LV_EVENT_GESTURE, menuScreen);
|
||||||
|
|
||||||
// We register the event callback to handle the cleanup
|
// We register the event callback to handle the cleanup
|
||||||
lv_obj_add_event_cb(menuScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, menuScreen);
|
lv_obj_add_event_cb(menuScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, menuScreen);
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
|
|
||||||
|
typedef void (*MenuScreenUserFeedbackCb_t)(void);
|
||||||
|
|
||||||
// Menu screen context object
|
// Menu screen context object
|
||||||
typedef struct MenuScreen
|
typedef struct MenuScreen
|
||||||
{
|
{
|
||||||
@ -11,15 +13,40 @@ typedef struct MenuScreen
|
|||||||
lv_obj_t *scrollItemContainer;
|
lv_obj_t *scrollItemContainer;
|
||||||
// Should not be erased attributes
|
// Should not be erased attributes
|
||||||
lv_coord_t lastScrollPosition;
|
lv_coord_t lastScrollPosition;
|
||||||
|
MenuScreenUserFeedbackCb_t menuScreenUserFeedbackCb;
|
||||||
|
uint8_t lastClickedMenuItem;
|
||||||
} MenuScreen_t;
|
} MenuScreen_t;
|
||||||
|
|
||||||
/* Initializes the menu screen context object */
|
/**
|
||||||
|
* @brief Initializes the menu screen's context object.
|
||||||
|
* @note This function has to be called first before any others.
|
||||||
|
*
|
||||||
|
* @param menuScreen a pointer to the menu screen's context structure to initialize.
|
||||||
|
*/
|
||||||
void menu_screen_init(MenuScreen_t * const menuScreen);
|
void menu_screen_init(MenuScreen_t * const menuScreen);
|
||||||
|
|
||||||
/* Builds the menu screen graphically */
|
/**
|
||||||
|
* @brief Registers a callback functions which will be called every time a user feedback should
|
||||||
|
* be made. In this case, every time a menu item is clicked, the callback will be called.
|
||||||
|
* This enables the app to react to this user event.
|
||||||
|
*
|
||||||
|
* @param menuScreen a pointer to the previously initialized menu screen's context structure.
|
||||||
|
* @param menuScreenUserFeedbackCb a pointer to a function having the following signature : void(void).
|
||||||
|
*/
|
||||||
|
void menu_screen_register_user_feedback_cb(MenuScreen_t * const menuScreen, MenuScreenUserFeedbackCb_t menuScreenUserFeedbackCb);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Graphically builds the menu screen.
|
||||||
|
*
|
||||||
|
* @param menuScreen a pointer to the previously initialized menu screen's context structure.
|
||||||
|
*/
|
||||||
void menu_screen_create(MenuScreen_t * const menuScreen);
|
void menu_screen_create(MenuScreen_t * const menuScreen);
|
||||||
|
|
||||||
/* Frees all resources used by the MenuScreen object */
|
/**
|
||||||
|
* @brief Frees all resources (GUI and others) used by the MenuScreen_t object.
|
||||||
|
*
|
||||||
|
* @param menuScreen a pointer to the previously initialized menu screen's context structure.
|
||||||
|
*/
|
||||||
void menu_screen_destroy(MenuScreen_t * const menuScreen);
|
void menu_screen_destroy(MenuScreen_t * const menuScreen);
|
||||||
|
|
||||||
#endif //MENU_SCREEN_H
|
#endif //MENU_SCREEN_H
|
||||||
|
@ -651,6 +651,7 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
|
|||||||
settingsScreen->display_item = add_menu_list_item(menu_list, "Display", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_DISPLAY);
|
settingsScreen->display_item = add_menu_list_item(menu_list, "Display", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_DISPLAY);
|
||||||
settingsScreen->notifications_item = add_menu_list_item(menu_list, "Notifications", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_NOTIFICATION);
|
settingsScreen->notifications_item = add_menu_list_item(menu_list, "Notifications", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_NOTIFICATION);
|
||||||
settingsScreen->connectivity_item = add_menu_list_item(menu_list, "Connectivity", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_CONNECTIVITY);
|
settingsScreen->connectivity_item = add_menu_list_item(menu_list, "Connectivity", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_CONNECTIVITY);
|
||||||
|
settingsScreen->sensors_item = add_menu_list_item(menu_list, "Sensors", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_SENSORS);
|
||||||
settingsScreen->language_item = add_menu_list_item(menu_list, "Language", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_LANGUAGE);
|
settingsScreen->language_item = add_menu_list_item(menu_list, "Language", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_LANGUAGE);
|
||||||
settingsScreen->about_item = add_menu_list_item(menu_list, "About", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_ABOUT);
|
settingsScreen->about_item = add_menu_list_item(menu_list, "About", &(menu_list_item_event_handler), settingsScreen, SETTINGS_SCREEN_CATEGORY_ABOUT);
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ typedef enum SettingsScreenCategory
|
|||||||
SETTINGS_SCREEN_CATEGORY_DISPLAY,
|
SETTINGS_SCREEN_CATEGORY_DISPLAY,
|
||||||
SETTINGS_SCREEN_CATEGORY_NOTIFICATION,
|
SETTINGS_SCREEN_CATEGORY_NOTIFICATION,
|
||||||
SETTINGS_SCREEN_CATEGORY_CONNECTIVITY,
|
SETTINGS_SCREEN_CATEGORY_CONNECTIVITY,
|
||||||
|
SETTINGS_SCREEN_CATEGORY_SENSORS,
|
||||||
SETTINGS_SCREEN_CATEGORY_LANGUAGE,
|
SETTINGS_SCREEN_CATEGORY_LANGUAGE,
|
||||||
SETTINGS_SCREEN_CATEGORY_ABOUT,
|
SETTINGS_SCREEN_CATEGORY_ABOUT,
|
||||||
} SettingsScreenCategory_e;
|
} SettingsScreenCategory_e;
|
||||||
@ -34,6 +35,7 @@ typedef struct SettingsScreen
|
|||||||
lv_obj_t *display_item;
|
lv_obj_t *display_item;
|
||||||
lv_obj_t *notifications_item;
|
lv_obj_t *notifications_item;
|
||||||
lv_obj_t *connectivity_item;
|
lv_obj_t *connectivity_item;
|
||||||
|
lv_obj_t *sensors_item;
|
||||||
lv_obj_t *language_item;
|
lv_obj_t *language_item;
|
||||||
lv_obj_t *about_item;
|
lv_obj_t *about_item;
|
||||||
/* Remember the last clicked item needed for the background color logic */
|
/* Remember the last clicked item needed for the background color logic */
|
||||||
|
2478
src/lvgl_win_sim/lv_port_win_codeblocks/watch_carbon_assets.c
Normal file
2478
src/lvgl_win_sim/lv_port_win_codeblocks/watch_carbon_assets.c
Normal file
File diff suppressed because one or more lines are too long
568
src/lvgl_win_sim/lv_port_win_codeblocks/watch_face_carbon.c
Normal file
568
src/lvgl_win_sim/lv_port_win_codeblocks/watch_face_carbon.c
Normal file
@ -0,0 +1,568 @@
|
|||||||
|
#include "lvgl.h"
|
||||||
|
#include "watch_face.h"
|
||||||
|
#include "menu_screen.h"
|
||||||
|
#include "notification_screen.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
lv_dir_t gesture;
|
||||||
|
switch(gesture = lv_indev_get_gesture_dir(lv_indev_get_act()))
|
||||||
|
{
|
||||||
|
case LV_DIR_LEFT:
|
||||||
|
LV_LOG_USER("GESTURE : LEFT");
|
||||||
|
break;
|
||||||
|
case LV_DIR_RIGHT:
|
||||||
|
LV_LOG_USER("GESTURE : RIGHT");
|
||||||
|
// We delete the timer
|
||||||
|
lv_timer_del(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||||
|
lv_timer_del(watchFace->handAnimationTimer);
|
||||||
|
// We create the menu screen and switch to it
|
||||||
|
extern MenuScreen_t menuScreen;
|
||||||
|
menu_screen_create(&menuScreen);
|
||||||
|
lv_scr_load_anim(menuScreen.display, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 400, 0, true);
|
||||||
|
break;
|
||||||
|
case LV_DIR_TOP:
|
||||||
|
LV_LOG_USER("GESTURE : TOP");
|
||||||
|
break;
|
||||||
|
case LV_DIR_BOTTOM:
|
||||||
|
LV_LOG_USER("GESTURE : BOTTOM");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LV_LOG_USER("GESTURE : %u", gesture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void cleanup_event_cb(lv_event_t * e)
|
||||||
|
{
|
||||||
|
WatchFace_t *watchFace = e->user_data;
|
||||||
|
watch_face_destroy(watchFace);
|
||||||
|
LV_LOG_USER("cleanup");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t increment)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//We retrieve the current time:
|
||||||
|
if(watchFace->dateTimeCb)
|
||||||
|
{
|
||||||
|
//We compute each hand angle
|
||||||
|
if(0)//(!increment || watchFace->secondHand.handAngle >= 3660 /*|| (int)watchFace->secondHand.handAngle % 100 > 50*/)
|
||||||
|
{
|
||||||
|
watchFace->dateTimeCb(&watchFace->dateTime);
|
||||||
|
watchFace->secondHand.handAngle = 60 * watchFace->dateTime.tm_sec;
|
||||||
|
|
||||||
|
//Don't forget to update the day date window
|
||||||
|
sprintf(watchFace->dateWindow.dateWindowText, "%d", watchFace->dateTime.tm_mday);
|
||||||
|
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
|
||||||
|
|
||||||
|
if(watchFace->batteryIndicatorCb)
|
||||||
|
{
|
||||||
|
uint8_t levelInPercent = 0;
|
||||||
|
BatteryState_e batteryState = BATTERY_STATE_DISCHARGING;
|
||||||
|
watchFace->batteryIndicatorCb(&levelInPercent, &batteryState);
|
||||||
|
watch_face_set_battery_indicator(watchFace, levelInPercent, batteryState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
watchFace->secondHand.handAngle += (uint32_t)increment*15;//increment;//
|
||||||
|
}
|
||||||
|
watchFace->minuteHand.handAngle = 60 * watchFace->dateTime.tm_min + watchFace->secondHand.handAngle / 60;
|
||||||
|
watchFace->hourHand.handAngle = 300 * watchFace->dateTime.tm_hour + watchFace->minuteHand.handAngle / 12;
|
||||||
|
watchFace->mediumHand24h.handAngle = watchFace->hourHand.handAngle / 2;
|
||||||
|
LV_LOG_USER("angle : %f", watchFace->secondHand.handAngle);
|
||||||
|
|
||||||
|
//We update the angle
|
||||||
|
lv_img_set_angle(watchFace->secondHand.handImg, (uint16_t) watchFace->secondHand.handAngle % 3600);
|
||||||
|
lv_img_set_angle(watchFace->minuteHand.handImg, (uint16_t) watchFace->minuteHand.handAngle % 3600);
|
||||||
|
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 **/
|
||||||
|
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
|
||||||
|
{
|
||||||
|
LV_LOG_USER("DateTimeCb is NULL, be sure to register a callback !");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hand_timer_anim_cb(lv_timer_t *timer)
|
||||||
|
{
|
||||||
|
WatchFace_t *watchFace = timer->user_data;
|
||||||
|
update_watch_hands_angles(watchFace, 255/*12*/);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void battery_timer_anim_cb(lv_timer_t *timer)
|
||||||
|
{
|
||||||
|
WatchFace_t *watchFace = timer->user_data;
|
||||||
|
|
||||||
|
if(lv_obj_has_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN))
|
||||||
|
{
|
||||||
|
lv_obj_clear_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_add_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
default:
|
||||||
|
lv_obj_add_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
lv_img_set_src(watchFace->batteryIndicator.batteryIcon, &battery_low_icon);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hide_hour_and_minutes_hand_cb(lv_event_t *e)
|
||||||
|
{
|
||||||
|
WatchFace_t *watchFace = e->user_data;
|
||||||
|
|
||||||
|
if(255 == lv_obj_get_style_opa(watchFace->hourHand.handImg, LV_PART_MAIN))
|
||||||
|
{
|
||||||
|
lv_obj_set_style_opa(watchFace->hourHand.handImg, 120, LV_PART_MAIN);
|
||||||
|
lv_obj_set_style_opa(watchFace->minuteHand.handImg, 120, LV_PART_MAIN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lv_obj_set_style_opa(watchFace->hourHand.handImg, 255, LV_PART_MAIN);
|
||||||
|
lv_obj_set_style_opa(watchFace->minuteHand.handImg, 255, LV_PART_MAIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*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);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//Just for testing purposes, create a new notification
|
||||||
|
char *title = malloc(strlen("JoeJohny John")+1);
|
||||||
|
strcpy(title, "JoeJohny John");
|
||||||
|
|
||||||
|
char *body = malloc(300+1);
|
||||||
|
char test[] = "aéb";
|
||||||
|
strcpy(body, "Héy what's up dude ? What are you doing tonight ?\
|
||||||
|
Wanna go to the fair with me ?\
|
||||||
|
This is a quite long message I agree, but it is important\
|
||||||
|
to let you know what I do for me and you bro !");
|
||||||
|
|
||||||
|
extern NotificationScreen_t notificationScreen;
|
||||||
|
notification_screen_notify(¬ificationScreen, 1696358171, time(NULL) + 3600*2, NOTIFICATION_TYPE_GADGET_BRIDGE, title, body);
|
||||||
|
LV_LOG_USER("unread(%u)/ total(%u)", notification_screen_unread_notification_count(¬ificationScreen), notification_screen_notification_count(¬ificationScreen));
|
||||||
|
}
|
||||||
|
|
||||||
|
void watch_face_init(WatchFace_t * const watchFace)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->dateTimeCb = dateTimeCb;
|
||||||
|
}
|
||||||
|
|
||||||
|
void watch_face_create(WatchFace_t * const watchFace)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//We declare the needed assets for the watch face:
|
||||||
|
LV_IMG_DECLARE(watch_carbon_face_asset)
|
||||||
|
LV_IMG_DECLARE(watch_carbon_hour_hand_asset)
|
||||||
|
LV_IMG_DECLARE(watch_carbon_minute_hand_asset)
|
||||||
|
LV_IMG_DECLARE(watch_carbon_second_hand_asset)
|
||||||
|
LV_IMG_DECLARE(watch_carbon_medium_hand_asset)
|
||||||
|
LV_IMG_DECLARE(watch_casio_small_hand_asset)
|
||||||
|
LV_IMG_DECLARE(bluetooth_icon)
|
||||||
|
|
||||||
|
//We create our parent screen :
|
||||||
|
if(watchFace->display)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("display should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->display);
|
||||||
|
watchFace->display = NULL;
|
||||||
|
}
|
||||||
|
//Our display is the watch face image :
|
||||||
|
watchFace->display = lv_img_create(NULL);
|
||||||
|
lv_img_set_src(watchFace->display, &watch_carbon_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_img_set_src(smallHandImg, &watch_casio_small_hand_asset);
|
||||||
|
lv_obj_set_pos(smallHandImg, 69, 98);
|
||||||
|
lv_img_set_pivot(smallHandImg, 4, 20);*/
|
||||||
|
|
||||||
|
//Battery arc is created here
|
||||||
|
if(watchFace->batteryIndicator.batteryArc)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("batteryArc should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->batteryIndicator.batteryArc);
|
||||||
|
watchFace->batteryIndicator.batteryArc = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->batteryIndicator.batteryArc = lv_arc_create(watchFace->display);
|
||||||
|
lv_obj_remove_style(watchFace->batteryIndicator.batteryArc, NULL, LV_PART_KNOB);
|
||||||
|
lv_obj_clear_flag(watchFace->batteryIndicator.batteryArc, LV_OBJ_FLAG_CLICKABLE);
|
||||||
|
lv_obj_set_size(watchFace->batteryIndicator.batteryArc, 60, 60);
|
||||||
|
lv_obj_align(watchFace->batteryIndicator.batteryArc, LV_ALIGN_CENTER, 0, 44);
|
||||||
|
lv_obj_set_style_arc_width(watchFace->batteryIndicator.batteryArc, 5, LV_PART_INDICATOR);
|
||||||
|
lv_obj_set_style_arc_width(watchFace->batteryIndicator.batteryArc, 0, LV_PART_MAIN);
|
||||||
|
lv_obj_set_style_arc_color(watchFace->batteryIndicator.batteryArc, lv_color_make(228, 233, 236), LV_PART_INDICATOR);
|
||||||
|
lv_arc_set_value(watchFace->batteryIndicator.batteryArc, 100);
|
||||||
|
|
||||||
|
if(watchFace->batteryIndicator.label)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("battery_label should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->batteryIndicator.label);
|
||||||
|
watchFace->batteryIndicator.label = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->batteryIndicator.label = lv_label_create(watchFace->display);
|
||||||
|
strcpy(watchFace->batteryIndicator.text, "100 %");
|
||||||
|
lv_label_set_text_static(watchFace->batteryIndicator.label, watchFace->batteryIndicator.text);
|
||||||
|
lv_obj_set_style_text_color(watchFace->batteryIndicator.label, lv_color_white(), LV_PART_MAIN);
|
||||||
|
lv_obj_align_to(watchFace->batteryIndicator.label, watchFace->batteryIndicator.batteryArc, LV_ALIGN_CENTER, 0, -5);
|
||||||
|
|
||||||
|
// Battery icon is created here
|
||||||
|
if(watchFace->batteryIndicator.batteryIcon)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("batteryIcon should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->batteryIndicator.batteryIcon);
|
||||||
|
watchFace->batteryIndicator.batteryIcon = NULL;
|
||||||
|
}
|
||||||
|
watchFace->batteryIndicator.batteryIcon = lv_img_create(watchFace->display);
|
||||||
|
|
||||||
|
if(watchFace->batteryIndicator.lowBatteryAnimationTimer)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("battery animation timer should be NULL here !");
|
||||||
|
lv_timer_del(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||||
|
watchFace->batteryIndicator.lowBatteryAnimationTimer = NULL;
|
||||||
|
}
|
||||||
|
watchFace->batteryIndicator.lowBatteryAnimationTimer = lv_timer_create(&(battery_timer_anim_cb), 500, watchFace);
|
||||||
|
lv_timer_pause(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||||
|
|
||||||
|
// set_battery_state_icon internally needs to interact with the lowBatteryAnimationTimer,
|
||||||
|
// this is why we call the function after the timer has been created
|
||||||
|
set_battery_state_icon(watchFace);
|
||||||
|
lv_img_set_zoom(watchFace->batteryIndicator.batteryIcon, 141);
|
||||||
|
lv_obj_align_to(watchFace->batteryIndicator.batteryIcon, watchFace->batteryIndicator.label, LV_ALIGN_OUT_BOTTOM_MID, 0, -12);
|
||||||
|
|
||||||
|
// 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, 50, 111);
|
||||||
|
|
||||||
|
if(watchFace->mediumHand24h.handImg)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("mediumHand24hImg should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->mediumHand24h.handImg);
|
||||||
|
watchFace->mediumHand24h.handImg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->mediumHand24h.handImg = lv_img_create(watchFace->display);
|
||||||
|
lv_img_set_src(watchFace->mediumHand24h.handImg, &watch_carbon_medium_hand_asset);
|
||||||
|
lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 51);
|
||||||
|
lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 26);
|
||||||
|
|
||||||
|
/*lv_obj_t *mediumHandChronoImg = lv_img_create(watchFace->display);
|
||||||
|
lv_img_set_src(mediumHandChronoImg, &watch_casio_medium_hand_asset);
|
||||||
|
lv_obj_set_pos(mediumHandChronoImg, 115, 140);
|
||||||
|
lv_img_set_pivot(mediumHandChronoImg, 4, 25);*/
|
||||||
|
|
||||||
|
//Date window is created here
|
||||||
|
if(watchFace->dateWindow.dateWindowWidget)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("dateWindowWidget should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->dateWindow.dateWindowWidget);
|
||||||
|
watchFace->dateWindow.dateWindowWidget = NULL;
|
||||||
|
}
|
||||||
|
watchFace->dateWindow.dateWindowWidget = lv_label_create(watchFace->display);
|
||||||
|
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
|
||||||
|
lv_obj_set_pos(watchFace->dateWindow.dateWindowWidget, 168,111);
|
||||||
|
lv_obj_set_width(watchFace->dateWindow.dateWindowWidget, 20);
|
||||||
|
lv_obj_set_style_text_align(watchFace->dateWindow.dateWindowWidget, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
|
||||||
|
lv_obj_set_style_text_color(watchFace->dateWindow.dateWindowWidget, lv_color_white(), LV_PART_MAIN);
|
||||||
|
|
||||||
|
if(watchFace->hourHand.handImg)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("hourHandImg should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->hourHand.handImg);
|
||||||
|
watchFace->hourHand.handImg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->hourHand.handImg = lv_img_create(watchFace->display);
|
||||||
|
lv_img_set_src(watchFace->hourHand.handImg, &watch_carbon_hour_hand_asset);
|
||||||
|
lv_obj_set_pos(watchFace->hourHand.handImg, 113, 57);
|
||||||
|
lv_img_set_pivot(watchFace->hourHand.handImg, 6, 62);
|
||||||
|
|
||||||
|
if(watchFace->minuteHand.handImg)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("minuteHandImg should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->minuteHand.handImg);
|
||||||
|
watchFace->minuteHand.handImg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->minuteHand.handImg = lv_img_create(watchFace->display);
|
||||||
|
lv_img_set_src(watchFace->minuteHand.handImg, &watch_carbon_minute_hand_asset);
|
||||||
|
lv_obj_set_pos(watchFace->minuteHand.handImg, 113, 14);
|
||||||
|
lv_img_set_pivot(watchFace->minuteHand.handImg, 6, 105);
|
||||||
|
|
||||||
|
if(watchFace->secondHand.handImg)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("secondHandImg should be NULL here !");
|
||||||
|
lv_obj_del(watchFace->secondHand.handImg);
|
||||||
|
watchFace->secondHand.handImg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->secondHand.handImg = lv_img_create(watchFace->display);
|
||||||
|
lv_img_set_src(watchFace->secondHand.handImg, &watch_carbon_second_hand_asset);
|
||||||
|
lv_obj_set_pos(watchFace->secondHand.handImg, 115, -1);
|
||||||
|
lv_img_set_pivot(watchFace->secondHand.handImg, 4, 120);
|
||||||
|
|
||||||
|
//We set the appropriate angles to each of the hands
|
||||||
|
update_watch_hands_angles(watchFace, 0);
|
||||||
|
|
||||||
|
//Don't forget to make the background image clickable to be able to use gestures on it.
|
||||||
|
lv_obj_add_flag(watchFace->display, LV_OBJ_FLAG_CLICKABLE);
|
||||||
|
|
||||||
|
//We register the event callback to handle gestures
|
||||||
|
lv_obj_add_event_cb(watchFace->display, &(gesture_event_cb), LV_EVENT_GESTURE, watchFace);
|
||||||
|
//We register the event callback to handle the cleanup
|
||||||
|
lv_obj_add_event_cb(watchFace->display, &(cleanup_event_cb), LV_EVENT_DELETE, watchFace);
|
||||||
|
|
||||||
|
//We create the timer to run the watch animations
|
||||||
|
if(watchFace->handAnimationTimer)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("handAnimationTimer should be NULL here !");
|
||||||
|
lv_timer_del(watchFace->handAnimationTimer);
|
||||||
|
watchFace->handAnimationTimer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->handAnimationTimer = lv_timer_create(&(hand_timer_anim_cb), /*200*/1, watchFace);
|
||||||
|
}
|
||||||
|
|
||||||
|
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t levelInPercent, BatteryState_e batteryState)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!watchFace->display) return;
|
||||||
|
|
||||||
|
lv_color_t arc_color = lv_color_make(228, 233, 236);
|
||||||
|
|
||||||
|
if(levelInPercent <= 10)
|
||||||
|
arc_color = lv_color_make(228, 33, 81);
|
||||||
|
else if(levelInPercent <= 30)
|
||||||
|
arc_color = lv_color_make(247, 148, 29);
|
||||||
|
else if(levelInPercent <= 50)
|
||||||
|
arc_color = lv_color_make(226, 175, 58);
|
||||||
|
|
||||||
|
lv_arc_set_value(watchFace->batteryIndicator.batteryArc, levelInPercent);
|
||||||
|
lv_obj_set_style_arc_color(watchFace->batteryIndicator.batteryArc, arc_color, LV_PART_INDICATOR);
|
||||||
|
sprintf(watchFace->batteryIndicator.text, "%u %%", levelInPercent);
|
||||||
|
lv_label_set_text_static(watchFace->batteryIndicator.label, watchFace->batteryIndicator.text);
|
||||||
|
lv_obj_align_to(watchFace->batteryIndicator.label, watchFace->batteryIndicator.batteryArc, LV_ALIGN_CENTER, 0, -5);
|
||||||
|
|
||||||
|
//We save the new battery state only if it's different, this allows to have a trigger when it changes :
|
||||||
|
if(watchFace->batteryIndicator.batteryState != batteryState)
|
||||||
|
{
|
||||||
|
watchFace->batteryIndicator.batteryState = batteryState;
|
||||||
|
set_battery_state_icon(watchFace);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Finally we check if it's time to show the battery low indicator by enabling it's timer
|
||||||
|
if(levelInPercent <= 10 && watchFace->batteryIndicator.batteryState == BATTERY_STATE_DISCHARGING)
|
||||||
|
{
|
||||||
|
lv_timer_resume(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||||
|
}
|
||||||
|
else if(watchFace->batteryIndicator.batteryState == BATTERY_STATE_DISCHARGING)
|
||||||
|
{
|
||||||
|
lv_timer_pause(watchFace->batteryIndicator.lowBatteryAnimationTimer);
|
||||||
|
lv_obj_add_flag(watchFace->batteryIndicator.batteryIcon, LV_OBJ_FLAG_HIDDEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFace->display = NULL;
|
||||||
|
watchFace->handAnimationTimer = NULL;
|
||||||
|
watchFace->dateWindow.dateWindowWidget = NULL;
|
||||||
|
watchFace->hourHand.handImg = NULL;
|
||||||
|
watchFace->minuteHand.handImg = NULL;
|
||||||
|
watchFace->secondHand.handImg = NULL;
|
||||||
|
watchFace->mediumHand24h.handImg = NULL;
|
||||||
|
watchFace->batteryIndicator.batteryArc = NULL;
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if(!watchFace)
|
||||||
|
{
|
||||||
|
LV_LOG_ERROR("NULL pointer given !");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!watchFace->display) return;
|
||||||
|
|
||||||
|
update_watch_hands_angles(watchFace, 0);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user