Commit Graph

9 Commits

Author SHA1 Message Date
Thomas Basler
d6494fa791 Add const keyword to method parameters 2023-12-12 00:21:14 +01:00
Thomas Basler
12031ed09e Migrate SunPosition to TaskScheduler 2023-11-23 22:35:05 +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
Stefan Oberhumer
7f99095fca Remove SUNPOS_UPDATE_INTERVAL define and introduce INVERTER_UPDATE_SETTINGS_INTERVAL. 2023-10-06 11:13:09 +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
b319c78dc1 Added methods to calculate and show sunrise and sunset times 2023-02-18 18:15:48 +01:00