Compare commits

..

No commits in common. "8b1b11679693181339224510846d26981c71107b" and "93c0ab97ec89c3c28684a3ecc719b90b64658b6d" have entirely different histories.

12 changed files with 1775 additions and 2018 deletions

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,6 @@
#include "QMC5883L.h" #include "QMC5883L.h"
#include "BMP280.h" #include "BMP280.h"
#include "bma456w.h" #include "bma456w.h"
#include "CST816D.h"
#include "watch_peripherals.h" #include "watch_peripherals.h"
#include "watch_settings.h" #include "watch_settings.h"
@ -24,12 +23,6 @@ static void date_time_cb(struct tm * const dateTime)
//APP_LOG_DEBUG("RTC time : %d:%d:%d", dateTime->tm_hour, dateTime->tm_min, dateTime->tm_sec); //APP_LOG_DEBUG("RTC time : %d:%d:%d", dateTime->tm_hour, dateTime->tm_min, dateTime->tm_sec);
} }
static uint8_t battery_percentage = 100;
static uint8_t battery_indicator_cb(void)
{
return battery_percentage;
}
WatchFace_t watchFace; WatchFace_t watchFace;
MenuScreen_t menuScreen; MenuScreen_t menuScreen;
CompassScreen_t compassScreen; CompassScreen_t compassScreen;
@ -150,17 +143,13 @@ void gfx_task(void *param)
settings_screen_init(&settingsScreen); settings_screen_init(&settingsScreen);
settings_screen_register_API_interface(&settingsScreen, &settingsScreenAPIInterface); settings_screen_register_API_interface(&settingsScreen, &settingsScreenAPIInterface);
watch_face_register_date_time_cb(&watchFace, &(date_time_cb)); watch_face_register_cb(&watchFace, &(date_time_cb));
watch_face_register_battery_indicator_cb(&watchFace, &(battery_indicator_cb));
watch_face_create(&watchFace); watch_face_create(&watchFace);
lv_scr_load(watchFace.display); lv_scr_load(watchFace.display);
/* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */ /* Let's init the watch peripherals driver (vibration motor + battery voltage sense) */
watch_peripherals_init(27); watch_peripherals_init(27);
/* Make the first battery voltage reading here */
uint16_t battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV);
battery_percentage = battery_voltage_to_percentage(battery_voltage);
/* Let's init the I2C interface */ /* Let's init the I2C interface */
i2c_init(I2C_SDA, I2C_SCL, 100000); i2c_init(I2C_SDA, I2C_SCL, 100000);
@ -272,6 +261,7 @@ void gfx_task(void *param)
extern LCDConfig_t LCDConfig; extern LCDConfig_t LCDConfig;
float temperature = 0; float temperature = 0;
float pressure = 0; float pressure = 0;
uint16_t battery_voltage = 0;
for(;;) for(;;)
{ {
@ -308,14 +298,11 @@ void gfx_task(void *param)
{ {
pressure = BMP280_get_pressure(&temperature); pressure = BMP280_get_pressure(&temperature);
BMP280_trigger_measurement(); BMP280_trigger_measurement();
battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV);
battery_percentage = battery_voltage_to_percentage(battery_voltage);
APP_LOG_DEBUG("GFX thread, temp : %0.2f °C, press : %0.2f hPa, bat : %u mV <-> %u %%", APP_LOG_DEBUG("GFX thread, temp : %0.2f °C, press : %0.2f hPa, bat : %u mV <-> %u %%",
temperature, temperature,
pressure/100, pressure/100,
battery_voltage, battery_voltage = watch_peripherals_get_battery_voltage(Battery_Unit_mV),
battery_percentage); battery_voltage_to_percentage(battery_voltage));
aliveCounter = 0; aliveCounter = 0;
} }
@ -328,7 +315,7 @@ void gfx_task(void *param)
//lcd_on(&LCDConfig, false); //lcd_on(&LCDConfig, false);
lcd_sleep(&LCDConfig, true); lcd_sleep(&LCDConfig, true);
QMC5883L_set_power_mode(Standby); QMC5883L_set_power_mode(Standby);
if(CST816D_sleep()) if(CST816D_set_power_mode())
APP_LOG_DEBUG("CST816D Sleep cmd ok"); APP_LOG_DEBUG("CST816D Sleep cmd ok");
else else
APP_LOG_DEBUG("CST816D Sleep cmd fail"); APP_LOG_DEBUG("CST816D Sleep cmd fail");

View File

@ -62,9 +62,6 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
sprintf(watchFace->dateWindow.dateWindowText, "%s%d", watchFace->dateTime.tm_mday < 10 ? " " : "", watchFace->dateTime.tm_mday); sprintf(watchFace->dateWindow.dateWindowText, "%s%d", watchFace->dateTime.tm_mday < 10 ? " " : "", watchFace->dateTime.tm_mday);
lv_obj_invalidate(watchFace->dateWindow.dateWindowWidget); lv_obj_invalidate(watchFace->dateWindow.dateWindowWidget);
APP_LOG_DEBUG("Syncing time"); APP_LOG_DEBUG("Syncing time");
if(watchFace->batteryIndicatorCb)
watch_face_set_battery_indicator(watchFace, watchFace->batteryIndicatorCb());
} }
else else
{ {
@ -103,7 +100,7 @@ void watch_face_init(WatchFace_t * const watchFace)
memset(watchFace, 0, sizeof(WatchFace_t)); memset(watchFace, 0, sizeof(WatchFace_t));
} }
void watch_face_register_date_time_cb(WatchFace_t * const watchFace, DateTimeCb_t dateTimeCb) void watch_face_register_cb(WatchFace_t * const watchFace, DateTimeCb_t dateTimeCb)
{ {
if(!watchFace) if(!watchFace)
{ {
@ -114,17 +111,6 @@ void watch_face_register_date_time_cb(WatchFace_t * const watchFace, DateTimeCb_
watchFace->dateTimeCb = dateTimeCb; watchFace->dateTimeCb = dateTimeCb;
} }
void watch_face_register_battery_indicator_cb(WatchFace_t *const watchFace, BatteryIndicatorCb_t BatteryIndicatorCb)
{
if(!watchFace)
{
LV_LOG_ERROR("NULL pointer given !");
return;
}
watchFace->batteryIndicatorCb = BatteryIndicatorCb;
}
void watch_face_create(WatchFace_t * const watchFace) void watch_face_create(WatchFace_t * const watchFace)
{ {
if(!watchFace) if(!watchFace)
@ -159,39 +145,6 @@ void watch_face_create(WatchFace_t * const watchFace)
lv_obj_set_pos(smallHandImg, 69, 98); lv_obj_set_pos(smallHandImg, 69, 98);
lv_img_set_pivot(smallHandImg, 4, 20); lv_img_set_pivot(smallHandImg, 4, 20);
//Battery arc is created here
if(watchFace->batteryIndicator.battery_arc)
{
LV_LOG_ERROR("battery_arc should be NULL here !");
lv_obj_del(watchFace->batteryIndicator.battery_arc);
watchFace->batteryIndicator.battery_arc = NULL;
}
watchFace->batteryIndicator.battery_arc = lv_arc_create(watchFace->display);
lv_obj_remove_style(watchFace->batteryIndicator.battery_arc, NULL, LV_PART_KNOB);
lv_obj_clear_flag(watchFace->batteryIndicator.battery_arc, LV_OBJ_FLAG_CLICKABLE);
lv_obj_set_size(watchFace->batteryIndicator.battery_arc, 60, 60);
lv_obj_align(watchFace->batteryIndicator.battery_arc, LV_ALIGN_CENTER, -1, 45);
lv_obj_set_style_arc_width(watchFace->batteryIndicator.battery_arc, 5, LV_PART_INDICATOR);
lv_obj_set_style_arc_width(watchFace->batteryIndicator.battery_arc, 0, LV_PART_MAIN);
lv_obj_set_style_arc_color(watchFace->batteryIndicator.battery_arc, lv_color_make(228, 233, 236), LV_PART_INDICATOR);
lv_arc_set_value(watchFace->batteryIndicator.battery_arc, 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.battery_arc, LV_ALIGN_CENTER, 0, 0);
if(watchFace->mediumHand24h.handImg) if(watchFace->mediumHand24h.handImg)
{ {
LV_LOG_ERROR("mediumHand24hImg should be NULL here !"); LV_LOG_ERROR("mediumHand24hImg should be NULL here !");
@ -204,10 +157,10 @@ void watch_face_create(WatchFace_t * const watchFace)
lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 48); lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 48);
lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 25); lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 25);
/*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);
lv_obj_set_pos(mediumHandChronoImg, 115, 140); lv_obj_set_pos(mediumHandChronoImg, 115, 140);
lv_img_set_pivot(mediumHandChronoImg, 4, 25);*/ lv_img_set_pivot(mediumHandChronoImg, 4, 25);
//Date window is created here //Date window is created here
if(watchFace->dateWindow.dateWindowWidget) if(watchFace->dateWindow.dateWindowWidget)
@ -288,32 +241,6 @@ void watch_face_force_sync(WatchFace_t *const watchFace)
update_watch_hands_angles(watchFace, 0); update_watch_hands_angles(watchFace, 0);
} }
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t percentage)
{
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(percentage <= 10)
arc_color = lv_color_make(228, 33, 81);
else if(percentage <= 30)
arc_color = lv_color_make(247, 148, 29);
else if(percentage <= 50)
arc_color = lv_color_make(226, 175, 58);
lv_arc_set_value(watchFace->batteryIndicator.battery_arc, percentage);
lv_obj_set_style_arc_color(watchFace->batteryIndicator.battery_arc, arc_color, LV_PART_INDICATOR);
sprintf(watchFace->batteryIndicator.text, "%u %%", percentage);
lv_label_set_text_static(watchFace->batteryIndicator.label, watchFace->batteryIndicator.text);
lv_obj_align_to(watchFace->batteryIndicator.label, watchFace->batteryIndicator.battery_arc, LV_ALIGN_CENTER, 0, 0);
}
void watch_face_destroy(WatchFace_t * const watchFace) void watch_face_destroy(WatchFace_t * const watchFace)
{ {
if(!watchFace) if(!watchFace)
@ -329,7 +256,5 @@ void watch_face_destroy(WatchFace_t * const watchFace)
watchFace->minuteHand.handImg = NULL; watchFace->minuteHand.handImg = NULL;
watchFace->secondHand.handImg = NULL; watchFace->secondHand.handImg = NULL;
watchFace->mediumHand24h.handImg = NULL; watchFace->mediumHand24h.handImg = NULL;
watchFace->batteryIndicator.battery_arc = NULL;
watchFace->batteryIndicator.label = NULL;
} }

View File

@ -5,7 +5,6 @@
#include <time.h> #include <time.h>
typedef void (*DateTimeCb_t)(struct tm * const dateTime); typedef void (*DateTimeCb_t)(struct tm * const dateTime);
typedef uint8_t (*BatteryIndicatorCb_t)(void);
typedef struct DateWindow typedef struct DateWindow
{ {
@ -19,18 +18,10 @@ typedef struct WatchHand
float handAngle; float handAngle;
}WatchHand_t; }WatchHand_t;
typedef struct BatteryIndicator
{
lv_obj_t *label;
lv_obj_t *battery_arc;
char text[7];
} BatteryIndicator_t;
/* Watch face context object */ /* Watch face context object */
typedef struct WatchFace typedef struct WatchFace
{ {
DateTimeCb_t dateTimeCb; //Call back function used to retrieve the date and time needed by the watch face DateTimeCb_t dateTimeCb; //Call back function used to retrieve the date and time needed by the watch face
BatteryIndicatorCb_t batteryIndicatorCb; //Call back function used to update the battery level every minute
WatchHand_t hourHand; WatchHand_t hourHand;
WatchHand_t minuteHand; WatchHand_t minuteHand;
WatchHand_t secondHand; WatchHand_t secondHand;
@ -38,7 +29,6 @@ typedef struct WatchFace
lv_timer_t *handAnimationTimer; lv_timer_t *handAnimationTimer;
lv_obj_t *display; lv_obj_t *display;
DateWindow_t dateWindow; DateWindow_t dateWindow;
BatteryIndicator_t batteryIndicator;
struct tm dateTime; struct tm dateTime;
} WatchFace_t; } WatchFace_t;
@ -46,38 +36,12 @@ typedef struct WatchFace
/* Initializes the watch face context object */ /* Initializes the watch face context object */
void watch_face_init(WatchFace_t * const watchFace); void watch_face_init(WatchFace_t * const watchFace);
/** /* Registers a call back function to retrieve the time and date */
* @brief Registers a call back function used by the watch face to retrieve the time and date void watch_face_register_cb(WatchFace_t * const watchFace, DateTimeCb_t DateTimeCb);
*
* @param watchFace a pointer to the watch face context structure.
* @param DateTimeCb a pointer to a function having the right definition.
*/
void watch_face_register_date_time_cb(WatchFace_t * const watchFace, DateTimeCb_t DateTimeCb);
/** /* Builds the watch face graphically */
* @brief Registers a call back function used to refresh the battery indicator.
* The refreshing is done every minute or every time the @ref watch_face_force_sync is called.
*
* @param watchFace a pointer to the watch face context structure.
* @param BatteryIndicatorCb a pointer to a function having the right definition.
*/
void watch_face_register_battery_indicator_cb(WatchFace_t * const watchFace, BatteryIndicatorCb_t BatteryIndicatorCb);
/**
* @brief Graphically builds the watch face
*
* @param watchFace a pointer to the watch face context structure.
*/
void watch_face_create(WatchFace_t * const watchFace); void watch_face_create(WatchFace_t * const watchFace);
/**
* @brief Sets the battery indicator to the given value in percent.
*
* @param watchFace a pointer to the watch face context structure.
* @param percentage the value to set the indicator to in percent.
*/
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t percentage);
/** /**
* @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
* *
@ -85,11 +49,7 @@ void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t per
*/ */
void watch_face_force_sync(WatchFace_t * const watchFace); void watch_face_force_sync(WatchFace_t * const watchFace);
/** /* Frees all resources used by the WatchFace object */
* @brief Frees all resources used by the WatchFace object
*
* @param watchFace a pointer to the watch face context structure.
*/
void watch_face_destroy(WatchFace_t * const watchFace); void watch_face_destroy(WatchFace_t * const watchFace);
#endif // WATCH_FACE_H #endif // WATCH_FACE_H

View File

@ -40,17 +40,10 @@
<Add option="-Wall" /> <Add option="-Wall" />
<Add directory="." /> <Add directory="." />
</Compiler> </Compiler>
<Unit filename="common_screen_components.c"> <Unit filename="config_screen.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="common_screen_components.h" /> <Unit filename="config_screen.h" />
<Unit filename="compass_assets.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="compass_screen.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="compass_screen.h" />
<Unit filename="hour_hand.c"> <Unit filename="hour_hand.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
@ -1651,10 +1644,6 @@
<Unit filename="second_hand.c"> <Unit filename="second_hand.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>
<Unit filename="settings_screen.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="settings_screen.h" />
<Unit filename="watch_casio_assets.c"> <Unit filename="watch_casio_assets.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
</Unit> </Unit>

View File

@ -2,44 +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\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\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="1055" topLine="40" /> <Cursor1 position="6044" topLine="155" />
</Cursor> </Cursor>
</File> </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"> <File name="lvgl\src\widgets\roller\lv_roller.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="440" topLine="14" /> <Cursor1 position="715" topLine="26" />
</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\layouts\flex\lv_flex.c" open="1" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1969" topLine="47" /> <Cursor1 position="3097" topLine="74" />
</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="3048" topLine="80" />
</Cursor>
</File>
<File name="compass_screen.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1253" topLine="20" />
</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="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="watch_img.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4150889" topLine="0" />
</Cursor> </Cursor>
</File> </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"> <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">
@ -47,29 +22,34 @@
<Cursor1 position="0" topLine="22" /> <Cursor1 position="0" topLine="22" />
</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\core\lv_event.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="354" topLine="153" /> <Cursor1 position="7293" topLine="150" />
</Cursor> </Cursor>
</File> </File>
<File name="menu_screen.h" open="0" top="0" tabpos="7" 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="50" topLine="0" /> <Cursor1 position="181" topLine="0" />
</Cursor> </Cursor>
</File> </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\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="5065" topLine="123" /> <Cursor1 position="1135" topLine="14" />
</Cursor> </Cursor>
</File> </File>
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <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="1299" topLine="24" /> <Cursor1 position="2447" topLine="75" />
</Cursor> </Cursor>
</File> </File>
<File name="settings_screen.h" 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.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="524" topLine="0" /> <Cursor1 position="5535" topLine="120" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6907" topLine="258" />
</Cursor> </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\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -77,14 +57,179 @@
<Cursor1 position="456" topLine="6" /> <Cursor1 position="456" topLine="6" />
</Cursor> </Cursor>
</File> </File>
<File name="compass_screen.c" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <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> <Cursor>
<Cursor1 position="5883" topLine="142" /> <Cursor1 position="6602" topLine="208" />
</Cursor> </Cursor>
</File> </File>
<File name="lvgl\src\core\lv_obj_pos.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <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> <Cursor>
<Cursor1 position="6811" topLine="144" /> <Cursor1 position="3566" topLine="102" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20043" topLine="610" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1969" topLine="47" />
</Cursor>
</File>
<File name="main.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1250" topLine="32" />
</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\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_pos.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="29967" topLine="918" />
</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="20334" topLine="654" />
</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_obj_style.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="942" topLine="21" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2825" topLine="122" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1873" topLine="48" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1282774" topLine="472" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7018" topLine="202" />
</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\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\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\core\lv_obj_style_gen.h" open="1" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="21999" topLine="570" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2694" 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="615" topLine="25" />
</Cursor>
</File>
<File name="minute_hand.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="52426" topLine="414" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7273" topLine="217" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1509" topLine="59" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3034" topLine="107" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9059" topLine="238" />
</Cursor>
</File>
<File name="config_screen.c" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8933" topLine="168" />
</Cursor>
</File>
<File name="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="15" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="823" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\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="6812" topLine="211" />
</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="2978" topLine="75" />
</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>
</File>
<File name="config_screen.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="57" topLine="0" />
</Cursor>
</File>
<File name="menu_screen.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3576" topLine="65" />
</Cursor> </Cursor>
</File> </File>
<File name="watch_menu_icons.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="watch_menu_icons.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -100,205 +245,9 @@
<Collapse line="967" /> <Collapse line="967" />
</Folding> </Folding>
</File> </File>
<File name="lvgl\src\core\lv_obj_pos.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="lv_drivers\indev\mouse.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="29967" topLine="918" /> <Cursor1 position="519" topLine="16" />
</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="main.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="247" topLine="60" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="lvgl\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_refr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2447" topLine="75" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="942" topLine="21" />
</Cursor>
</File>
<File name="watch_face.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="459" topLine="0" />
</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_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\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="8169" topLine="288" />
</Cursor>
</File>
<File name="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="8326" topLine="24" />
</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="1873" topLine="48" />
</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="6812" topLine="211" />
</Cursor>
</File>
<File name="settings_screen.c" open="0" top="0" tabpos="8" split="2" active="1" splitpos="995" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5410" topLine="32" />
<Cursor2 position="10475" topLine="366" />
</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="common_screen_components.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="17" topLine="0" />
</Cursor>
</File>
<File name="watch_face.c" open="0" top="0" tabpos="4" split="0" active="1" splitpos="702" zoom_1="-1" zoom_2="-1">
<Cursor>
<Cursor1 position="7649" topLine="199" />
</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="610" topLine="17" />
</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\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\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="823" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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="21999" topLine="570" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6907" topLine="258" />
</Cursor>
</File>
<File name="minute_hand.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="52426" topLine="414" />
</Cursor>
</File>
<File name="lvgl\src\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="7136" topLine="245" />
</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\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3097" topLine="74" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12525" topLine="363" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="615" topLine="25" />
</Cursor>
</File>
<File name="lv_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="20334" topLine="654" />
</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\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="menu_screen.c" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1400" topLine="115" />
</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.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="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="15" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="20043" topLine="610" />
</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\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3835" topLine="68" />
</Cursor> </Cursor>
</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"> <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">
@ -306,44 +255,19 @@
<Cursor1 position="2129" topLine="53" /> <Cursor1 position="2129" topLine="53" />
</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\misc\lv_log.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1135" topLine="14" /> <Cursor1 position="2557" topLine="68" />
</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="watch_face.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="5223" topLine="151" />
</Cursor> </Cursor>
</File> </File>
<File name="common_screen_components.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">
<Cursor> <Cursor>
<Cursor1 position="188" topLine="0" /> <Cursor1 position="0" topLine="56" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_area.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1054" topLine="46" />
</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\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1563" topLine="27" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1085" topLine="33" />
</Cursor>
</File>
<File name="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> </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\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -351,58 +275,98 @@
<Cursor1 position="441" topLine="3" /> <Cursor1 position="441" topLine="3" />
</Cursor> </Cursor>
</File> </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"> <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> <Cursor>
<Cursor1 position="10670" topLine="390" /> <Cursor1 position="289" topLine="31" />
</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="watch_casio_assets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="1234" topLine="34" /> <Cursor1 position="3351151" topLine="580" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="624" topLine="31" />
</Cursor>
</File>
<File name="watch_casio_assets.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3451942" topLine="1065" />
</Cursor> </Cursor>
<Folding> <Folding>
<Collapse line="8" /> <Collapse line="8" />
<Collapse line="995" /> <Collapse line="995" />
</Folding> </Folding>
</File> </File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <File name="watch_img.c" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="7018" topLine="202" /> <Cursor1 position="4150889" topLine="0" />
</Cursor> </Cursor>
</File> </File>
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <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> <Cursor>
<Cursor1 position="7293" topLine="150" /> <Cursor1 position="7631" topLine="141" />
</Cursor> </Cursor>
</File> </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\misc\lv_anim.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="3835" topLine="68" />
</Cursor> </Cursor>
</File> </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"> <File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="7273" topLine="217" /> <Cursor1 position="1299" topLine="24" />
</Cursor> </Cursor>
</File> </File>
<File name="lv_drivers\indev\mouse.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_area.h" open="1" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="519" topLine="16" /> <Cursor1 position="1054" topLine="46" />
</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="lv_conf.h" open="1" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor> <Cursor>
<Cursor1 position="2557" topLine="68" /> <Cursor1 position="13092" topLine="321" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="1" 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\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_pos.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5103" topLine="122" />
</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="610" topLine="17" />
</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="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="51" 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\core\lv_obj.h" open="1" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3048" topLine="80" />
</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="354" topLine="153" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.h" open="1" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="624" topLine="31" />
</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\layouts\grid\lv_grid.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -410,19 +374,14 @@
<Cursor1 position="579" topLine="17" /> <Cursor1 position="579" topLine="17" />
</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="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="9059" topLine="238" /> <Cursor1 position="12525" topLine="363" />
</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\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> <Cursor>
<Cursor1 position="585" topLine="0" /> <Cursor1 position="0" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1509" topLine="59" />
</Cursor> </Cursor>
</File> </File>
</CodeBlocks_layout_file> </CodeBlocks_layout_file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -6,12 +6,12 @@
static const char *day_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"; static const char *day_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31";
static const char *month_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12"; static const char *month_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12";
static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30"; static const char *year_options = "22\n23\n24\n25\n26\n27\n28\n29\n30";
static const char *hour_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23";
static const char *second_minute_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59";
static const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
static const char *timeout_options = "0\n5\n10\n15\n20\n25\n30\n35\n40\n45\n50\n55\n60"; static const char *hour_options = "00\n01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23";
static const char *orientation_format = "Default\n90°\n180°\n270°"; static const char *minute_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59";
static const char *second_options = "01\n02\n03\n04\n05\n06\n07\n08\n09\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59";
const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
static void gesture_event_cb(lv_event_t * e) static void gesture_event_cb(lv_event_t * e)
{ {
@ -51,21 +51,20 @@ static void cleanup_event_cb(lv_event_t * e)
static void time_roller_cb(lv_event_t * e) static void time_roller_cb(lv_event_t * e)
{ {
SettingsScreen_t *settingsScreen = e->user_data; SettingsScreen_t *settingsScreen = e->user_data;
} lv_obj_t *roller = lv_event_get_target(e);
static void brightness_slider_cb(lv_event_t * e) if(roller == settingsScreen->hour_roller)
{ {
SettingsScreen_t *settingsScreen = e->user_data; LV_LOG_USER("hour : %u", lv_roller_get_selected(roller));
} }
else if(roller == settingsScreen->minute_roller)
static void timeout_roller_cb(lv_event_t * e)
{ {
SettingsScreen_t *settingsScreen = e->user_data; LV_LOG_USER("minute : %u", lv_roller_get_selected(roller));
} }
else
static void orientation_dropdown_cb(lv_event_t * e)
{ {
SettingsScreen_t *settingsScreen = e->user_data; LV_LOG_USER("second : %u", lv_roller_get_selected(roller));
}
} }
static lv_obj_t* add_sidebar_entry_to_menu(lv_obj_t *parent, const char *title, lv_obj_t *menu, lv_obj_t *pageToShow) static lv_obj_t* add_sidebar_entry_to_menu(lv_obj_t *parent, const char *title, lv_obj_t *menu, lv_obj_t *pageToShow)
@ -204,11 +203,11 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_roller_set_visible_row_count(settingsScreen->hour_roller, 2); lv_roller_set_visible_row_count(settingsScreen->hour_roller, 2);
lv_obj_add_event_cb(settingsScreen->hour_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen); lv_obj_add_event_cb(settingsScreen->hour_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
lv_roller_set_options(settingsScreen->minute_roller, second_minute_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(settingsScreen->minute_roller, minute_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(settingsScreen->minute_roller, 2); lv_roller_set_visible_row_count(settingsScreen->minute_roller, 2);
lv_obj_add_event_cb(settingsScreen->minute_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen); lv_obj_add_event_cb(settingsScreen->minute_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
lv_roller_set_options(settingsScreen->second_roller, second_minute_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(settingsScreen->second_roller, second_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(settingsScreen->second_roller, 2); lv_roller_set_visible_row_count(settingsScreen->second_roller, 2);
lv_obj_add_event_cb(settingsScreen->second_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen); lv_obj_add_event_cb(settingsScreen->second_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
@ -233,15 +232,12 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_roller_set_options(settingsScreen->day_roller, day_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(settingsScreen->day_roller, day_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(settingsScreen->day_roller, 2); lv_roller_set_visible_row_count(settingsScreen->day_roller, 2);
lv_obj_add_event_cb(settingsScreen->day_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
lv_roller_set_options(settingsScreen->month_roller, month_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(settingsScreen->month_roller, month_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(settingsScreen->month_roller, 2); lv_roller_set_visible_row_count(settingsScreen->month_roller, 2);
lv_obj_add_event_cb(settingsScreen->month_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
lv_roller_set_options(settingsScreen->year_roller, year_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(settingsScreen->year_roller, year_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(settingsScreen->year_roller, 2); lv_roller_set_visible_row_count(settingsScreen->year_roller, 2);
lv_obj_add_event_cb(settingsScreen->year_roller, &(time_roller_cb), LV_EVENT_RELEASED, settingsScreen);
menu_page_label = lv_label_create(section); menu_page_label = lv_label_create(section);
lv_label_set_text_static(menu_page_label, "Date Format :"); lv_label_set_text_static(menu_page_label, "Date Format :");
@ -250,6 +246,7 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_t *date_dropdown = lv_dropdown_create(container); lv_obj_t *date_dropdown = lv_dropdown_create(container);
lv_dropdown_set_options_static(date_dropdown, date_format); lv_dropdown_set_options_static(date_dropdown, date_format);
//We create the menu page for the display settings //We create the menu page for the display settings
lv_obj_t *menu_page_2 = lv_menu_page_create(menu, NULL); lv_obj_t *menu_page_2 = lv_menu_page_create(menu, NULL);
@ -263,29 +260,18 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_clear_flag(slider, LV_OBJ_FLAG_GESTURE_BUBBLE); lv_obj_clear_flag(slider, LV_OBJ_FLAG_GESTURE_BUBBLE);
lv_obj_set_width(slider, lv_pct(90)); lv_obj_set_width(slider, lv_pct(90));
lv_obj_set_align(slider, LV_ALIGN_CENTER); lv_obj_set_align(slider, LV_ALIGN_CENTER);
lv_obj_add_event_cb(slider, &(brightness_slider_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
menu_page_label = lv_label_create(section); menu_page_label = lv_label_create(section);
lv_label_set_text_static(menu_page_label, "Sleep Timeout :"); lv_label_set_text_static(menu_page_label, "Sleep Timeout :");
container = create_section_container(section); container = create_section_container(section);
lv_obj_t *timeout = lv_roller_create(container); lv_obj_t *timeout = lv_roller_create(container);
lv_roller_set_options(timeout, timeout_options, LV_ROLLER_MODE_NORMAL); lv_roller_set_options(timeout, second_options, LV_ROLLER_MODE_NORMAL);
lv_roller_set_visible_row_count(timeout, 2); lv_roller_set_visible_row_count(timeout, 2);
lv_obj_add_event_cb(timeout, &(timeout_roller_cb), LV_EVENT_RELEASED, settingsScreen);
lv_obj_t *timeout_label = lv_label_create(container); lv_obj_t *timeout_label = lv_label_create(container);
lv_label_set_text_static(timeout_label, "Second(s)"); lv_label_set_text_static(timeout_label, "Second(s)");
lv_obj_set_style_pad_top(timeout_label, 25, LV_PART_MAIN); lv_obj_set_style_pad_top(timeout_label, 25, LV_PART_MAIN);
menu_page_label = lv_label_create(section);
lv_label_set_text_static(menu_page_label, "Orientation :");
container = create_section_container(section);
lv_obj_t *orientation_dropdown = lv_dropdown_create(container);
lv_dropdown_set_options_static(orientation_dropdown, orientation_format);
lv_obj_add_event_cb(orientation_dropdown, &(orientation_dropdown_cb), LV_EVENT_VALUE_CHANGED, settingsScreen);
//We create the side bar page //We create the side bar page
lv_obj_t *sidebar_page = lv_menu_page_create(menu, NULL); lv_obj_t *sidebar_page = lv_menu_page_create(menu, NULL);
lv_obj_t *settings_section_1 = lv_menu_section_create(sidebar_page); lv_obj_t *settings_section_1 = lv_menu_section_create(sidebar_page);
@ -295,7 +281,7 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_t *selected = add_sidebar_entry_to_menu(settings_section_1, "Time & Date", menu, menu_page_1); lv_obj_t *selected = add_sidebar_entry_to_menu(settings_section_1, "Time & Date", menu, menu_page_1);
add_sidebar_entry_to_menu(settings_section_1, "Display", menu, menu_page_2); add_sidebar_entry_to_menu(settings_section_1, "Display", menu, NULL);
add_sidebar_entry_to_menu(settings_section_1, "Notifications", menu, NULL); add_sidebar_entry_to_menu(settings_section_1, "Notifications", menu, NULL);
@ -312,6 +298,8 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_add_event_cb(settingsScreen->display, &(gesture_event_cb), LV_EVENT_GESTURE, settingsScreen); lv_obj_add_event_cb(settingsScreen->display, &(gesture_event_cb), LV_EVENT_GESTURE, settingsScreen);
//We register the event callback to handle the cleanup //We register the event callback to handle the cleanup
lv_obj_add_event_cb(settingsScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, settingsScreen); lv_obj_add_event_cb(settingsScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, settingsScreen);
} }
void settings_screen_destroy(SettingsScreen_t * const settingsScreen) void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
@ -331,7 +319,35 @@ void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
settingsScreen->display = NULL; settingsScreen->display = NULL;
} }
/*
lv_obj_t *conf_screen = NULL;
static void event_cb(lv_event_t * 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");
break;
case LV_DIR_RIGHT:
LV_LOG_USER("GESTURE : RIGHT");
extern MenuScreen_t menuScreen;
menu_screen_create(&menuScreen);
lv_scr_load_anim(menuScreen.display, LV_SCR_LOAD_ANIM_MOVE_RIGHT, 400, 0, false);
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);
}
}
/*const char *date_format = "dd/mm/yyyy\ndd/mm/yy\nyyyy/mm/dd\nyy/mm/dd";
const char *lang_options = "English\nFrench\nGerman\nItalian"; const char *lang_options = "English\nFrench\nGerman\nItalian";

File diff suppressed because one or more lines are too long

View File

@ -60,10 +60,6 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
//Don't forget to update the day date window //Don't forget to update the day date window
sprintf(watchFace->dateWindow.dateWindowText, "%s%d", watchFace->dateTime.tm_mday < 10 ? " " : "", watchFace->dateTime.tm_mday); sprintf(watchFace->dateWindow.dateWindowText, "%s%d", watchFace->dateTime.tm_mday < 10 ? " " : "", watchFace->dateTime.tm_mday);
lv_obj_invalidate(watchFace->dateWindow.dateWindowWidget); lv_obj_invalidate(watchFace->dateWindow.dateWindowWidget);
if(watchFace->batteryIndicatorCb)
watch_face_set_battery_indicator(watchFace, watchFace->batteryIndicatorCb());
} }
else else
{ {
@ -79,10 +75,6 @@ static void update_watch_hands_angles(WatchFace_t * const watchFace, uint8_t inc
lv_img_set_angle(watchFace->minuteHand.handImg, (uint16_t) watchFace->minuteHand.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->hourHand.handImg, (uint16_t) watchFace->hourHand.handAngle % 3600);
lv_img_set_angle(watchFace->mediumHand24h.handImg, (uint16_t) watchFace->mediumHand24h.handAngle % 3600); lv_img_set_angle(watchFace->mediumHand24h.handImg, (uint16_t) watchFace->mediumHand24h.handAngle % 3600);
static uint8_t percentage = 0;
watch_face_set_battery_indicator(watchFace, percentage++ % 101);
} }
else else
{ {
@ -150,39 +142,6 @@ void watch_face_create(WatchFace_t * const watchFace)
lv_obj_set_pos(smallHandImg, 69, 98); lv_obj_set_pos(smallHandImg, 69, 98);
lv_img_set_pivot(smallHandImg, 4, 20); lv_img_set_pivot(smallHandImg, 4, 20);
//Battery arc is created here
if(watchFace->batteryIndicator.battery_arc)
{
LV_LOG_ERROR("battery_arc should be NULL here !");
lv_obj_del(watchFace->batteryIndicator.battery_arc);
watchFace->batteryIndicator.battery_arc = NULL;
}
watchFace->batteryIndicator.battery_arc = lv_arc_create(watchFace->display);
lv_obj_remove_style(watchFace->batteryIndicator.battery_arc, NULL, LV_PART_KNOB);
lv_obj_clear_flag(watchFace->batteryIndicator.battery_arc, LV_OBJ_FLAG_CLICKABLE);
lv_obj_set_size(watchFace->batteryIndicator.battery_arc, 60, 60);
lv_obj_align(watchFace->batteryIndicator.battery_arc, LV_ALIGN_CENTER, -1, 45);
lv_obj_set_style_arc_width(watchFace->batteryIndicator.battery_arc, 5, LV_PART_INDICATOR);
lv_obj_set_style_arc_width(watchFace->batteryIndicator.battery_arc, 0, LV_PART_MAIN);
lv_obj_set_style_arc_color(watchFace->batteryIndicator.battery_arc, lv_color_make(228, 233, 236), LV_PART_INDICATOR);
lv_arc_set_value(watchFace->batteryIndicator.battery_arc, 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.battery_arc, LV_ALIGN_CENTER, 0, 0);
if(watchFace->mediumHand24h.handImg) if(watchFace->mediumHand24h.handImg)
{ {
LV_LOG_ERROR("mediumHand24hImg should be NULL here !"); LV_LOG_ERROR("mediumHand24hImg should be NULL here !");
@ -195,10 +154,10 @@ void watch_face_create(WatchFace_t * const watchFace)
lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 48); lv_obj_set_pos(watchFace->mediumHand24h.handImg, 115, 48);
lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 25); lv_img_set_pivot(watchFace->mediumHand24h.handImg, 4, 25);
/*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);
lv_obj_set_pos(mediumHandChronoImg, 115, 140); lv_obj_set_pos(mediumHandChronoImg, 115, 140);
lv_img_set_pivot(mediumHandChronoImg, 4, 25);*/ lv_img_set_pivot(mediumHandChronoImg, 4, 25);
//Date window is created here //Date window is created here
if(watchFace->dateWindow.dateWindowWidget) if(watchFace->dateWindow.dateWindowWidget)
@ -266,32 +225,6 @@ void watch_face_create(WatchFace_t * const watchFace)
watchFace->handAnimationTimer = lv_timer_create(&(hand_timer_anim_cb), 200, watchFace); watchFace->handAnimationTimer = lv_timer_create(&(hand_timer_anim_cb), 200, watchFace);
} }
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t percentage)
{
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(percentage <= 10)
arc_color = lv_color_make(228, 33, 81);
else if(percentage <= 30)
arc_color = lv_color_make(247, 148, 29);
else if(percentage <= 50)
arc_color = lv_color_make(226, 175, 58);
lv_arc_set_value(watchFace->batteryIndicator.battery_arc, percentage);
lv_obj_set_style_arc_color(watchFace->batteryIndicator.battery_arc, arc_color, LV_PART_INDICATOR);
sprintf(watchFace->batteryIndicator.text, "%u %%", percentage);
lv_label_set_text_static(watchFace->batteryIndicator.label, watchFace->batteryIndicator.text);
lv_obj_align_to(watchFace->batteryIndicator.label, watchFace->batteryIndicator.battery_arc, LV_ALIGN_CENTER, 0, 0);
}
void watch_face_destroy(WatchFace_t * const watchFace) void watch_face_destroy(WatchFace_t * const watchFace)
{ {
if(!watchFace) if(!watchFace)
@ -307,8 +240,6 @@ void watch_face_destroy(WatchFace_t * const watchFace)
watchFace->minuteHand.handImg = NULL; watchFace->minuteHand.handImg = NULL;
watchFace->secondHand.handImg = NULL; watchFace->secondHand.handImg = NULL;
watchFace->mediumHand24h.handImg = NULL; watchFace->mediumHand24h.handImg = NULL;
watchFace->batteryIndicator.battery_arc = NULL;
watchFace->batteryIndicator.label = NULL;
} }
void watch_face_force_sync(WatchFace_t *const watchFace) void watch_face_force_sync(WatchFace_t *const watchFace)

View File

@ -5,7 +5,6 @@
#include <time.h> #include <time.h>
typedef void (*DateTimeCb_t)(struct tm * const dateTime); typedef void (*DateTimeCb_t)(struct tm * const dateTime);
typedef uint8_t (*BatteryIndicatorCb_t)(void);
typedef struct DateWindow typedef struct DateWindow
{ {
@ -19,18 +18,10 @@ typedef struct WatchHand
float handAngle; float handAngle;
}WatchHand_t; }WatchHand_t;
typedef struct BatteryIndicator
{
lv_obj_t *label;
lv_obj_t *battery_arc;
char text[7];
} BatteryIndicator_t;
/* Watch face context object */ /* Watch face context object */
typedef struct WatchFace typedef struct WatchFace
{ {
DateTimeCb_t dateTimeCb; //Call back function used to retrieve the date and time needed by the watch face DateTimeCb_t dateTimeCb; //Call back function used to retrieve the date and time needed by the watch face
BatteryIndicatorCb_t batteryIndicatorCb; //Call back function used to update the battery level every minute
WatchHand_t hourHand; WatchHand_t hourHand;
WatchHand_t minuteHand; WatchHand_t minuteHand;
WatchHand_t secondHand; WatchHand_t secondHand;
@ -38,7 +29,6 @@ typedef struct WatchFace
lv_timer_t *handAnimationTimer; lv_timer_t *handAnimationTimer;
lv_obj_t *display; lv_obj_t *display;
DateWindow_t dateWindow; DateWindow_t dateWindow;
BatteryIndicator_t batteryIndicator;
struct tm dateTime; struct tm dateTime;
} WatchFace_t; } WatchFace_t;
@ -52,8 +42,6 @@ void watch_face_register_cb(WatchFace_t * const watchFace, DateTimeCb_t DateTime
/* Builds the watch face graphically */ /* Builds the watch face graphically */
void watch_face_create(WatchFace_t * const watchFace); void watch_face_create(WatchFace_t * const watchFace);
void watch_face_set_battery_indicator(WatchFace_t * const watchFace, uint8_t percentage);
/* Frees all resources used by the WatchFace object */ /* Frees all resources used by the WatchFace object */
void watch_face_destroy(WatchFace_t * const watchFace); void watch_face_destroy(WatchFace_t * const watchFace);