mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-07 05:01:39 +02:00
0.8.39
* fix MqTT dis_night_comm in the morning #1309 * seperated offset for sunrise and sunset #1308
This commit is contained in:
parent
1b73e493a9
commit
2cda39c9f9
9 changed files with 79 additions and 55 deletions
|
@ -1,5 +1,5 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 2022 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// 2024 Ahoy, https://www.mikrocontroller.net/topic/525778
|
||||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -541,11 +541,13 @@ class Web {
|
|||
if (request->arg("sunLat") == "" || (request->arg("sunLon") == "")) {
|
||||
mConfig->sun.lat = 0.0;
|
||||
mConfig->sun.lon = 0.0;
|
||||
mConfig->sun.offsetSec = 0;
|
||||
mConfig->sun.offsetSecMorning = 0;
|
||||
mConfig->sun.offsetSecEvening = 0;
|
||||
} else {
|
||||
mConfig->sun.lat = request->arg("sunLat").toFloat();
|
||||
mConfig->sun.lon = request->arg("sunLon").toFloat();
|
||||
mConfig->sun.offsetSec = request->arg("sunOffs").toInt() * 60;
|
||||
mConfig->sun.offsetSecMorning = request->arg("sunOffsSr").toInt() * 60;
|
||||
mConfig->sun.offsetSecEvening = request->arg("sunOffsSs").toInt() * 60;
|
||||
}
|
||||
|
||||
// mqtt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue