fix Lunar date

This commit is contained in:
Shuanglei Tao
2025-05-09 22:22:16 +08:00
parent 362e8dc283
commit 080946c7e6

View File

@@ -198,7 +198,6 @@ void DrawGUI(gui_data_t *data, buffer_callback draw, display_mode_t mode)
struct Lunar_Date Lunar;
transformTime(data->timestamp, &tm);
LUNAR_SolarToLunar(&Lunar, tm.tm_year + YEAR0, tm.tm_mon + 1, tm.tm_mday);
Adafruit_GFX gfx;
@@ -211,6 +210,8 @@ void DrawGUI(gui_data_t *data, buffer_callback draw, display_mode_t mode)
do {
GFX_fillScreen(&gfx, GFX_WHITE);
LUNAR_SolarToLunar(&Lunar, tm.tm_year + YEAR0, tm.tm_mon + 1, tm.tm_mday);
switch (mode) {
case MODE_CALENDAR:
DrawCalendar(&gfx, &tm, &Lunar);