Thomas Basler
e95afbf2cc
Use references instead of pointers whenver possible
2023-12-12 13:26:07 +01:00
Thomas Basler
8fb43fedf8
Add const keyword to methods
2023-12-12 01:30:40 +01:00
Thomas Basler
d6494fa791
Add const keyword to method parameters
2023-12-12 00:21:14 +01:00
Thomas Basler
47e905bcfc
Add const statement to several variables
2023-12-11 19:54:57 +01:00
Thomas Basler
0db5b2eb9a
Calculate SunPosition only every 5 seconds
2023-11-23 22:35:05 +01:00
Thomas Basler
12031ed09e
Migrate SunPosition to TaskScheduler
2023-11-23 22:35:05 +01:00
Thomas Basler
b85c53f476
Split config struct into different sub structs
2023-11-19 14:53:26 +01:00
Thomas Basler
d3f95000e2
Optimize Sun data calculation
2023-11-18 22:34:55 +01:00
Thomas Basler
6f685a4ab5
Fix: Day period is only calculated once
2023-11-16 18:03:25 +01:00
Thomas Basler
11d7b78d80
Apply automatic code formatting
2023-10-11 14:19:20 +02:00
Stefan Oberhumer
943dfc2dbf
Compute sunrise and sunset only if necessary.
...
Sunrise and -set must recomputed if one of the following conditions is met:
* The date changed (based on the selected timezone)
* Location (Lat/Lon) changed
* Sunset type changed
So instead of calculating that every minute just do it on update via web interface or date change.
If a new config is uploaded, the DTU gets restarted. There is no need to initiate a recalculation in this case.
2023-10-06 10:20:36 +02:00
Thomas Basler
abf95634db
Replace platform dependent variable types by platform independent
2023-09-03 23:27:53 +02:00
Thomas Basler
5a37948ca9
Fix: If no sunset/sunrise calculation is possible a wrong value is shown
...
This is catched now and a proper message is shown in the web UI. Also the mode is set to day.
2023-06-01 18:39:50 +02:00
Thomas Basler
e7198073af
Feature: Allow configuration of sunset type
2023-05-24 19:21:44 +02:00
Thomas Basler
97bc964b6c
Fix lint errors
2023-02-20 20:19:23 +01:00
Thomas Basler
b319c78dc1
Added methods to calculate and show sunrise and sunset times
2023-02-18 18:15:48 +01:00