Apply automatic code formatting
This commit is contained in:
parent
97d481fa65
commit
11d7b78d80
@ -55,9 +55,7 @@ bool SunPositionClass::checkRecalcDayChanged()
|
|||||||
localtime_r(&now, &timeinfo); // don't use getLocalTime() as there could be a delay of 10ms
|
localtime_r(&now, &timeinfo); // don't use getLocalTime() as there could be a delay of 10ms
|
||||||
|
|
||||||
uint32_t ymd;
|
uint32_t ymd;
|
||||||
ymd = (timeinfo.tm_year << 9) |
|
ymd = (timeinfo.tm_year << 9) | (timeinfo.tm_mon << 5) | timeinfo.tm_mday;
|
||||||
(timeinfo.tm_mon << 5) |
|
|
||||||
timeinfo.tm_mday;
|
|
||||||
|
|
||||||
if (_lastSunPositionCalculatedYMD != ymd) {
|
if (_lastSunPositionCalculatedYMD != ymd) {
|
||||||
return true;
|
return true;
|
||||||
@ -65,16 +63,13 @@ bool SunPositionClass::checkRecalcDayChanged()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SunPositionClass::updateSunData()
|
void SunPositionClass::updateSunData()
|
||||||
{
|
{
|
||||||
struct tm timeinfo;
|
struct tm timeinfo;
|
||||||
bool gotLocalTime;
|
bool gotLocalTime;
|
||||||
|
|
||||||
gotLocalTime = getLocalTime(&timeinfo, 5);
|
gotLocalTime = getLocalTime(&timeinfo, 5);
|
||||||
_lastSunPositionCalculatedYMD = (timeinfo.tm_year << 9) |
|
_lastSunPositionCalculatedYMD = (timeinfo.tm_year << 9) | (timeinfo.tm_mon << 5) | timeinfo.tm_mday;
|
||||||
(timeinfo.tm_mon << 5) |
|
|
||||||
timeinfo.tm_mday;
|
|
||||||
setDoRecalc(false);
|
setDoRecalc(false);
|
||||||
|
|
||||||
if (!gotLocalTime) {
|
if (!gotLocalTime) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user