Browse Source

0.8.14

* fixed NTP update and sunrise calculation #1240 #886
pull/1258/head
lumapu 10 months ago
parent
commit
c771c2e5df
  1. 1
      src/CHANGES.md
  2. 3
      src/app.cpp
  3. 6
      src/eth/ahoyeth.cpp

1
src/CHANGES.md

@ -3,6 +3,7 @@
## 0.8.14 - 2023-12-07
* fixed decimal points for temperature (WebUI) PR #1254
* fixed inverter statemachine available state PR #1252
* fixed NTPUpdate and sunrise calculation #1240 #886
## 0.8.13 - 2023-11-28
* merge PR #1239 symbolic layout for OLED 128x64 + motion senser functionality

3
src/app.cpp

@ -201,7 +201,8 @@ void app::updateNtp(void) {
void app::tickNtpUpdate(void) {
uint32_t nxtTrig = 5; // default: check again in 5 sec
#if defined(ETHERNET)
bool isOK = mEth.updateNtpTime();
bool isOK = (mTimestamp != 0);
mEth.updateNtpTime();
#else
bool isOK = mWifi.getNtpTime();
#endif

6
src/eth/ahoyeth.cpp

@ -57,8 +57,7 @@ bool ahoyeth::updateNtpTime(void) {
return false;
DPRINTLN(DBG_DEBUG, F("updateNtpTime: checking udp \"connection\"...")); Serial.flush();
if (!mUdp.connected())
{
if (!mUdp.connected()) {
DPRINTLN(DBG_DEBUG, F("updateNtpTime: About to (re)connect...")); Serial.flush();
IPAddress timeServer;
if (!WiFi.hostByName(mConfig->ntp.addr, timeServer))
@ -68,8 +67,7 @@ bool ahoyeth::updateNtpTime(void) {
return false;
DPRINTLN(DBG_DEBUG, F("updateNtpTime: Connected...")); Serial.flush();
mUdp.onPacket([this](AsyncUDPPacket packet)
{
mUdp.onPacket([this](AsyncUDPPacket packet) {
DPRINTLN(DBG_DEBUG, F("updateNtpTime: about to handle ntp packet...")); Serial.flush();
this->handleNTPPacket(packet);
});

Loading…
Cancel
Save