Updated lvgl simulator

This commit is contained in:
anschrammh 2023-12-18 23:36:46 +01:00
parent 8de0a7a59c
commit 4d8b0d359d
9 changed files with 1540 additions and 1993 deletions

View File

@ -1661,7 +1661,6 @@
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="notification_screen.h" /> <Unit filename="notification_screen.h" />
<Unit filename="rsrc/hour_hand.png" />
<Unit filename="settings_screen.c"> <Unit filename="settings_screen.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
@ -1675,11 +1674,6 @@
<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"> <Unit filename="watch_face_carbon.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />

View File

@ -2,9 +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="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="menu_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1563" topLine="27" /> <Cursor1 position="527" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="29532" topLine="611" />
</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> </Cursor>
</File> </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"> <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">
@ -12,64 +22,9 @@
<Cursor1 position="715" topLine="26" /> <Cursor1 position="715" topLine="26" />
</Cursor> </Cursor>
</File> </File>
<File name="watch_casio_assets.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="watch_face_carbon.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="99" topLine="968" /> <Cursor1 position="0" topLine="239" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_fmt_txt.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1135" topLine="14" />
</Cursor>
</File>
<File name="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="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\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>
</File>
<File name="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1234" topLine="30" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6210" topLine="113" />
</Cursor>
</File>
<File name="lvgl\src\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> </Cursor>
</File> </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"> <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">
@ -77,19 +32,84 @@
<Cursor1 position="5230" topLine="191" /> <Cursor1 position="5230" topLine="191" />
</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">
<Cursor>
<Cursor1 position="5535" topLine="120" />
</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="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_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="music_player_screen.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1263" topLine="38" />
</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="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="lvgl\src\misc\lv_timer.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5053" topLine="144" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2082" topLine="62" />
</Cursor>
</File>
<File name="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\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\widgets\imgbtn\lv_imgbtn.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="2184" topLine="61" />
</Cursor> </Cursor>
</File> </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\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="20039" topLine="604" /> <Cursor1 position="10233" topLine="226" />
</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="settings_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="579" topLine="17" /> <Cursor1 position="551" topLine="12" />
</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="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="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> </Cursor>
</File> </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"> <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">
@ -97,9 +117,114 @@
<Cursor1 position="2447" topLine="75" /> <Cursor1 position="2447" topLine="75" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="721" topLine="16" /> <Cursor1 position="0" topLine="22" />
</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_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\widgets\menu\lv_menu.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3321" topLine="109" />
</Cursor>
</File>
<File name="lvgl\src\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\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\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="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\widgets\spinbox\lv_spinbox.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4262" topLine="120" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="749" topLine="34" />
</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_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="watch_casio_assets.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="99" topLine="968" />
</Cursor>
</File>
<File name="notification_screen.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="655" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="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\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\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1135" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\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="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="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\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> </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">
@ -127,149 +252,19 @@
<Collapse line="1729" /> <Collapse line="1729" />
</Folding> </Folding>
</File> </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"> <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="9479" topLine="300" /> <Cursor1 position="20039" topLine="604" />
</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="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> <Cursor>
<Cursor1 position="1263" topLine="38" /> <Cursor1 position="869" topLine="0" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="3011" topLine="100" /> <Cursor1 position="6135" topLine="182" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3097" topLine="74" />
</Cursor>
</File>
<File name="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="496" 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="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="notification_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="15816" topLine="373" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7273" topLine="217" />
</Cursor>
</File>
<File name="lv_drivers\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_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="29532" topLine="611" />
</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\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> </Cursor>
</File> </File>
<File name="compass_screen.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="compass_screen.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -277,14 +272,163 @@
<Cursor1 position="3981" topLine="81" /> <Cursor1 position="3981" topLine="81" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="585" topLine="0" /> <Cursor1 position="2825" topLine="122" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="6960" topLine="203" /> <Cursor1 position="11123" topLine="327" />
</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\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6210" topLine="113" />
</Cursor>
</File>
<File name="lvgl\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.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="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\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\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\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="main.c" open="1" top="1" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4911" topLine="160" />
</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="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\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="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="lvgl\src\font\lv_font_fmt_txt.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_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_drivers\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1563" topLine="27" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7273" topLine="217" />
</Cursor>
</File>
<File name="lvgl\src\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="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="lvgl\src\widgets\tileview\lv_tileview.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1055" topLine="40" />
</Cursor>
<Folding>
<Collapse line="8" />
<Collapse line="995" />
</Folding>
</File>
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5784" topLine="170" />
</Cursor>
</File>
<File name="lv_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\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3034" topLine="107" />
</Cursor>
</File>
<File name="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="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_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="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="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="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1234" topLine="30" />
</Cursor> </Cursor>
</File> </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"> <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">
@ -292,24 +436,59 @@
<Cursor1 position="0" topLine="56" /> <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="notification_screen.c" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="749" topLine="34" /> <Cursor1 position="4989" topLine="92" />
</Cursor> </Cursor>
</File> </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"> <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="10562" topLine="336" /> <Cursor1 position="3097" topLine="74" />
</Cursor> </Cursor>
</File> </File>
<File name="compass_screen.c" open="0" top="0" tabpos="7" 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="1480" topLine="179" /> <Cursor1 position="1081" topLine="138" />
</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\lvgl.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="15" /> <Cursor1 position="0" topLine="138" />
</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\lv_api_map.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="722" topLine="32" />
</Cursor>
</File>
<File name="lv_drivers\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\layouts\grid\lv_grid.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="579" topLine="17" />
</Cursor>
</File>
<File name="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\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10782" topLine="316" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_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> </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\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -322,228 +501,49 @@
<Cursor1 position="3706" topLine="117" /> <Cursor1 position="3706" topLine="117" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="1282774" topLine="472" /> <Cursor1 position="1282774" topLine="472" />
</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">
<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"> <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> <Cursor>
<Cursor1 position="5065" topLine="123" /> <Cursor1 position="5065" topLine="123" />
</Cursor> </Cursor>
</File> </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"> <File name="common_screen_components.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="9059" topLine="242" /> <Cursor1 position="496" topLine="0" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="539" topLine="9" /> <Cursor1 position="5365" topLine="214" />
</Cursor> </Cursor>
</File> </File>
<File name="main.c" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <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> <Cursor>
<Cursor1 position="2731" topLine="141" /> <Cursor1 position="11878" topLine="258" />
</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="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> <Cursor>
<Cursor1 position="1055" topLine="40" /> <Cursor1 position="10670" topLine="390" />
</Cursor>
<Folding>
<Collapse line="8" />
<Collapse line="995" />
</Folding>
</File>
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3034" topLine="107" />
</Cursor> </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"> <File name="watch_face.c" open="1" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="10233" topLine="226" /> <Cursor1 position="388" topLine="204" />
</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\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> <Cursor>
<Cursor1 position="456" topLine="6" /> <Cursor1 position="181" topLine="0" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="7631" topLine="141" /> <Cursor1 position="1863" topLine="59" />
</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">
<Cursor>
<Cursor1 position="10782" topLine="316" />
</Cursor>
</File>
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5784" topLine="170" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_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> </Cursor>
</File> </File>
</CodeBlocks_layout_file> </CodeBlocks_layout_file>

View File

@ -76,6 +76,19 @@ static void compass_screen_on_state_change_cb(CompassScreenState_e compassScreen
} }
} }
static void notification_screen_on_state_change_cb(NotificationState_e notificationState, uint32_t notification_handle)
{
switch(notificationState)
{
case NOTIFICATION_STATE_CLEARED:
LV_LOG_USER("Notification %u cleared !", notification_handle);
break;
case NOTIFICATION_STATE_DISPLAYED:
LV_LOG_USER("Notification %u displayed !", notification_handle);
break;
}
}
static void azimuth_and_temperature_cb(uint16_t *azimuth, float *temperature) static void azimuth_and_temperature_cb(uint16_t *azimuth, float *temperature)
{ {
static uint16_t _azimuth = 0; static uint16_t _azimuth = 0;
@ -153,6 +166,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi
altimeter_screen_init(&altimeterScreen); altimeter_screen_init(&altimeterScreen);
altimeter_screen_register_measurement_cb(&altimeterScreen, &(alti_meas_cb)); altimeter_screen_register_measurement_cb(&altimeterScreen, &(alti_meas_cb));
notification_screen_init(&notificationScreen); notification_screen_init(&notificationScreen);
notification_screen_register_on_state_change_cb(&notificationScreen, &(notification_screen_on_state_change_cb));
notification_screen_set_displayed_hour_format(&notificationScreen, true);
find_my_phone_screen_init(&findMyPhoneScreen); find_my_phone_screen_init(&findMyPhoneScreen);
find_my_phone_screen_register_BLE_command_send_cb(&findMyPhoneScreen, &(sendMyFindPhoneBLECommandCb)); find_my_phone_screen_register_BLE_command_send_cb(&findMyPhoneScreen, &(sendMyFindPhoneBLECommandCb));
find_my_phone_screen_notify_BLE_connection_state(&findMyPhoneScreen, true); find_my_phone_screen_notify_BLE_connection_state(&findMyPhoneScreen, true);
@ -170,7 +185,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi
lv_scr_load(watchFace.display); lv_scr_load(watchFace.display);
watch_face_set_step_count(&watchFace, 10258); watch_face_set_step_count_indicator(&watchFace, 10258);
//settings_screen(); //settings_screen();

View File

@ -15,7 +15,7 @@ void _notification_list_debug(NotificationDataList_t notificationList);
void _display_message_notification(NotificationScreen_t * const notificationScreen, NotificationData_t *notification); void _display_message_notification(NotificationScreen_t * const notificationScreen, NotificationData_t *notification);
void _notification_popup_destroy(NotificationScreen_t * const notificationScreen); void _notification_popup_destroy(NotificationScreen_t * const notificationScreen);
const char *_notification_type_to_char(NotificationType_e notificationType); const char *_notification_type_to_char(NotificationType_e notificationType);
const char *_notification_timestamp_to_date(time_t timestamp); const char *_notification_timestamp_to_date(time_t timestamp, bool hour_24H_format);
static void notification_scrolled_event_cb(lv_event_t *e) static void notification_scrolled_event_cb(lv_event_t *e)
{ {
@ -37,7 +37,7 @@ static void notification_scrolled_event_cb(lv_event_t *e)
_notification_popup_destroy(notificationScreen); _notification_popup_destroy(notificationScreen);
notificationScreen->new_notification_available = false; notificationScreen->new_notification_available = false;
notification->read = true; notification->read = true;
if(notificationScreen->notificationOnStateChangeCb) notificationScreen->notificationOnStateChangeCb(NOTIFICATION_STATE_CLEARED); if(notificationScreen->notificationOnStateChangeCb) notificationScreen->notificationOnStateChangeCb(NOTIFICATION_STATE_CLEARED, notification->handle);
} }
} }
@ -67,6 +67,17 @@ void notification_screen_register_on_state_change_cb(NotificationScreen_t * cons
notificationScreen->notificationOnStateChangeCb = notificationOnStateChangeCb; notificationScreen->notificationOnStateChangeCb = notificationOnStateChangeCb;
} }
void notification_screen_set_displayed_hour_format(NotificationScreen_t * const notificationScreen, bool hour_24H_format)
{
if(!notificationScreen)
{
LV_LOG_ERROR("NULL pointer given !");
return;
}
notificationScreen->notification_hour_24H_format = hour_24H_format;
}
void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, time_t dateOfArrival, NotificationType_e notificationType, char * title, char * body) void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, time_t dateOfArrival, NotificationType_e notificationType, char * title, char * body)
{ {
if(!notificationScreen) if(!notificationScreen)
@ -108,7 +119,7 @@ void notification_screen_notify(NotificationScreen_t * const notificationScreen,
case NOTIFICATION_TYPE_CALL: case NOTIFICATION_TYPE_CALL:
break; break;
default: default:
if(notificationScreen->notificationOnStateChangeCb) notificationScreen->notificationOnStateChangeCb(NOTIFICATION_STATE_DISPLAYED); if(notificationScreen->notificationOnStateChangeCb) notificationScreen->notificationOnStateChangeCb(NOTIFICATION_STATE_DISPLAYED, notification->handle);
_display_message_notification(notificationScreen, notification); _display_message_notification(notificationScreen, notification);
} }
} }
@ -323,7 +334,7 @@ void _display_message_notification(NotificationScreen_t * const notificationScre
lv_obj_set_style_pad_right(notificationScreen->date_label, 10, LV_PART_MAIN); lv_obj_set_style_pad_right(notificationScreen->date_label, 10, LV_PART_MAIN);
lv_obj_set_style_text_color(notificationScreen->date_label, lv_color_white(), LV_PART_MAIN); lv_obj_set_style_text_color(notificationScreen->date_label, lv_color_white(), LV_PART_MAIN);
lv_obj_align(notificationScreen->date_label, LV_ALIGN_TOP_RIGHT, 0, 0); lv_obj_align(notificationScreen->date_label, LV_ALIGN_TOP_RIGHT, 0, 0);
lv_label_set_text(notificationScreen->date_label, _notification_timestamp_to_date(notification->dateOfArrival)); lv_label_set_text_static(notificationScreen->date_label, _notification_timestamp_to_date(notification->dateOfArrival, notificationScreen->notification_hour_24H_format));
//Create the sub-area in the notification //Create the sub-area in the notification
lv_obj_t *sub_area = lv_obj_create(main_notification); lv_obj_t *sub_area = lv_obj_create(main_notification);
@ -358,7 +369,7 @@ void _display_message_notification(NotificationScreen_t * const notificationScre
//We just have to update the notification content //We just have to update the notification content
lv_label_set_text_static(notificationScreen->type_label, _notification_type_to_char(notification->type)); lv_label_set_text_static(notificationScreen->type_label, _notification_type_to_char(notification->type));
lv_label_set_text_static(notificationScreen->title_label, notification->title); lv_label_set_text_static(notificationScreen->title_label, notification->title);
lv_label_set_text_static(notificationScreen->date_label, _notification_timestamp_to_date(notification->dateOfArrival)); lv_label_set_text_static(notificationScreen->date_label, _notification_timestamp_to_date(notification->dateOfArrival, notificationScreen->notification_hour_24H_format));
lv_label_set_text_static(notificationScreen->body_label, notification->body); lv_label_set_text_static(notificationScreen->body_label, notification->body);
} }
} }
@ -391,12 +402,24 @@ const char *_notification_type_to_char(NotificationType_e notificationType)
} }
} }
const char *_notification_timestamp_to_date(time_t timestamp) const char *_notification_timestamp_to_date(time_t timestamp, bool hour_24H_format)
{ {
static char date[9]; //Ex 7:23PM static char date[9]; //Ex 7:23PM
struct tm *time = gmtime(&timestamp); struct tm *time = gmtime(&timestamp);
sprintf(date, "%s%d:%s%d", time->tm_hour < 10 ? "0" : "", time->tm_hour, time->tm_min < 10 ? "0" : "", time->tm_min); if(hour_24H_format)
sprintf(date, "%s%d:%s%d", time->tm_hour < 10 ? "0" : "", time->tm_hour, time->tm_min < 10 ? "0" : "", time->tm_min);
else
{
// Intermediate hour var to set it on a 12H format
uint8_t hour = time->tm_hour;
if(hour > 12)hour -= 12;
sprintf(date, "%d:%s%d%s", hour,
time->tm_min < 10 ? "0" : "", time->tm_min,
time->tm_hour < 13 ? "AM" : "PM");
}
return date; return date;
} }

View File

@ -38,7 +38,7 @@ typedef struct NotificationData
} NotificationData_t, *NotificationDataList_t; } NotificationData_t, *NotificationDataList_t;
typedef void (*NotificationOnStateChangeCb_t)(NotificationState_e notificationState); typedef void (*NotificationOnStateChangeCb_t)(NotificationState_e notificationState, uint32_t notification_handle);
typedef struct NotificationScreen typedef struct NotificationScreen
{ {
@ -57,13 +57,16 @@ typedef struct NotificationScreen
NotificationDataList_t notificationList; // Actual notifications NotificationDataList_t notificationList; // Actual notifications
NotificationDataList_t freeNotificationList; // Free notification object pool NotificationDataList_t freeNotificationList; // Free notification object pool
// Miscellaneous // Miscellaneous
bool new_notification_available; bool new_notification_available : 1;
bool notification_hour_24H_format : 1;
} NotificationScreen_t; } NotificationScreen_t;
void notification_screen_init(NotificationScreen_t * const notificationScreen); void notification_screen_init(NotificationScreen_t * const notificationScreen);
void notification_screen_register_on_state_change_cb(NotificationScreen_t * const notificationScreen, NotificationOnStateChangeCb_t notificationOnStateChangeCb); void notification_screen_register_on_state_change_cb(NotificationScreen_t * const notificationScreen, NotificationOnStateChangeCb_t notificationOnStateChangeCb);
void notification_screen_set_displayed_hour_format(NotificationScreen_t * const notificationScreen, bool hour_24H_format);
void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, time_t dateOfArrival, NotificationType_e notificationType, char * title, char * body); void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, time_t dateOfArrival, NotificationType_e notificationType, char * title, char * body);
bool notification_screen_new_notification_available(NotificationScreen_t * const notificationScreen); bool notification_screen_new_notification_available(NotificationScreen_t * const notificationScreen);

File diff suppressed because one or more lines are too long

View File

@ -5,10 +5,73 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#define SMART_WATCH_CASIO_FACE (0)
#define SMART_WATCH_CARBON_FACE (1)
#define SMART_WATCH_FACE SMART_WATCH_CARBON_FACE
LV_IMG_DECLARE(battery_low_icon) LV_IMG_DECLARE(battery_low_icon)
LV_IMG_DECLARE(battery_charging_icon) LV_IMG_DECLARE(battery_charging_icon)
LV_IMG_DECLARE(battery_charged_icon) LV_IMG_DECLARE(battery_charged_icon)
#if SMART_WATCH_FACE == SMART_WATCH_CASIO_FACE
//We declare the needed assets for the casio watch face:
LV_IMG_DECLARE(watch_casio_face_asset)
LV_IMG_DECLARE(watch_casio_hour_hand_asset)
LV_IMG_DECLARE(watch_casio_minute_hand_asset)
LV_IMG_DECLARE(watch_casio_second_hand_asset)
LV_IMG_DECLARE(watch_casio_medium_hand_asset)
static const void *watch_face_img = &watch_casio_face_asset;
static const void *watch_hour_hand_img = &watch_casio_hour_hand_asset;
#define HOUR_HAND_POS 112, 60
#define HOUR_HAND_PIVOT 8, 60
static const void *watch_minute_hand_img = &watch_casio_minute_hand_asset;
#define MINUTE_HAND_POS 112, 28
#define MINUTE_HAND_PIVOT 7, 92
static const void *watch_second_hand_img = &watch_casio_second_hand_asset;
#define SECOND_HAND_POS 115, 28
#define SECOND_HAND_PIVOT 5, 92
static const void *watch_medium_hand_img = &watch_casio_medium_hand_asset;
#define MEDIUM_HAND_POS 115, 48
#define MEDIUM_HAND_PIVOT 4, 25
#define BATTERY_ARC_OFFSETS -1, 45
#define BATTERY_ICON_OFFSETS 0, -9
#define STEP_COUNTER_LABEL_POS 63, 111
#define DATE_WINDOW_POS 180, 111
#define DATE_LABEL_COLOR lv_color_black()
#elif SMART_WATCH_FACE == SMART_WATCH_CARBON_FACE
//We declare the needed assets for the carbon 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)
static const void *watch_face_img = &watch_carbon_face_asset;
static const void *watch_hour_hand_img = &watch_carbon_hour_hand_asset;
#define HOUR_HAND_POS 113, 57
#define HOUR_HAND_PIVOT 6, 62
static const void *watch_minute_hand_img = &watch_carbon_minute_hand_asset;
#define MINUTE_HAND_POS 113, 14
#define MINUTE_HAND_PIVOT 6, 105
static const void *watch_second_hand_img = &watch_carbon_second_hand_asset;
#define SECOND_HAND_POS 115, -1
#define SECOND_HAND_PIVOT 4, 120
static const void *watch_medium_hand_img = &watch_carbon_medium_hand_asset;
#define MEDIUM_HAND_POS 115, 50
#define MEDIUM_HAND_PIVOT 4, 26
#define BATTERY_ARC_OFFSETS 0, 44
#define BATTERY_ICON_OFFSETS 0, -12
#define STEP_COUNTER_LABEL_POS 50, 111
#define DATE_WINDOW_POS 168, 111
#define DATE_LABEL_COLOR lv_color_white()
#else
#error "Bad app_config.h configuration for the selected watch face"
#endif //SMART_WATCH_FACE
static void _set_bluetooth_indicator(WatchFace_t * const watchFace) static void _set_bluetooth_indicator(WatchFace_t * const watchFace)
{ {
switch(watchFace->bluetoothIndicator.bluetoothState) switch(watchFace->bluetoothIndicator.bluetoothState)
@ -76,7 +139,7 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
if(watchFace->dateTimeCb) if(watchFace->dateTimeCb)
{ {
//We compute each hand angle //We compute each hand angle
if(!increment || watchFace->secondHand.handAngle >= 3660 /*|| (int)watchFace->secondHand.handAngle % 100 > 50*/) if(0)//(!increment || watchFace->secondHand.handAngle >= 3660 /*|| (int)watchFace->secondHand.handAngle % 100 > 50*/)
{ {
watchFace->dateTimeCb(&watchFace->dateTime); watchFace->dateTimeCb(&watchFace->dateTime);
watchFace->secondHand.handAngle = 60 * watchFace->dateTime.tm_sec; watchFace->secondHand.handAngle = 60 * watchFace->dateTime.tm_sec;
@ -95,7 +158,7 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
} }
else else
{ {
watchFace->secondHand.handAngle += increment; watchFace->secondHand.handAngle += (uint32_t)increment*15;//increment;//
} }
watchFace->minuteHand.handAngle = 60 * watchFace->dateTime.tm_min + watchFace->secondHand.handAngle / 60; 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->hourHand.handAngle = 300 * watchFace->dateTime.tm_hour + watchFace->minuteHand.handAngle / 12;
@ -140,7 +203,7 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
static void hand_timer_anim_cb(lv_timer_t *timer) static void hand_timer_anim_cb(lv_timer_t *timer)
{ {
WatchFace_t *watchFace = timer->user_data; WatchFace_t *watchFace = timer->user_data;
update_watch_hands_angles(watchFace, 12); update_watch_hands_angles(watchFace, 255/*12*/);
} }
static void battery_timer_anim_cb(lv_timer_t *timer) static void battery_timer_anim_cb(lv_timer_t *timer)
@ -180,7 +243,7 @@ static void set_battery_state_icon(WatchFace_t * const watchFace)
static void hide_hour_and_minutes_hand_cb(lv_event_t *e) static void hide_hour_and_minutes_hand_cb(lv_event_t *e)
{ {
WatchFace_t *watchFace = e->user_data; WatchFace_t *watchFace = lv_event_get_user_data(e);
if(255 == lv_obj_get_style_opa(watchFace->hourHand.handImg, LV_PART_MAIN)) if(255 == lv_obj_get_style_opa(watchFace->hourHand.handImg, LV_PART_MAIN))
{ {
@ -251,12 +314,6 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
//We declare the needed assets for the watch face: //We declare the needed assets for the watch face:
LV_IMG_DECLARE(watch_casio_face_asset)
LV_IMG_DECLARE(watch_casio_hour_hand_asset)
LV_IMG_DECLARE(watch_casio_minute_hand_asset)
LV_IMG_DECLARE(watch_casio_second_hand_asset)
LV_IMG_DECLARE(watch_casio_medium_hand_asset)
LV_IMG_DECLARE(watch_casio_small_hand_asset)
LV_IMG_DECLARE(bluetooth_icon) LV_IMG_DECLARE(bluetooth_icon)
//We create our parent screen : //We create our parent screen :
@ -268,16 +325,10 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
//Our display is the watch face image : //Our display is the watch face image :
watchFace->display = lv_img_create(NULL); watchFace->display = lv_img_create(NULL);
lv_img_set_src(watchFace->display, &watch_casio_face_asset); lv_img_set_src(watchFace->display, watch_face_img);
lv_obj_set_style_bg_color(watchFace->display, lv_color_black(), LV_PART_MAIN); 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); 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 //Battery arc is created here
if(watchFace->batteryIndicator.batteryArc) if(watchFace->batteryIndicator.batteryArc)
{ {
@ -290,7 +341,7 @@ void watch_face_create(WatchFace_t * const watchFace)
lv_obj_remove_style(watchFace->batteryIndicator.batteryArc, NULL, LV_PART_KNOB); lv_obj_remove_style(watchFace->batteryIndicator.batteryArc, NULL, LV_PART_KNOB);
lv_obj_clear_flag(watchFace->batteryIndicator.batteryArc, LV_OBJ_FLAG_CLICKABLE); lv_obj_clear_flag(watchFace->batteryIndicator.batteryArc, LV_OBJ_FLAG_CLICKABLE);
lv_obj_set_size(watchFace->batteryIndicator.batteryArc, 60, 60); lv_obj_set_size(watchFace->batteryIndicator.batteryArc, 60, 60);
lv_obj_align(watchFace->batteryIndicator.batteryArc, LV_ALIGN_CENTER, -1, 45); lv_obj_align(watchFace->batteryIndicator.batteryArc, LV_ALIGN_CENTER, BATTERY_ARC_OFFSETS);
lv_obj_set_style_arc_width(watchFace->batteryIndicator.batteryArc, 5, LV_PART_INDICATOR); 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_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_obj_set_style_arc_color(watchFace->batteryIndicator.batteryArc, lv_color_make(228, 233, 236), LV_PART_INDICATOR);
@ -331,7 +382,7 @@ void watch_face_create(WatchFace_t * const watchFace)
// this is why we call the function after the timer has been created // this is why we call the function after the timer has been created
set_battery_state_icon(watchFace); set_battery_state_icon(watchFace);
lv_img_set_zoom(watchFace->batteryIndicator.batteryIcon, 141); lv_img_set_zoom(watchFace->batteryIndicator.batteryIcon, 141);
lv_obj_align_to(watchFace->batteryIndicator.batteryIcon, watchFace->batteryIndicator.label, LV_ALIGN_OUT_BOTTOM_MID, 0, -9); lv_obj_align_to(watchFace->batteryIndicator.batteryIcon, watchFace->batteryIndicator.label, LV_ALIGN_OUT_BOTTOM_MID, BATTERY_ICON_OFFSETS);
// Bluetooth status icon is created here // Bluetooth status icon is created here
if(watchFace->bluetoothIndicator.bluetoothIcon) if(watchFace->bluetoothIndicator.bluetoothIcon)
@ -359,7 +410,7 @@ void watch_face_create(WatchFace_t * const watchFace)
watchFace->stepCounter.label = lv_label_create(watchFace->display); watchFace->stepCounter.label = lv_label_create(watchFace->display);
lv_label_set_text_static(watchFace->stepCounter.label, watchFace->stepCounter.text); 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_style_text_color(watchFace->stepCounter.label, lv_color_white(), LV_PART_MAIN);
lv_obj_set_pos(watchFace->stepCounter.label, 63, 111); lv_obj_set_pos(watchFace->stepCounter.label, STEP_COUNTER_LABEL_POS);
if(watchFace->mediumHand24h.handImg) if(watchFace->mediumHand24h.handImg)
{ {
@ -369,9 +420,9 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
watchFace->mediumHand24h.handImg = lv_img_create(watchFace->display); watchFace->mediumHand24h.handImg = lv_img_create(watchFace->display);
lv_img_set_src(watchFace->mediumHand24h.handImg, &watch_casio_medium_hand_asset); lv_img_set_src(watchFace->mediumHand24h.handImg, watch_medium_hand_img);
lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 48); lv_obj_set_pos(watchFace->mediumHand24h.handImg, MEDIUM_HAND_POS);
lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 25); lv_img_set_pivot(watchFace->mediumHand24h.handImg, MEDIUM_HAND_PIVOT);
/*lv_obj_t *mediumHandChronoImg = lv_img_create(watchFace->display); /*lv_obj_t *mediumHandChronoImg = lv_img_create(watchFace->display);
lv_img_set_src(mediumHandChronoImg, &watch_casio_medium_hand_asset); lv_img_set_src(mediumHandChronoImg, &watch_casio_medium_hand_asset);
@ -387,9 +438,10 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
watchFace->dateWindow.dateWindowWidget = lv_label_create(watchFace->display); watchFace->dateWindow.dateWindowWidget = lv_label_create(watchFace->display);
lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText); lv_label_set_text_static(watchFace->dateWindow.dateWindowWidget, watchFace->dateWindow.dateWindowText);
lv_obj_set_pos(watchFace->dateWindow.dateWindowWidget, 180,111); lv_obj_set_pos(watchFace->dateWindow.dateWindowWidget, DATE_WINDOW_POS);
lv_obj_set_width(watchFace->dateWindow.dateWindowWidget, 20); 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_align(watchFace->dateWindow.dateWindowWidget, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN);
lv_obj_set_style_text_color(watchFace->dateWindow.dateWindowWidget, DATE_LABEL_COLOR, LV_PART_MAIN);
if(watchFace->hourHand.handImg) if(watchFace->hourHand.handImg)
{ {
@ -399,9 +451,9 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
watchFace->hourHand.handImg = lv_img_create(watchFace->display); watchFace->hourHand.handImg = lv_img_create(watchFace->display);
lv_img_set_src(watchFace->hourHand.handImg, &watch_casio_hour_hand_asset); lv_img_set_src(watchFace->hourHand.handImg, watch_hour_hand_img);
lv_obj_set_pos(watchFace->hourHand.handImg, 112, 60); lv_obj_set_pos(watchFace->hourHand.handImg, HOUR_HAND_POS);
lv_img_set_pivot(watchFace->hourHand.handImg, 8, 60); lv_img_set_pivot(watchFace->hourHand.handImg, HOUR_HAND_PIVOT);
if(watchFace->minuteHand.handImg) if(watchFace->minuteHand.handImg)
{ {
@ -411,9 +463,9 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
watchFace->minuteHand.handImg = lv_img_create(watchFace->display); watchFace->minuteHand.handImg = lv_img_create(watchFace->display);
lv_img_set_src(watchFace->minuteHand.handImg, &watch_casio_minute_hand_asset); lv_img_set_src(watchFace->minuteHand.handImg, watch_minute_hand_img);
lv_obj_set_pos(watchFace->minuteHand.handImg, 112, 28); lv_obj_set_pos(watchFace->minuteHand.handImg, MINUTE_HAND_POS);
lv_img_set_pivot(watchFace->minuteHand.handImg, 7, 92); lv_img_set_pivot(watchFace->minuteHand.handImg, MINUTE_HAND_PIVOT);
if(watchFace->secondHand.handImg) if(watchFace->secondHand.handImg)
{ {
@ -423,9 +475,9 @@ void watch_face_create(WatchFace_t * const watchFace)
} }
watchFace->secondHand.handImg = lv_img_create(watchFace->display); watchFace->secondHand.handImg = lv_img_create(watchFace->display);
lv_img_set_src(watchFace->secondHand.handImg, &watch_casio_second_hand_asset); lv_img_set_src(watchFace->secondHand.handImg, watch_second_hand_img);
lv_obj_set_pos(watchFace->secondHand.handImg, 115, 28); lv_obj_set_pos(watchFace->secondHand.handImg, SECOND_HAND_POS);
lv_img_set_pivot(watchFace->secondHand.handImg, 5, 92); lv_img_set_pivot(watchFace->secondHand.handImg, SECOND_HAND_PIVOT);
//We set the appropriate angles to each of the hands //We set the appropriate angles to each of the hands
update_watch_hands_angles(watchFace, 0); update_watch_hands_angles(watchFace, 0);
@ -446,7 +498,7 @@ void watch_face_create(WatchFace_t * const watchFace)
watchFace->handAnimationTimer = NULL; watchFace->handAnimationTimer = NULL;
} }
watchFace->handAnimationTimer = lv_timer_create(&(hand_timer_anim_cb), 200, watchFace); 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) void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t levelInPercent, BatteryState_e batteryState)
@ -510,7 +562,7 @@ void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, Bluetooth
_set_bluetooth_indicator(watchFace); _set_bluetooth_indicator(watchFace);
} }
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count) void watch_face_set_step_count_indicator(WatchFace_t * const watchFace, uint32_t stepCount)
{ {
if(!watchFace) if(!watchFace)
{ {
@ -518,12 +570,12 @@ void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_coun
return; return;
} }
if(step_count < 1000) if(stepCount < 1000)
sprintf(watchFace->stepCounter.text, "%u", step_count); sprintf(watchFace->stepCounter.text, "%u", stepCount);
else if(step_count < 9996) else if(stepCount < 9996)
sprintf(watchFace->stepCounter.text, "%.2fk", step_count/1000.0); sprintf(watchFace->stepCounter.text, "%.2fk", stepCount/1000.0);
else else
sprintf(watchFace->stepCounter.text, "%.1fk", step_count/1000.0); sprintf(watchFace->stepCounter.text, "%.1fk", stepCount/1000.0);
if(!watchFace->display) return; if(!watchFace->display) return;
@ -565,3 +617,14 @@ void watch_face_force_sync(WatchFace_t *const watchFace)
update_watch_hands_angles(watchFace, 0); update_watch_hands_angles(watchFace, 0);
} }
bool watch_face_is_in_use(WatchFace_t * const watchFace)
{
if(!watchFace)
{
LV_LOG_ERROR("NULL pointer given !");
return false;
}
return watchFace->display != NULL;
}

View File

@ -22,6 +22,8 @@ typedef void (*DateTimeCb_t)(struct tm * const dateTime);
typedef void (*BatteryIndicatorCb_t)(uint8_t *levelInPercent, BatteryState_e *batteryState); typedef void (*BatteryIndicatorCb_t)(uint8_t *levelInPercent, BatteryState_e *batteryState);
typedef void (*StepCounterIndicatorCb_t)(uint32_t *stepCount);
typedef struct DateWindow typedef struct DateWindow
{ {
lv_obj_t *dateWindowWidget; lv_obj_t *dateWindowWidget;
@ -125,7 +127,13 @@ void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t lev
*/ */
void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, BluetoothState_e bluetoothState); void watch_face_set_bluetooth_indicator(WatchFace_t * const watchFace, BluetoothState_e bluetoothState);
void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_count); /**
* @brief Shows the current step count passed as parameter on the watch face.
*
* @param watchFace a pointer to the watch face context structure.
* @param step_count the step count to show on the watch face.
*/
void watch_face_set_step_count_indicator(WatchFace_t * const watchFace, uint32_t stepCount);
/** /**
* @brief Forces the watch face to sync up with the RTC by calling the provided date_time_cb * @brief Forces the watch face to sync up with the RTC by calling the provided date_time_cb
@ -135,8 +143,17 @@ void watch_face_set_step_count(WatchFace_t * const watchFace, uint32_t step_coun
void watch_face_force_sync(WatchFace_t * const watchFace); void watch_face_force_sync(WatchFace_t * const watchFace);
/** /**
* @brief Frees all resources used by the WatchFace object * @brief Returns true if the watch face screen is currently being used and displayed.
* *
* @param watchFace a pointer to the watch face context structure.
* @return true if the watch face screen is being used
* @return false if the watch face screen is not being used/currently displayed
*/
bool watch_face_is_in_use(WatchFace_t * const watchFace);
/**
* @brief Frees all resources used by the WatchFace object.
*
* @param watchFace a pointer to the watch face context structure. * @param watchFace a pointer to the watch face context structure.
*/ */
void watch_face_destroy(WatchFace_t * const watchFace); void watch_face_destroy(WatchFace_t * const watchFace);

View File

@ -1,568 +0,0 @@
#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(&notificationScreen, 1696358171, time(NULL) + 3600*2, NOTIFICATION_TYPE_GADGET_BRIDGE, title, body);
LV_LOG_USER("unread(%u)/ total(%u)", notification_screen_unread_notification_count(&notificationScreen), notification_screen_notification_count(&notificationScreen));
}
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);
}