Compare commits

...

2 commits

Author SHA1 Message Date
Martin Brodbeck 89f646fc6c push version 2023-01-13 17:53:55 +01:00
Martin Brodbeck 5b12a9cd16 fix setting dotw 2023-01-13 17:53:25 +01:00
2 changed files with 4 additions and 1 deletions

View file

@ -21,7 +21,7 @@ if (PICO_SDK_VERSION_STRING VERSION_LESS "1.4.0")
message(FATAL_ERROR "Raspberry Pi Pico SDK version 1.4.0 (or later) required. Your version is ${PICO_SDK_VERSION_STRING}")
endif()
project(abfall VERSION "1.2.0" LANGUAGES C CXX ASM)
project(abfall VERSION "1.2.1" LANGUAGES C CXX ASM)
# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()

View file

@ -261,11 +261,14 @@ void add_one_day(datetime_t &dt) {
dt.year += 1;
dt.month = 1;
dt.day = 1;
dt.dotw = (dt.dotw + 1) % 7;
} else if (dt.day == daysPerMonth[dt.month]) {
dt.month = (dt.month + 1) % 12;
dt.day = 1;
dt.dotw = (dt.dotw + 1) % 7;
} else {
dt.day += 1;
dt.dotw = (dt.dotw + 1) % 7;
}
}