Compare commits

...

9 Commits

22 changed files with 759 additions and 464 deletions

View File

@ -351,7 +351,7 @@ void watch_peripherals_vibrate(uint8_t strength, uint32_t durationMs)
tls_timer_start(_vibration_motor_timer_id);
}
void watch_peripherals_vibrate_with_pattern(uint8_t strength, uint16_t pattern[VIBRATION_PATTERN_SLOTS])
void watch_peripherals_vibrate_with_pattern(uint8_t strength, const uint16_t pattern[VIBRATION_PATTERN_SLOTS])
{
if(!pattern || !strength) return;
if(!pattern[0]) return;

View File

@ -92,7 +92,7 @@ void watch_peripherals_vibrate(uint8_t strength, uint32_t durationMs);
* @param pattern the vibration pattern : a pointer to an array of size @ref VIBRATION_PATTERN_SLOTS.
* The first duration is the on duration, the second is the off duration and so on.
*/
void watch_peripherals_vibrate_with_pattern(uint8_t strength, uint16_t pattern[VIBRATION_PATTERN_SLOTS]);
void watch_peripherals_vibrate_with_pattern(uint8_t strength, const uint16_t pattern[VIBRATION_PATTERN_SLOTS]);
/**
* @brief Sets the brightness of the LCD display

View File

@ -1,8 +1,8 @@
#ifndef FIRMWARE_VERSION_H
#define FIRMWARE_VERSION_H
#define FIRMWARE_VERSION "0.0.1" //Firmware creation
//#define FIRMWARE_VERSION "0.0.1" //Firmware creation
#define FIRMWARE_VERSION "0.0.2" //Updated the music player to be more accurate, Selected category in menu setting is now highlighted
#define FIRMWARE_TIME_DATE (__TIME__" "__DATE__)
#endif //FIRMWARE_VERSION_H

View File

@ -1,4 +1,6 @@
#include "lvgl.h"
#include "watch_peripherals.h"
#include "watch_settings.h"
/***
* It is needed to have a reference on two header_titles because when
@ -56,3 +58,13 @@ void common_screen_header_update_title(const char * title)
if(!*header_title_p)return;
lv_label_set_text_static(*header_title_p, title);
}
void common_screen_onclick_vibration(void)
{
uint16_t vibration_strength = persistency_get_settings()->display.display_vibrate_on_touch_strength*32;
uint32_t vibration_duration_ms = 0;
if(persistency_get_settings()->display.display_vibrate_on_touch_duration)
vibration_duration_ms = persistency_get_settings()->display.display_vibrate_on_touch_duration*50 + 50;
watch_peripherals_vibrate(vibration_strength > 255 ? 255 : vibration_strength, vibration_duration_ms);
}

View File

@ -19,4 +19,10 @@ void common_screen_header_component(lv_obj_t *parent, const char * title, lv_coo
*/
void common_screen_header_update_title(const char * title);
/**
* @brief Vibrate to give a feedback to the user when an item was clicked
*
*/
void common_screen_onclick_vibration(void);
#endif //COMMON_SCREEN_COMPONENTS_H

View File

@ -43,7 +43,7 @@ typedef struct CompassScreen
* @brief Initializes the compass screen object structure.
* @note This function has to be called first before any others.
*
* @param compassScreen a pointer to the compass screen object structure.
* @param compassScreen a pointer to the compass screen object structure to initialize.
*/
void compass_screen_init(CompassScreen_t * const compassScreen);

View File

@ -32,7 +32,7 @@ typedef struct FindMyPhoneScreen
/**
* @brief Initializes the find my phone screen object structure.
*
* @param findMyPhoneScreen a pointer to the find my phone screen object structure.
* @param findMyPhoneScreen a pointer to the find my phone screen object structure to initialize.
*/
void find_my_phone_screen_init(FindMyPhoneScreen_t * const findMyPhoneScreen);

View File

@ -15,6 +15,9 @@ static void menu_item_cb(lv_event_t *e)
uint32_t icon_id = (uint32_t)e->user_data;
LV_LOG_USER("Menu icon pressed : %u", icon_id);
// Give some user feedback that an item was clicked
common_screen_onclick_vibration();
switch(icon_id)
{
case 0:

View File

@ -7,7 +7,7 @@
static void _set_UI_no_ble_connection(MusicPlayerScreen_t * const musicPlayerScreen, bool connected);
static void _update_playing_track_visuals(MusicPlayerScreen_t * const musicPlayerScreen);
static void _update_playing_track_ref_time(MusicPlayerScreen_t * const musicPlayerScreen);
static uint16_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs);
static uint32_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs);
static void gesture_event_cb(lv_event_t *e)
{
@ -219,6 +219,9 @@ void music_player_screen_set_music_position(MusicPlayerScreen_t * const musicPla
positionInSeconds = positionInSeconds > musicPlayerScreen->currentMusicDuration ? musicPlayerScreen->currentMusicDuration : positionInSeconds;
musicPlayerScreen->currentMusicPosition = positionInSeconds * 1000;
//Don't forget to reset the time reference
if(musicPlayerScreen->musicPlayerTimeRefmsCb)musicPlayerScreen->playerStartTimeRef = musicPlayerScreen->musicPlayerTimeRefmsCb();
//Let's update the current music position visually
if(music_player_screen_is_in_use(musicPlayerScreen))
{
@ -513,14 +516,14 @@ static void _update_playing_track_ref_time(MusicPlayerScreen_t * const musicPlay
{
//Let's compute the time that has passed and update the current song position
uint32_t currentTimeMs = musicPlayerScreen->musicPlayerTimeRefmsCb ? musicPlayerScreen->musicPlayerTimeRefmsCb() : 0;
uint16_t timeDifferenceMs = _time_difference_in_ms(musicPlayerScreen->playerStartTimeRef, currentTimeMs);
uint32_t timeDifferenceMs = _time_difference_in_ms(musicPlayerScreen->playerStartTimeRef, currentTimeMs);
musicPlayerScreen->playerStartTimeRef = currentTimeMs;
musicPlayerScreen->currentMusicPosition = musicPlayerScreen->currentMusicPosition + timeDifferenceMs > musicPlayerScreen->currentMusicDuration * 1000 ?
musicPlayerScreen->currentMusicDuration * 1000 : musicPlayerScreen->currentMusicPosition + timeDifferenceMs;
}
static uint16_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs)
static uint32_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs)
{
return currentTimeMs - referenceTimeMs;
}

View File

@ -68,33 +68,101 @@ typedef struct MusicPlayerScreen
*/
void music_player_screen_init(MusicPlayerScreen_t * const musicPlayerScreen);
/**
* @brief Registers a callback function which will be called every time an action (button pressed) is performed with the type of action given as the parameter.
* This callback function can be used to forward the action to an other sub system like the BLE layer for example.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param musicPlaybackCtrlCb a pointer to a function having the following signature : void(MusicPlaybackCtrlAction_e).
* The action passed to the callback function can be of value :
* - MUSIC_CONTROL_PLAY
* - MUSIC_CONTROL_PAUSE
* - MUSIC_CONTROL_PLAYPAUSE
* - MUSIC_CONTROL_NEXT
* - MUSIC_CONTROL_PREVIOUS
* - MUSIC_CONTROL_VOLUMEUP
* - MUSIC_CONTROL_VOLUMEDOWN
* - MUSIC_CONTROL_FORWARD
* - MUSIC_CONTROL_REWIND
*/
void music_player_screen_register_music_playback_control_cb(MusicPlayerScreen_t * const musicPlayerScreen, MusicPlaybackCtrlCb_t musicPlaybackCtrlCb);
/**
* @brief Registers a callback function used by the music player to keep track of the system's time.
* This time is internaly used as a reference to stay in sync with the playing track's playtime.
* The function must return the system time in millisecond.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param musicPlayerTimeRefmsCb a pointer to a function having the following signature : uint32_t(void).
*/
void music_player_screen_register_music_player_time_ref_ms_cb(MusicPlayerScreen_t * const musicPlayerScreen, MusicPlayerTimeRefmsCb_t musicPlayerTimeRefmsCb);
/**
* @brief Tells the music player whether the watch is connected to a smartphone through a BLE connection or not.
* It, for example, enables the music player to grey the music controls (buttons) out if there is no established BLE connection.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param connected true if there is an active BLE connection, false otherwise.
*/
void music_player_screen_notify_BLE_connection_state(MusicPlayerScreen_t * const musicPlayerScreen, bool connected);
/**
* @brief Displays the current song's title and artist on the music player UI.
* If the information is not available, NULL can be passed as the value.
* The string is internally copied, so it can be freed after the function was called.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param title the title of the song
* @param artist the artists
*/
void music_player_screen_set_playing_music_title_and_artist(MusicPlayerScreen_t * const musicPlayerScreen, const char *title, const char *artist);
/**
* @brief Sets the song's duration in seconds to be displayed on the UI.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param durationInSeconds the song's duration in seconds.
*/
void music_player_screen_set_music_duration(MusicPlayerScreen_t * const musicPlayerScreen, uint16_t durationInSeconds);
/**
* @brief Sets the song's current playtime in seconds to be displayed on the UI.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param positionInSeconds the song's playtime in seconds.
*/
void music_player_screen_set_music_position(MusicPlayerScreen_t * const musicPlayerScreen, uint16_t positionInSeconds);
/**
* @brief Changes the current playing state of the song.
* This function should be used to keep the music player in sync with external events (ie : paused is pressed on the smartphone).
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @param playingState the new playing state to apply.
* Only two music states are relevant : MUSIC_CONTROL_PAUSE and MUSIC_CONTROL_PLAY.
*/
void music_player_screen_set_music_playing_state(MusicPlayerScreen_t * const musicPlayerScreen, MusicPlaybackCtrlAction_e playingState);
/**
* @brief Returns true if the music player screen is currently being displayed.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure.
* @return true if the music player screen is being used
* @return false if the music player screen is not being used/currently displayed
*/
bool music_player_screen_is_in_use(MusicPlayerScreen_t * const musicPlayerScreen);
/**
* @brief Graphically builds the music player screen.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure to initialize.
* @param musicPlayerScreen a pointer to the music player screen's context structure.
*/
void music_player_screen_create(MusicPlayerScreen_t * const musicPlayerScreen);
/**
* @brief Frees all resources used by the MusicPlayerScreen object.
*
* @param musicPlayerScreen a pointer to the music player screen's context structure to initialize.
* @param musicPlayerScreen a pointer to the music player screen's context structure.
*/
void music_player_screen_destroy(MusicPlayerScreen_t * const musicPlayerScreen);

View File

@ -170,6 +170,8 @@ static void vibration_duration_roller_cb(lv_event_t *e)
uint8_t index = lv_roller_get_selected(roller);
settingsScreen->settingsScreenAPIInterface.setDisplayVibrationDurationSettingsCb(&index, SETTING_MODE_SET);
common_screen_onclick_vibration();
}
static void vibration_strength_roller_cb(lv_event_t *e)
@ -181,6 +183,8 @@ static void vibration_strength_roller_cb(lv_event_t *e)
uint8_t index = lv_roller_get_selected(roller);
settingsScreen->settingsScreenAPIInterface.setDisplayVibrationStrengthSettingsCb(&index, SETTING_MODE_SET);
common_screen_onclick_vibration();
}
static void timeout_roller_cb(lv_event_t * e)
@ -760,7 +764,7 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_set_style_radius(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_left(menu_list, 7, LV_PART_MAIN);
lv_obj_set_style_pad_left(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(menu_list, 50, LV_PART_MAIN);
//We add the side screen containing the settings
@ -806,21 +810,25 @@ void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
settingsScreen->year_roller = NULL;
settingsScreen->display = NULL;
settingsScreen->about_refresh_timer = NULL;
settingsScreen->last_selected_item = NULL;
}
static void _simulate_side_screen_item_click(SettingsScreen_t * const settingsScreen, lv_obj_t *item)
{
static lv_obj_t *last_target = NULL;
if(settingsScreen->last_selected_item == item) return;
if(last_target == item) return;
if(last_target == settingsScreen->about_item)
if(settingsScreen->last_selected_item == settingsScreen->about_item)
{
lv_timer_del(settingsScreen->about_refresh_timer);
settingsScreen->about_refresh_timer = NULL;
}
last_target = item;
//Updating the background of the selected category
lv_obj_set_style_bg_color(item, lv_color_make(178, 223, 219), LV_PART_MAIN);
if(settingsScreen->last_selected_item)
lv_obj_set_style_bg_color(settingsScreen->last_selected_item, lv_color_white(), LV_PART_MAIN);
settingsScreen->last_selected_item = item;
if(item == settingsScreen->time_and_date_item)
{
@ -949,8 +957,9 @@ static lv_obj_t *add_menu_list_item(lv_obj_t *list, const char *text, lv_event_c
lv_obj_t *label = lv_obj_get_child(btn, 0);
if(label)
{
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
lv_obj_set_style_pad_right(btn, 0, LV_PART_MAIN);
lv_obj_set_style_pad_left(label, 7, LV_PART_MAIN);
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
}
lv_obj_add_event_cb(btn, event_cb, LV_EVENT_CLICKED, user_data);

View File

@ -43,6 +43,8 @@ typedef struct SettingsScreen
lv_obj_t *connectivity_item;
lv_obj_t *language_item;
lv_obj_t *about_item;
/* Remember the last clicked item needed for the background color logic */
lv_obj_t *last_selected_item;
lv_obj_t *side_screen;

View File

@ -82,7 +82,7 @@ typedef struct WatchFace
* @brief Initializes the watch face context object
* @note This function has to be called first before any others
*
* @param watchFace a pointer to the watch face context structure.
* @param watchFace a pointer to the watch face context structure to initialize.
*/
void watch_face_init(WatchFace_t * const watchFace);

View File

@ -54,25 +54,6 @@ static void touch_panel_isr(void *arg)
_indev_touched = true;
}
static void touch_panel_feedback_cb(struct _lv_indev_drv_t *lv_indev_drv, uint8_t lv_event_code)
{
(void)lv_indev_drv;
uint16_t vibration_strength = persistency_get_settings()->display.display_vibrate_on_touch_strength*32;
uint32_t vibration_duration_ms = 0;
if(persistency_get_settings()->display.display_vibrate_on_touch_duration)
vibration_duration_ms = persistency_get_settings()->display.display_vibrate_on_touch_duration*50 + 50;
switch(lv_event_code)
{
case LV_EVENT_LONG_PRESSED:
watch_peripherals_vibrate(255, vibration_duration_ms);
break;
case LV_EVENT_PRESSED:
watch_peripherals_vibrate(vibration_strength > 255 ? 255 : vibration_strength, vibration_duration_ms);
break;
}
}
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -111,7 +92,6 @@ void lv_port_indev_init(void)
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = touchpad_read;
indev_drv.user_data = &CST816D_Touch_Data;
indev_drv.feedback_cb = &(touch_panel_feedback_cb);
indev_touchpad = lv_indev_drv_register(&indev_drv);
}

View File

@ -1657,6 +1657,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="music_player_screen.h" />
<Unit filename="notification_screen.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="notification_screen.h" />
<Unit filename="rsrc/hour_hand.png" />
<Unit filename="settings_screen.c">
<Option compilerVar="CC" />

View File

@ -2,339 +2,9 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="altimeter_screen.c" open="0" top="0" tabpos="6" 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>
<Cursor1 position="13638" topLine="409" />
</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="lvgl\src\font\lv_font_montserrat_30.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="869" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5648" topLine="194" />
</Cursor>
</File>
<File name="lvgl\src\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="compass_screen.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1253" topLine="12" />
</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="lvgl\src\core\lv_obj_pos.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7730" topLine="167" />
</Cursor>
</File>
<File name="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\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="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="lv_drivers\lv_drv_conf_template.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10670" topLine="390" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.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_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\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1135" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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="settings_screen.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="315" topLine="0" />
</Cursor>
</File>
<File name="menu_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="48" topLine="0" />
</Cursor>
</File>
<File name="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\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9059" topLine="238" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4439" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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="altimeter_screen.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1028" topLine="30" />
</Cursor>
</File>
<File name="lvgl\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.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2184" topLine="61" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3097" topLine="74" />
</Cursor>
</File>
<File name="lv_drivers\indev\keyboard.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="440" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5230" topLine="191" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5693" topLine="115" />
</Cursor>
</File>
<File name="common_screen_components.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="498" topLine="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\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1299" topLine="36" />
</Cursor>
</File>
<File name="lvgl\src\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="watch_face.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="702" zoom_1="1" zoom_2="-1">
<Cursor>
<Cursor1 position="15425" topLine="359" />
</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\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_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\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="6581" topLine="189" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1759" topLine="61" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1282774" topLine="472" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_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\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="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="13" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
<Cursor>
<Cursor1 position="6200" topLine="152" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="615" topLine="25" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1988" topLine="67" />
</Cursor>
</File>
<File name="lvgl\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_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3835" topLine="68" />
</Cursor>
</File>
<File name="settings_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="25034" topLine="437" />
</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\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="138" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\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\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\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\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1234" topLine="139" />
</Cursor>
</File>
<File name="menu_screen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1107" topLine="1" />
</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\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\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_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\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\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="compass_screen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3567" topLine="72" />
</Cursor>
</File>
<File name="watch_casio_assets.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2981397" topLine="949" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="456" topLine="6" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_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" />
<Cursor1 position="0" topLine="56" />
</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">
@ -342,19 +12,44 @@
<Cursor1 position="635" topLine="36" />
</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">
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="289" topLine="31" />
<Cursor1 position="5230" topLine="191" />
</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">
<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="524" topLine="954" />
<Cursor1 position="7126" topLine="230" />
</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">
<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="13017" topLine="346" />
<Cursor1 position="3097" topLine="74" />
</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="music_player_screen.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1263" topLine="24" />
</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="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_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="firmware_version.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -362,9 +57,139 @@
<Cursor1 position="160" topLine="0" />
</Cursor>
</File>
<File name="main.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<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="3757" topLine="36" />
<Cursor1 position="1789" topLine="74" />
</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\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\widgets\label\lv_label.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5648" topLine="194" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1988" topLine="67" />
</Cursor>
</File>
<File name="menu_screen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1107" topLine="0" />
</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="3567" topLine="72" />
</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\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="notification_screen.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="387" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="539" topLine="9" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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="lv_drivers\lv_drv_conf_template.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10670" topLine="390" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_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="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="altimeter_screen.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1028" topLine="30" />
</Cursor>
</File>
<File name="lvgl\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="2638" topLine="87" />
</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="watch_face.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3688" topLine="16" />
</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="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="555" topLine="10" />
</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\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\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="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="lv_drivers\indev\keyboard.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="440" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\widgets\tileview\lv_tileview.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -376,19 +201,169 @@
<Collapse line="995" />
</Folding>
</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">
<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="3706" topLine="117" />
<Cursor1 position="2825" topLine="122" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<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="2638" topLine="87" />
<Cursor1 position="1135" topLine="14" />
</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">
<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="555" topLine="10" />
<Cursor1 position="10562" topLine="336" />
</Cursor>
</File>
<File name="lvgl\src\widgets\roller\lv_roller.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="715" topLine="26" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10233" topLine="226" />
</Cursor>
</File>
<File name="lvgl\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="main.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3368" topLine="116" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1759" topLine="61" />
</Cursor>
</File>
<File name="watch_casio_assets.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2981397" topLine="949" />
</Cursor>
</File>
<File name="lvgl\src\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.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7730" topLine="167" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1299" topLine="36" />
</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="altimeter_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13638" topLine="409" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2082" topLine="62" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_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="notification_screen.c" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2746" topLine="48" />
</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="13017" topLine="346" />
</Cursor>
</File>
<File name="settings_screen.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1893" topLine="40" />
</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="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\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="compass_screen.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1253" topLine="0" />
</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="settings_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="37082" topLine="603" />
</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\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="456" topLine="6" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4439" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\widgets\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\font\lv_font_montserrat_12.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="22" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10782" topLine="316" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5693" topLine="115" />
</Cursor>
</File>
<File name="watch_menu_icons.c" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -416,79 +391,24 @@
<Collapse line="1729" />
</Folding>
</File>
<File name="lvgl\src\core\lv_obj_pos.c" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10562" topLine="336" />
</Cursor>
</File>
<File name="lvgl\src\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="watch_face.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="702" topLine="31" />
</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\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\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="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\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="56" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="lvgl\src\widgets\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\core\lv_obj.c" 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>
<Cursor1 position="7842" topLine="283" />
<Cursor1 position="3835" topLine="68" />
</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">
<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="13491" topLine="412" />
<Cursor1 position="2557" topLine="68" />
</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">
<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="1078" topLine="3" />
</Cursor>
</File>
<File name="music_player_screen.h" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="356" topLine="0" />
</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" />
<Cursor1 position="1563" topLine="27" />
</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">
@ -496,24 +416,114 @@
<Cursor1 position="6210" topLine="113" />
</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">
<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="1789" topLine="74" />
<Cursor1 position="722" topLine="32" />
</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">
<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="2082" topLine="62" />
<Cursor1 position="1282774" topLine="472" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\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="10782" topLine="316" />
<Cursor1 position="869" topLine="0" />
</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">
<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="585" topLine="0" />
<Cursor1 position="1863" topLine="59" />
</Cursor>
</File>
<File name="music_player_screen.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="1" zoom_2="0">
<Cursor>
<Cursor1 position="4937" topLine="104" />
</Cursor>
</File>
<File name="lv_drivers\display\monitor.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="289" topLine="31" />
</Cursor>
</File>
<File name="lvgl\src\widgets\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="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="6152" topLine="192" />
</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_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="189" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12525" topLine="363" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_indev.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="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="watch_face.c" open="0" top="0" tabpos="1" split="0" active="1" splitpos="702" zoom_1="1" zoom_2="-1">
<Cursor>
<Cursor1 position="15425" topLine="414" />
</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="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="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="3064" topLine="106" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1234" topLine="139" />
</Cursor>
</File>
<File name="lvgl\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="menu_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="48" topLine="0" />
</Cursor>
</File>
<File name="common_screen_components.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="498" topLine="21" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -23,6 +23,7 @@
#include "altimeter_screen.h"
#include "find_my_phone_screen.h"
#include "music_player_screen.h"
#include "notification_screen.h"
/*********************
@ -97,6 +98,7 @@ SettingsScreen_t settingsScreen;
AltimeterScreen_t altimeterScreen;
FindMyPhoneScreen_t findMyPhoneScreen;
MusicPlayerScreen_t musicPlayerScreen;
NotificationScreen_t notificationScreen;
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int nCmdShow)
{
@ -123,6 +125,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLi
compass_screen_init(&compassScreen);
settings_screen_init(&settingsScreen);
altimeter_screen_init(&altimeterScreen);
notification_screen_init(&notificationScreen);
find_my_phone_screen_init(&findMyPhoneScreen);
find_my_phone_screen_register_BLE_command_send_cb(&findMyPhoneScreen, &(sendMyFindPhoneBLECommandCb));
find_my_phone_screen_notify_BLE_connection_state(&findMyPhoneScreen, true);

View File

@ -6,7 +6,7 @@
static void _set_UI_no_ble_connection(MusicPlayerScreen_t * const musicPlayerScreen, bool connected);
static void _update_playing_track_visuals(MusicPlayerScreen_t * const musicPlayerScreen);
static void _update_playing_track_ref_time(MusicPlayerScreen_t * const musicPlayerScreen);
static uint16_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs);
static uint32_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs);
static void gesture_event_cb(lv_event_t *e)
{
@ -218,6 +218,9 @@ void music_player_screen_set_music_position(MusicPlayerScreen_t * const musicPla
positionInSeconds = positionInSeconds > musicPlayerScreen->currentMusicDuration ? musicPlayerScreen->currentMusicDuration : positionInSeconds;
musicPlayerScreen->currentMusicPosition = positionInSeconds * 1000;
//Don't forget to reset the time reference
if(musicPlayerScreen->musicPlayerTimeRefmsCb)musicPlayerScreen->playerStartTimeRef = musicPlayerScreen->musicPlayerTimeRefmsCb();
//Let's update the current music position visually
if(music_player_screen_is_in_use(musicPlayerScreen))
{
@ -512,14 +515,14 @@ static void _update_playing_track_ref_time(MusicPlayerScreen_t * const musicPlay
{
//Let's compute the time that has passed and update the current song position
uint32_t currentTimeMs = musicPlayerScreen->musicPlayerTimeRefmsCb ? musicPlayerScreen->musicPlayerTimeRefmsCb() : 0;
uint16_t timeDifferenceMs = _time_difference_in_ms(musicPlayerScreen->playerStartTimeRef, currentTimeMs);
uint32_t timeDifferenceMs = _time_difference_in_ms(musicPlayerScreen->playerStartTimeRef, currentTimeMs);
musicPlayerScreen->playerStartTimeRef = currentTimeMs;
musicPlayerScreen->currentMusicPosition = musicPlayerScreen->currentMusicPosition + timeDifferenceMs > musicPlayerScreen->currentMusicDuration * 1000 ?
musicPlayerScreen->currentMusicDuration * 1000 : musicPlayerScreen->currentMusicPosition + timeDifferenceMs;
}
static uint16_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs)
static uint32_t _time_difference_in_ms(uint32_t referenceTimeMs, uint32_t currentTimeMs)
{
return currentTimeMs - referenceTimeMs;
}

View File

@ -0,0 +1,140 @@
#include <stdlib.h>
#include "notification_screen.h"
bool _notification_list_is_empty(NotificationList_t notificationList);
void _notification_list_add_head(NotificationList_t *notificationList, Notification_t *notification);
Notification_t *_notification_list_remove_tail(NotificationList_t *notificationList);
uint8_t _notification_list_count(NotificationList_t notificationList);
void _notification_list_debug(NotificationList_t notificationList);
void notification_screen_init(NotificationScreen_t * const notificationScreen)
{
if(!notificationScreen)
{
LV_LOG_ERROR("NULL pointer given !");
return;
}
//Let's initialize the list of free notifications from the pool
for(uint8_t i = 0; i < MAX_NOTIFICATIONS_COUNT; i++)
_notification_list_add_head(&notificationScreen->freeNotificationList, notificationScreen->notificationPool + i);
notification_screen_notify(notificationScreen, 42, NOTIFICATION_TYPE_UNKNOWN, NULL, NULL);
}
void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, NotificationType_e notificationType, char * title, char * body)
{
if(!notificationScreen)
{
LV_LOG_ERROR("NULL pointer given !");
return;
}
Notification_t *notification = NULL;
//We try to get a notification from the free list.
if((notification = _notification_list_remove_tail(&notificationScreen->freeNotificationList)) == NULL)
{
//If that fails, we reuse the oldest notification from the used list.
if((notification = _notification_list_remove_tail(&notificationScreen->notificationList)) == NULL)
{
//That's bad
LV_LOG_ERROR("Unable to find a notification to reuse !");
return;
}
//Don't forget to free the allocated strings if not already done
free(notification->title);
free(notification->body);
}
notification->handle = handle;
notification->type = notificationType;
notification->title = title;
notification->body = body;
_notification_list_add_head(&notificationScreen->notificationList, notification);
//Create and display a graphical widget containing the notification
lv_obj_t *notification_display = lv_layer_sys();
if(!notification_display)
{
LV_LOG_ERROR("Could not retrieve sys layer !");
return;
}
/*lv_obj_t *obj = lv_obj_create(notification_display);
lv_obj_set_style_bg_color(obj, lv_palette_main(LV_PALETTE_RED), LV_PART_MAIN);
lv_obj_set_height(obj, lv_disp_get_hor_res(NULL)/2);
lv_obj_set_style_bg_opa(notification_display, 255, LV_PART_MAIN);*/
}
bool _notification_list_is_empty(NotificationList_t notificationList)
{
return notificationList == NULL;
}
void _notification_list_add_head(NotificationList_t *notificationList, Notification_t *notification)
{
if(!notificationList || !notification) return;
if(_notification_list_is_empty(*notificationList))
*notificationList = notification;
else
{
notification->next = *notificationList;
*notificationList = notification;
}
}
Notification_t *_notification_list_remove_tail(NotificationList_t *notificationList)
{
if(!notificationList) return NULL;
if(_notification_list_is_empty(*notificationList)) return NULL;
Notification_t *toReturn = NULL;
//There is only one item in the list
if((*notificationList)->next == NULL)
{
toReturn = *notificationList;
*notificationList = NULL;
return toReturn;
}
NotificationList_t cursor = *notificationList;
while(!_notification_list_is_empty(cursor->next->next))
{
cursor = cursor->next;
}
toReturn = cursor->next;
cursor->next = NULL;
return toReturn;
}
uint8_t _notification_list_count(NotificationList_t notificationList)
{
uint8_t count = 0;
while(!_notification_list_is_empty(notificationList))
{
notificationList = notificationList->next;
count++;
}
return count;
}
void _notification_list_debug(NotificationList_t notificationList)
{
while(!_notification_list_is_empty(notificationList))
{
LV_LOG_USER("Notification handle :%u", notificationList->handle);
notificationList = notificationList->next;
}
}

View File

@ -0,0 +1,45 @@
#ifndef NOTIFICATION_SCREEN_H
#include "lvgl.h"
#define MAX_NOTIFICATIONS_COUNT (10) //The maximum number of notifications which will be stored before the oldest one gets discarded.
typedef enum NotificationType
{
NOTIFICATION_TYPE_SMS = 0,
NOTIFICATION_TYPE_EMAIL,
NOTIFICATION_TYPE_WHATSAPP,
NOTIFICATION_TYPE_GADGET_BRIDGE,
NOTIFICATION_TYPE_UNKNOWN,
} NotificationType_e;
typedef struct Notification
{
struct Notification *next;
uint32_t handle;
NotificationType_e type;
char *title;
char *body;
} Notification_t, *NotificationList_t;
typedef struct NotificationScreen
{
//Can be erased attributes
lv_obj_t *display;
//Should not be erased attributes
Notification_t notificationPool[MAX_NOTIFICATIONS_COUNT];
NotificationList_t notificationList; //Actual notifications
NotificationList_t freeNotificationList; //Free notiffication object pool
} NotificationScreen_t;
void notification_screen_init(NotificationScreen_t * const notificationScreen);
void notification_screen_notify(NotificationScreen_t * const notificationScreen, uint32_t handle, NotificationType_e notificationType, char * title, char * body);
void notification_screen_create(NotificationScreen_t * const notificationScreen);
void notification_screen_destroy(NotificationScreen_t * const notificationScreen);
#endif // NOTIFICATION_SCREEN_H

View File

@ -582,7 +582,7 @@ void settings_screen_create(SettingsScreen_t * const settingsScreen)
lv_obj_set_style_radius(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_left(menu_list, 7, LV_PART_MAIN);
lv_obj_set_style_pad_left(menu_list, 0, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(menu_list, 50, LV_PART_MAIN);
//We add the side screen containing the settings
@ -628,21 +628,25 @@ void settings_screen_destroy(SettingsScreen_t * const settingsScreen)
settingsScreen->year_roller = NULL;
settingsScreen->display = NULL;
settingsScreen->about_refresh_timer = NULL;
settingsScreen->last_selected_item = NULL;
}
static void _simulate_side_screen_item_click(SettingsScreen_t * const settingsScreen, lv_obj_t *item)
{
static lv_obj_t *last_target = NULL;
if(settingsScreen->last_selected_item == item) return;
if(last_target == item) return;
if(last_target == settingsScreen->about_item)
if(settingsScreen->last_selected_item == settingsScreen->about_item)
{
lv_timer_del(settingsScreen->about_refresh_timer);
settingsScreen->about_refresh_timer = NULL;
}
last_target = item;
//Updating the background of the selected category
lv_obj_set_style_bg_color(item, lv_color_make(178, 223, 219), LV_PART_MAIN);
if(settingsScreen->last_selected_item)
lv_obj_set_style_bg_color(settingsScreen->last_selected_item, lv_color_white(), LV_PART_MAIN);
settingsScreen->last_selected_item = item;
if(item == settingsScreen->time_and_date_item)
{
@ -712,8 +716,9 @@ static lv_obj_t *add_menu_list_item(lv_obj_t *list, const char *text, lv_event_c
lv_obj_t *label = lv_obj_get_child(btn, 0);
if(label)
{
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
lv_obj_set_style_pad_right(btn, 0, LV_PART_MAIN);
lv_obj_set_style_pad_left(label, 7, LV_PART_MAIN);
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
}
lv_obj_add_event_cb(btn, event_cb, LV_EVENT_CLICKED, user_data);

View File

@ -18,6 +18,8 @@ typedef struct SettingsScreen
lv_obj_t *connectivity_item;
lv_obj_t *language_item;
lv_obj_t *about_item;
/* Remember the last clicked item needed for the background color logic */
lv_obj_t *last_selected_item;
lv_obj_t *side_screen;