Skip to content

Commit 5f9f029

Browse files
committed
v6.3
- fix C3 reboots - modify partitions size - add 466 & 410 watchfaces - add RTC support on Waveshare 2.06
1 parent b25a5dc commit 5f9f029

245 files changed

Lines changed: 205307 additions & 75 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

hal/esp32/app_hal.cpp

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@
5959
#ifdef M5_STACK_DIAL
6060
#include "M5Dial.h"
6161
#define tft M5Dial.Display
62-
#define buf_size 10
6362
#elif defined(VIEWE_SMARTRING) || defined(VIEWE_KNOB_15) || defined(ESPS3_1_75)|| defined(ESPS3_2_06)
6463
#include "displays/viewe.hpp"
65-
#define buf_size 40
6664
#define SW_ROTATION
6765
#elif defined(ELECROW_S3)
6866
#include "displays/elecrow_s3.hpp"
@@ -72,7 +70,6 @@
7270
#include "displays/viewe_2_8.hpp"
7371
#else
7472
#include "displays/generic.hpp"
75-
#define buf_size 10
7673
#endif
7774

7875
#if defined(VIEWE_KNOB_15) || defined(ELECROW_S3)
@@ -90,6 +87,11 @@ Encoder myEnc(ENCODER_A, ENCODER_B);
9087
RtcPCF8563<TwoWire> Rtc(Wire);
9188
#endif
9289

90+
#if ESPS3_2_06
91+
#include <SensorPCF85063.hpp>
92+
SensorPCF85063 rtc;
93+
#endif
94+
9395
#define FLASH FFat
9496
#define F_NAME "FATFS"
9597

@@ -1015,6 +1017,10 @@ void configCallback(Config config, uint32_t a, uint32_t b)
10151017
// set the RTC time
10161018
Rtc.SetDateTime(RtcDateTime(watch.getYear(), watch.getMonth() + 1, watch.getDay(), watch.getHour(true), watch.getMinute(), watch.getSecond()));
10171019

1020+
#endif
1021+
1022+
#if ESPS3_2_06
1023+
rtc.setDateTime(watch.getYear(), watch.getMonth() + 1, watch.getDay(), watch.getHour(true), watch.getMinute(), watch.getSecond());
10181024
#endif
10191025
// ui_update_seconds(watch.getSecond());
10201026
if (!hasUpdatedSec)
@@ -1982,6 +1988,9 @@ void hal_setup()
19821988
#endif
19831989
String chip = String(ESP.getChipModel());
19841990
watch.setName(chip);
1991+
#ifdef BOARD_NAME
1992+
watch.setName(BOARD_NAME);
1993+
#endif
19851994
watch.setConnectionCallback(connectionCallback);
19861995
watch.setNotificationCallback(notificationCallback);
19871996
watch.setConfigurationCallback(configCallback);
@@ -2108,6 +2117,17 @@ void hal_setup()
21082117
Rtc.SetSquareWavePin(PCF8563SquareWavePinMode_None);
21092118
#endif
21102119

2120+
#if ESPS3_2_06
2121+
if (!rtc.begin(Wire))
2122+
{
2123+
Timber.e("Failed to find PCF85063 - check your wiring!");
2124+
}
2125+
RTC_DateTime dt = rtc.getDateTime();
2126+
watch.setTime(dt.getSecond(), dt.getMinute(), dt.getHour(), dt.getDay(), dt.getMonth(), dt.getYear());
2127+
rtc.resetAlarm();
2128+
rtc.disableAlarm();
2129+
#endif
2130+
21112131
ui_update_seconds(watch.getSecond());
21122132

21132133
lv_rand_set_seed(millis());

hal/esp32/app_hal.h

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,57 @@
88
// 240x280 watchfaces
99

1010
#define ENABLE_FACE_174 // (174)
11-
// #define ENABLE_FACE_228 // (228)
1211
#define ENABLE_FACE_1041 // (1041)
13-
// #define ENABLE_FACE_1167 // (1167)
14-
// #define ENABLE_FACE_1169 // (1169)
15-
// #define ENABLE_FACE_2051 // (2051)
1612
#define ENABLE_FACE_2151 // (2151)
17-
// #define ENABLE_FACE_3589 // (3589)
13+
#if (FLASH_SIZE >= 8)
14+
#define ENABLE_FACE_228 // (228)
15+
#define ENABLE_FACE_1167 // (1167)
16+
#endif
17+
#if (FLASH_SIZE >= 16)
18+
#define ENABLE_FACE_1169 // (1169)
19+
#define ENABLE_FACE_2051 // (2051)
20+
#define ENABLE_FACE_3589 // (3589)
21+
#endif
1822

23+
#elif defined(ESPS3_2_06)
24+
#define ENABLE_FACE_174_410 // (174)
25+
#define ENABLE_FACE_228_410 // (228)
26+
#define ENABLE_FACE_1167_410 // (1167)
27+
#define ENABLE_FACE_2051_410 // (2051)
28+
#define ENABLE_FACE_1041_410 // (1041)
29+
#define ENABLE_FACE_2151_410 // (2151)
1930

20-
#elif defined(VIEWE_SMARTRING) || defined(VIEWE_KNOB_15) || defined(ESPS3_1_75) || defined(ESPS3_2_06)
31+
#elif defined(VIEWE_SMARTRING) || defined(VIEWE_KNOB_15) || defined(ESPS3_1_75)
2132

2233
#define ENABLE_FACE_756_2_466 // (Red)
2334
#define ENABLE_FACE_RADAR_466 // (Radar)
24-
#define ENABLE_FACE_75_2 // (Analog)
25-
#define ENABLE_FACE_34_2 // (Shadow)
35+
#define ENABLE_FACE_75_2_466 // (Analog)
36+
#define ENABLE_FACE_34_2_466 // (Shadow)
37+
#define ENABLE_FACE_79_2_466 // (Blue)
38+
#define ENABLE_FACE_PIXEL_RESIZED_466 // (Pixel)
39+
// #define ENABLE_FACE_SMART_RESIZED_466 // (Smart)
2640

2741
#else
2842
// 240x240 watchfaces
2943

30-
// #define ENABLE_FACE_ELECROW // elecrow analog
31-
// #define ENABLE_FACE_34_2 // (Shadow)
3244
#define ENABLE_FACE_75_2 // (Analog)
33-
// #define ENABLE_FACE_79_2 // (Blue)
34-
// #define ENABLE_FACE_116_2 // (Outline)
3545
#define ENABLE_FACE_756_2 // (Red)
36-
// #define ENABLE_FACE_B_W_RESIZED // (B & W)
37-
// #define ENABLE_FACE_KENYA // (Kenya)
38-
// #define ENABLE_FACE_PIXEL_RESIZED // (Pixel)
3946
#define ENABLE_FACE_RADAR // (Radar)
40-
// #define ENABLE_FACE_SMART_RESIZED // (Smart)
41-
// #define ENABLE_FACE_TIX_RESIZED // (Tix)
42-
// #define ENABLE_FACE_WFB_RESIZED // (WFB)
47+
#define ENABLE_FACE_34_2 // (Shadow)
48+
49+
#if (FLASH_SIZE >= 8)
50+
#define ENABLE_FACE_ELECROW // elecrow analog
51+
#define ENABLE_FACE_79_2 // (Blue)
52+
#define ENABLE_FACE_116_2 // (Outline)
53+
#define ENABLE_FACE_B_W_RESIZED // (B & W)
54+
#define ENABLE_FACE_PIXEL_RESIZED // (Pixel)
55+
#define ENABLE_FACE_SMART_RESIZED // (Smart)
56+
#endif
57+
#if (FLASH_SIZE >= 16)
58+
#define ENABLE_FACE_KENYA // (Kenya)
59+
#define ENABLE_FACE_TIX_RESIZED // (Tix)
60+
#define ENABLE_FACE_WFB_RESIZED // (WFB)
61+
#endif
4362

4463
#endif
4564

@@ -53,6 +72,9 @@
5372

5473
#ifndef ENABLE_FACE_ELECROW
5574
#define ENABLE_FACE_ELECROW // elecrow analog
75+
#if defined(ELECROW_C3)
76+
#undef ENABLE_FACE_34_2
77+
#endif
5678
#endif
5779
#endif
5880

hal/esp32/displays/pins.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@
265265
#define LCD_SD2 14
266266
#define LCD_SD3 9
267267
#define LCD_RST 11
268+
#define LCD_EN 40
268269

269270
#define TOUCH_SDA 41
270271
#define TOUCH_SCL 45

partitions.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Name, Type, SubType, Offset, Size, Flags
22
nvs, data, nvs, 0x9000, 0x5000,
33
otadata, data, ota, 0xe000, 0x2000,
4-
app0, app, ota_0, 0x10000, 0x350000,
5-
ffat, data, fat, 0x360000,0x90000,
4+
app0, app, ota_0, 0x10000, 0x360000,
5+
ffat, data, fat, 0x370000,0x80000,
66
coredump, data, coredump,0x3F0000,0x10000,

partitions_16M.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Name, Type, SubType, Offset, Size, Flags
22
nvs, data, nvs, 0x9000, 0x5000,
33
otadata, data, ota, 0xe000, 0x2000,
4-
app0, app, ota_0, 0x10000, 0x600000,
5-
ffat, data, fat, 0x610000,0x9E0000,
4+
app0, app, ota_0, 0x10000, 0x900000,
5+
ffat, data, fat, 0x910000,0x6E0000,
66
coredump, data, coredump,0xFF0000,0x10000,

platformio.ini

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ build_flags =
141141
-D LV_USE_QRCODE=1
142142
; -D ENABLE_CUSTOM_FACE=1
143143
-D LV_MEM_ADR=0
144+
-D BOARD_NAME="\"ELECROW C3 1.28"\"
144145
build_src_filter = ${esp32.build_src_filter}
145146

146147
; Viewe SmartRing 466x466 AMOLED
@@ -161,6 +162,8 @@ build_flags =
161162
; -D ENABLE_CUSTOM_FACE=1
162163
-D LV_MEM_ADR=0
163164
-DARDUINO_USB_CDC_ON_BOOT=1
165+
-D FLASH_SIZE=16
166+
-D BOARD_NAME="\"Viewe SmartRing"\"
164167
build_src_filter = ${esp32.build_src_filter}
165168

166169
; Viewe Touch Knob 466x466 AMOLED
@@ -180,6 +183,8 @@ build_flags =
180183
-D LV_USE_QRCODE=1
181184
; -D ENABLE_CUSTOM_FACE=1
182185
-D LV_MEM_ADR=0
186+
-D FLASH_SIZE=16
187+
-D BOARD_NAME="\"Viewe Touch Knob 1.5"\"
183188
build_src_filter = ${esp32.build_src_filter}
184189

185190
; Viewe 2.8 Inch 240x320
@@ -198,6 +203,8 @@ build_flags =
198203
-D LV_USE_QRCODE=1
199204
; -D ENABLE_CUSTOM_FACE=1
200205
-D LV_MEM_ADR=0
206+
-D FLASH_SIZE=16
207+
-D BOARD_NAME="\"Viewe S3 2.8"\"
201208
build_src_filter = ${esp32.build_src_filter}
202209

203210
; M5 Stack Dial 240x240
@@ -218,6 +225,8 @@ build_flags =
218225
-D LV_MEM_SIZE=144U*1024U
219226
; -D ENABLE_CUSTOM_FACE=1
220227
-D LV_USE_QRCODE=1
228+
-D FLASH_SIZE=8
229+
-D BOARD_NAME="\"M5Stack Dial"\"
221230
build_src_filter = ${esp32.build_src_filter}
222231

223232
; ESP32-C3 LVGL 1.28 Inch 240x240
@@ -233,6 +242,7 @@ build_flags =
233242
-D LV_USE_QRCODE=1
234243
; -D ENABLE_CUSTOM_FACE=1
235244
-D LV_MEM_ADR=0
245+
-D BOARD_NAME="\"ESP32 C3 1.28"\"
236246
build_src_filter = ${esp32.build_src_filter}
237247

238248
; Waveshare ESP32-S3-Touch-LCD-1.28
@@ -252,6 +262,8 @@ build_flags =
252262
-D LV_MEM_SIZE=144U*1024U
253263
; -D ENABLE_CUSTOM_FACE=1
254264
-D LV_USE_QRCODE=1
265+
-D FLASH_SIZE=16
266+
-D BOARD_NAME="\"Waveshare S3 1.28"\"
255267
build_src_filter = ${esp32.build_src_filter}
256268

257269
; Waveshare ESP32-S3-Touch-LCD-1.69
@@ -270,6 +282,52 @@ build_flags =
270282
-D ESPS3_1_69=1
271283
-D LV_MEM_SIZE=144U*1024U
272284
-D LV_USE_QRCODE=1
285+
-D FLASH_SIZE=16
286+
-D BOARD_NAME="\"Waveshare S3 1.69"\"
287+
build_src_filter = ${esp32.build_src_filter}
288+
289+
; ESP32-S3-Touch-AMOLED-1.75
290+
[env:lolin_s3_1_75]
291+
extends = esp32
292+
board = lolin_s3_pro
293+
board_build.partitions = partitions_16M.csv
294+
lib_deps =
295+
${esp32.lib_deps}
296+
moononournation/GFX Library for Arduino@1.5.7
297+
lewisxhe/SensorLib@0.3.1
298+
FastIMU=https://github.com/LiquidCGS/FastIMU/archive/refs/tags/1.2.6.zip
299+
build_flags =
300+
${esp32.build_flags}
301+
-D ESPS3_1_75=1
302+
-D LV_MEM_SIZE=144U*1024U
303+
-D LV_USE_QRCODE=1
304+
; -D ENABLE_CUSTOM_FACE=0
305+
-D LV_MEM_ADR=0
306+
-D ARDUINO_USB_MODE=1
307+
-D ARDUINO_USB_CDC_ON_BOOT=1
308+
-D BOARD_NAME="\"Waveshare S3 1.75"\"
309+
build_src_filter = ${esp32.build_src_filter}
310+
311+
; ESP32-S3-Touch-AMOLED-2.06
312+
[env:lolin_s3_2_06]
313+
extends = esp32
314+
board = lolin_s3_pro
315+
board_build.partitions = partitions_16M.csv
316+
lib_deps =
317+
${esp32.lib_deps}
318+
moononournation/GFX Library for Arduino@1.5.7
319+
lewisxhe/SensorLib@0.3.1
320+
FastIMU=https://github.com/LiquidCGS/FastIMU/archive/refs/tags/1.2.6.zip
321+
build_flags =
322+
${esp32.build_flags}
323+
-D ESPS3_2_06=1
324+
-D LV_MEM_SIZE=144U*1024U
325+
-D LV_USE_QRCODE=1
326+
;-D ENABLE_CUSTOM_FACE=0
327+
-D LV_MEM_ADR=0
328+
-D ARDUINO_USB_MODE=1
329+
-D ARDUINO_USB_CDC_ON_BOOT=1
330+
-D BOARD_NAME="\"Waveshare S3 2.06"\"
273331
build_src_filter = ${esp32.build_src_filter}
274332

275333
; Elecrow S3 - (240x296)
@@ -292,6 +350,8 @@ build_flags =
292350
-D ELECROW_S3=1
293351
-D LV_MEM_SIZE=144U*1024U
294352
-D LV_USE_QRCODE=1
353+
-D FLASH_SIZE=16
354+
-D BOARD_NAME="\"Elecrow S3"\"
295355
build_src_filter =
296356
${esp32.build_src_filter}
297357

@@ -306,6 +366,8 @@ build_flags =
306366
-D LV_MEM_SIZE=60U*1024U
307367
-D LV_MEM_ADR=0
308368
-D ESP32_CYD=1
369+
-D LV_USE_QRCODE=1
370+
-D BOARD_NAME="\"ESP32 CYD 2.8"\"
309371
build_src_filter = ${esp32.build_src_filter}
310372

311373
; ESP32 DOIT DEVKIT V1
@@ -393,45 +455,3 @@ build_flags =
393455
-D LV_USE_QRCODE=1
394456
-D NO_WATCHFACES=1
395457
build_src_filter = ${pico.build_src_filter}
396-
397-
; ESP32-S3-Touch-AMOLED-1.75
398-
[env:lolin_s3_1_75]
399-
extends = esp32
400-
board = lolin_s3_pro
401-
board_build.partitions = partitions_16M.csv
402-
lib_deps =
403-
${esp32.lib_deps}
404-
moononournation/GFX Library for Arduino@1.5.7
405-
lewisxhe/SensorLib@0.3.1
406-
FastIMU=https://github.com/LiquidCGS/FastIMU/archive/refs/tags/1.2.6.zip
407-
build_flags =
408-
${esp32.build_flags}
409-
-D ESPS3_1_75=1
410-
-D LV_MEM_SIZE=144U*1024U
411-
-D LV_USE_QRCODE=1
412-
; -D ENABLE_CUSTOM_FACE=0
413-
-D LV_MEM_ADR=0
414-
-D ARDUINO_USB_MODE=1
415-
-D ARDUINO_USB_CDC_ON_BOOT=1
416-
build_src_filter = ${esp32.build_src_filter}
417-
418-
; ESP32-S3-Touch-AMOLED-2.06
419-
[env:lolin_s3_2_06]
420-
extends = esp32
421-
board = lolin_s3_pro
422-
board_build.partitions = partitions_16M.csv
423-
lib_deps =
424-
${esp32.lib_deps}
425-
moononournation/GFX Library for Arduino@1.5.7
426-
lewisxhe/SensorLib@0.3.1
427-
FastIMU=https://github.com/LiquidCGS/FastIMU/archive/refs/tags/1.2.6.zip
428-
build_flags =
429-
${esp32.build_flags}
430-
-D ESPS3_2_06=1
431-
-D LV_MEM_SIZE=144U*1024U
432-
-D LV_USE_QRCODE=1
433-
;-D ENABLE_CUSTOM_FACE=0
434-
-D LV_MEM_ADR=0
435-
-D ARDUINO_USB_MODE=1
436-
-D ARDUINO_USB_CDC_ON_BOOT=1
437-
build_src_filter = ${esp32.build_src_filter}

src/common/generated_features.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,33 @@
2323
#include "../faces/79_2/79_2.h"
2424
#include "../faces/radar_466/radar_466.h"
2525
#include "../faces/2151/2151.h"
26+
#include "../faces/228_410/228_410.h"
2627
#include "../faces/smart_resized/smart_resized.h"
2728
#include "../faces/tix_resized/tix_resized.h"
2829
#include "../faces/228/228.h"
30+
#include "../faces/174_410/174_410.h"
2931
#include "../faces/34_2/34_2.h"
32+
#include "../faces/75_2_466/75_2_466.h"
3033
#include "../faces/174/174.h"
34+
#include "../faces/34_2_466/34_2_466.h"
3135
#include "../faces/756_2_466/756_2_466.h"
3236
#include "../faces/3589/3589.h"
3337
#include "../faces/elecrow/elecrow.h"
3438
#include "../faces/b_w_resized/b_w_resized.h"
3539
#include "../faces/756_2/756_2.h"
40+
#include "../faces/2151_410/2151_410.h"
3641
#include "../faces/wfb_resized/wfb_resized.h"
3742
#include "../faces/75_2/75_2.h"
43+
#include "../faces/116_2_466/116_2_466.h"
44+
#include "../faces/79_2_466/79_2_466.h"
3845
#include "../faces/116_2/116_2.h"
3946
#include "../faces/1167/1167.h"
47+
#include "../faces/pixel_resized_466/pixel_resized_466.h"
4048
#include "../faces/1169/1169.h"
4149
#include "../faces/radar/radar.h"
50+
#include "../faces/2051_410/2051_410.h"
4251
#include "../faces/pixel_resized/pixel_resized.h"
4352
#include "../faces/2051/2051.h"
53+
#include "../faces/1167_410/1167_410.h"
54+
#include "../faces/smart_resized_466/smart_resized_466.h"
4455
#include "../faces/1041/1041.h"

src/faces/1167-410.bin

417 KB
Binary file not shown.

0 commit comments

Comments
 (0)