Skip to content

Commit

Permalink
Apply automatic code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Oct 11, 2023
1 parent 97d481f commit 11d7b78
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/SunPosition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,21 @@ bool SunPositionClass::checkRecalcDayChanged()
localtime_r(&now, &timeinfo); // don't use getLocalTime() as there could be a delay of 10ms

uint32_t ymd;
ymd = (timeinfo.tm_year << 9) |
(timeinfo.tm_mon << 5) |
timeinfo.tm_mday;
ymd = (timeinfo.tm_year << 9) | (timeinfo.tm_mon << 5) | timeinfo.tm_mday;

if (_lastSunPositionCalculatedYMD != ymd) {
return true;
}
return false;
}


void SunPositionClass::updateSunData()
{
struct tm timeinfo;
bool gotLocalTime;

gotLocalTime = getLocalTime(&timeinfo, 5);
_lastSunPositionCalculatedYMD = (timeinfo.tm_year << 9) |
(timeinfo.tm_mon << 5) |
timeinfo.tm_mday;
_lastSunPositionCalculatedYMD = (timeinfo.tm_year << 9) | (timeinfo.tm_mon << 5) | timeinfo.tm_mday;
setDoRecalc(false);

if (!gotLocalTime) {
Expand Down

0 comments on commit 11d7b78

Please sign in to comment.