diff --git a/src/CHANGES.md b/src/CHANGES.md index 3193ac157..15b9a3806 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,10 @@ # Development Changes +## 0.8.100 - 2024-03-27 +* fix captions in `/history #1532 +* fix get NTP time #1529 #1530 +* fix translation #1516 + ## 0.8.99 - 2024-03-27 * fix compilation of all environments diff --git a/src/app.cpp b/src/app.cpp index 2dd8c49cb..506074c57 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -245,17 +245,12 @@ void app::tickNtpUpdate(void) { if (!mNtpReceived) mNetwork->updateNtpTime(); - else + else { + nxtTrig = mConfig->ntp.interval * 60; // check again in configured interval mNtpReceived = false; + } updateNtp(); - nxtTrig = mConfig->ntp.interval * 60; // check again in 12h - - // immediately start communicating - if (mSendFirst) { - mSendFirst = false; - once(std::bind(&app::tickSend, this), 1, "senOn"); - } mMqttReconnect = false; @@ -532,7 +527,6 @@ void app::resetSystem(void) { mTimestamp = 1; #endif - mSendFirst = true; mAllIvNotAvail = true; mSunrise = 0; diff --git a/src/app.h b/src/app.h index cb5462676..66234a31c 100644 --- a/src/app.h +++ b/src/app.h @@ -440,7 +440,6 @@ class app : public IApp, public ah::Scheduler { bool mSaveReboot = false; uint8_t mSendLastIvId = 0; - bool mSendFirst = false; bool mAllIvNotAvail = false; bool mNetworkConnected = false; diff --git a/src/defines.h b/src/defines.h index 5c09041d4..86c8a8888 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,8 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 8 -#define VERSION_PATCH 99 - +#define VERSION_PATCH 100 //------------------------------------- typedef struct { uint8_t ch; diff --git a/src/network/AhoyNetwork.h b/src/network/AhoyNetwork.h index f90096db5..9573f48f7 100644 --- a/src/network/AhoyNetwork.h +++ b/src/network/AhoyNetwork.h @@ -57,11 +57,11 @@ class AhoyNetwork { } bool updateNtpTime(void) { - if(NetworkState::CONNECTED != mStatus) + if(NetworkState::GOT_IP != mStatus) return false; - IPAddress timeServer; if (!mUdp.connected()) { + IPAddress timeServer; if (!WiFi.hostByName(mConfig->ntp.addr, timeServer)) return false; if (!mUdp.connect(timeServer, mConfig->ntp.port)) @@ -71,7 +71,7 @@ class AhoyNetwork { mUdp.onPacket([this](AsyncUDPPacket packet) { this->handleNTPPacket(packet); }); - sendNTPpacket(timeServer); + sendNTPpacket(); return true; } @@ -173,7 +173,7 @@ class AhoyNetwork { #endif private: - void sendNTPpacket(IPAddress& address) { + void sendNTPpacket(void) { //DPRINTLN(DBG_VERBOSE, F("wifi::sendNTPpacket")); uint8_t buf[NTP_PACKET_SIZE]; memset(buf, 0, NTP_PACKET_SIZE); @@ -188,9 +188,7 @@ class AhoyNetwork { buf[14] = 49; buf[15] = 52; - //mUdp.beginPacket(address, 123); // NTP request, port 123 mUdp.write(buf, NTP_PACKET_SIZE); - //mUdp.endPacket(); } void handleNTPPacket(AsyncUDPPacket packet) { diff --git a/src/web/html/history.html b/src/web/html/history.html index 57bff2fcd..7ec9be7e2 100644 --- a/src/web/html/history.html +++ b/src/web/html/history.html @@ -136,7 +136,7 @@