Skip to content

Commit

Permalink
Calculate SunPosition only every 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Nov 23, 2023
1 parent 134fefa commit 0db5b2e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SunPosition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void SunPositionClass::init(Scheduler* scheduler)
scheduler->addTask(_loopTask);
_loopTask.setCallback(std::bind(&SunPositionClass::loop, this));
_loopTask.setIterations(TASK_FOREVER);
_loopTask.setInterval(5 * TASK_SECOND);
_loopTask.enable();
}

Expand Down

0 comments on commit 0db5b2e

Please sign in to comment.