forked from Aircoookie/WLED
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sunrise/sunset: fix for ambiguous error value
sunset = 0 is a valid result, as the function result is in UTC and not local time . Example: local time is UTC-8, local sunrise = 08:00am => getSunriseUTC() = 0. So we cannot use "0" for "invalid". Using UINT16_MAX resolves the problem, and even allows to simplify calculateSunriseAndSunset() a bit.
- Loading branch information
1 parent
5ab0121
commit 72e864b
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters