mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-05 13:14:45 +00:00
Compiling error fixes
This commit is contained in:
parent
93aa88129c
commit
53d5801790
@ -148,7 +148,7 @@ int formatDateTime(char* buf, size_t bufSize, uint32_t rtc_sec, OLEDDisplay* dis
|
|||||||
int year = 1970;
|
int year = 1970;
|
||||||
while (true) {
|
while (true) {
|
||||||
int daysInYear = isLeapYear(year) ? 366 : 365;
|
int daysInYear = isLeapYear(year) ? 366 : 365;
|
||||||
if (rtc_sec >= daysInYear) {
|
if (rtc_sec >= (uint32_t)daysInYear) {
|
||||||
rtc_sec -= daysInYear;
|
rtc_sec -= daysInYear;
|
||||||
year++;
|
year++;
|
||||||
} else {
|
} else {
|
||||||
@ -160,7 +160,7 @@ int formatDateTime(char* buf, size_t bufSize, uint32_t rtc_sec, OLEDDisplay* dis
|
|||||||
while (month < 12) {
|
while (month < 12) {
|
||||||
int dim = daysInMonth[month];
|
int dim = daysInMonth[month];
|
||||||
if (month == 1 && isLeapYear(year)) dim++;
|
if (month == 1 && isLeapYear(year)) dim++;
|
||||||
if (rtc_sec >= dim) {
|
if (rtc_sec >= (uint32_t)dim) {
|
||||||
rtc_sec -= dim;
|
rtc_sec -= dim;
|
||||||
month++;
|
month++;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user