Browse Source

0.8.97

* add support for newest generation of inverters with A-F in their serial number
* fix NTP and sunrise / sunset
* set default coordinates to the mid of Germany #1516
pull/1535/head
lumapu 10 months ago
parent
commit
9971ed7f8a
  1. 5
      src/CHANGES.md
  2. 11
      src/app.cpp
  3. 4
      src/config/settings.h
  4. 2
      src/defines.h

5
src/CHANGES.md

@ -1,5 +1,10 @@
# Development Changes
## 0.8.97 - 2024-03-22
* add support for newest generation of inverters with A-F in their serial number
* fix NTP and sunrise / sunset
* set default coordinates to the mid of Germany #1516
## 0.8.96 - 2024-03-21
* fix precision of power limit in `/live` #1517
* fix translation of `Werte ausgeben` in `settings` #1507

11
src/app.cpp

@ -204,8 +204,13 @@ void app::regularTickers(void) {
#endif /*ENABLE_SIMULATOR*/
}
//-----------------------------------------------------------------------------
void app::onNtpUpdate(bool gotTime) {
mNtpReceived = true;
if ((0 == mSunrise) && (0.0 != mConfig->sun.lat) && (0.0 != mConfig->sun.lon)) {
mCalculatedTimezoneOffset = (int8_t)((mConfig->sun.lon >= 0 ? mConfig->sun.lon + 7.5 : mConfig->sun.lon - 7.5) / 15) * 3600;
tickCalcSunrise();
}
}
//-----------------------------------------------------------------------------
@ -236,10 +241,8 @@ void app::updateNtp(void) {
}
}
if ((0 == mSunrise) && (0.0 != mConfig->sun.lat) && (0.0 != mConfig->sun.lon)) {
mCalculatedTimezoneOffset = (int8_t)((mConfig->sun.lon >= 0 ? mConfig->sun.lon + 7.5 : mConfig->sun.lon - 7.5) / 15) * 3600;
tickCalcSunrise();
}
if(mNtpReceived)
onNtpUpdate(true);
mMqttReconnect = false;
}

4
src/config/settings.h

@ -427,8 +427,8 @@ class settings {
mCfg.ntp.port = DEF_NTP_PORT;
mCfg.ntp.interval = 720;
mCfg.sun.lat = 0.0;
mCfg.sun.lon = 0.0;
mCfg.sun.lat = 51.1; // mid of Germany
mCfg.sun.lon = 10.5; // mid of Germany
mCfg.sun.offsetSecMorning = 0;
mCfg.sun.offsetSecEvening = 0;

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 96
#define VERSION_PATCH 97
//-------------------------------------
typedef struct {

Loading…
Cancel
Save