Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
fbiego committed Aug 28, 2024
1 parent 1a765d6 commit c6b8660
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hal/esp32/app_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ void hal_setup()
watch.set24Hour(true);
watch.setBattery(85);

String about = "v4.0 [fbiego]\nESP32 C3 Mini\n" + watch.getAddress();
String about = String(ui_info_text) + "\nESP32 C3 Mini\n" + watch.getAddress();
lv_label_set_text(ui_aboutText, about.c_str());

// bool intro = prefs.getBool("intro", true);
Expand Down Expand Up @@ -1759,7 +1759,7 @@ void hal_loop()
lv_label_set_text(ui_hourLabel, watch.getHourZ().c_str());
lv_label_set_text(ui_dayLabel, watch.getTime("%A").c_str());
lv_label_set_text(ui_minuteLabel, watch.getTime("%M").c_str());
lv_label_set_text(ui_dateLabel, watch.getTime("%d\n%B").c_str());
lv_label_set_text(ui_dateLabel, watch.getTime("%d\n%b").c_str());
lv_label_set_text(ui_amPmLabel, watch.getAmPmC(false).c_str());
}
else
Expand Down
8 changes: 6 additions & 2 deletions hal/sdl2/app_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void update_faces();

// some pre-generated data just for preview
Notification notifications[10] = {
{.icon = 0xC0, .app = "Chronos", .time = "10:27", .message = "Chronos v3.6.0 is live! Enjoy enhanced notifications for finding your watch and viewing activity status, plus more. Upgrade now for an improved experience"},
{.icon = 0xC0, .app = "Chronos", .time = "10:27", .message = "Chronos v3.7.0 is live! Enjoy enhanced notifications for finding your watch and viewing activity status, plus more. Upgrade now for an improved experience"},
{.icon = 0x08, .app = "Skype", .time = "09:30", .message = "Hey there! Just reminding you about our meeting at 10:00 AM. Please make sure to prepare the presentation slides and gather all necessary documents beforehand. Looking forward to a productive discussion!"},
{.icon = 0x10, .app = "Facebook", .time = "14:20", .message = "You've got 3 new friend requests. Check them out now! Don't forget to catch up with your old friends and see what they've been up to lately. It's always nice to reconnect and expand your social circle."},
{.icon = 0x18, .app = "Telegram", .time = "16:45", .message = "New message from John: 'Hey, have you seen the latest news?' Let's catch up later today and discuss the latest updates together. It's always interesting to exchange ideas and opinions on current events."},
Expand All @@ -62,7 +62,7 @@ Weather weather[7] = {
};

const char *daysWk[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
const char *months[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
const char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
/**
* A task to measure the elapsed time for LittlevGL
* @param data unused
Expand Down Expand Up @@ -229,6 +229,8 @@ void setupFiles()
addListFile("kenya.bin", 152453);
addListFile("kenya.wf", 453);
addListFile("list.txt", 2453);

lv_obj_scroll_to_y(ui_fileManagerPanel, 1, LV_ANIM_ON);
}


Expand Down Expand Up @@ -291,6 +293,8 @@ void hal_setup(void)
lv_obj_scroll_to_y(ui_gameList, 1, LV_ANIM_ON);
lv_obj_add_state(ui_Switch2, LV_STATE_CHECKED);

lv_label_set_text_fmt(ui_aboutText, "%s\nLVGL Simulator\nA1:B2:C3:D4:E5:F6", ui_info_text);


/* Tick init.
* You have to call 'lv_tick_inc()' in periodically to inform LittelvGL about how much time were elapsed
Expand Down
2 changes: 2 additions & 0 deletions include/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#include <ChronosESP32.h>

#define UI_VERSION "4.1.0"

#ifdef ELECROW_C3

// screen configs
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ lib_deps =
build_flags =
${esp32.build_flags}
-D ELECROW_C3=1
-D LV_MEM_SIZE=(120U*1024U)
-D LV_MEM_SIZE=120U*1024U
-D LV_USE_QRCODE=1
; -D NO_WATCHFACES
-D ENABLE_CUSTOM_FACE=1
Expand Down
4 changes: 4 additions & 0 deletions src/ui/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include "./faces/2151/2151.h"
#include "./faces/3589/3589.h"

#define UI_VERSION "4.1.0"

const char* ui_info_text = "v" UI_VERSION " [fbiego]";

///////////////////// VARIABLES ////////////////////
void pulseCall_Animation(lv_obj_t *TargetObject, int delay);
void analogSecond_Animation(lv_obj_t * TargetObject, int delay);
Expand Down
1 change: 1 addition & 0 deletions src/ui/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ extern "C"
#include "games/racing/racing.h"
#include "apps/qmi8658c/qmi8658c.h"

extern const char* ui_info_text;
void pulseCall_Animation(lv_obj_t *TargetObject, int delay);
void analogSecond_Animation(lv_obj_t * TargetObject, int delay);
extern lv_anim_t secondsAnimation_0;
Expand Down

0 comments on commit c6b8660

Please sign in to comment.