* fix inverter communication with manual time sync #1603
* improved queue, only add new object once they not exist
* added option to reset values on communication start (sunrise)
This commit is contained in:
lumapu 2024-05-03 23:54:06 +02:00
parent 4fe5c8eef8
commit 84ac10531a
10 changed files with 60 additions and 18 deletions

View file

@ -162,6 +162,9 @@ void app::regularTickers(void) {
everySec([this]() { mProtection->tickSecond(); }, "prot");
everySec([this]() {mNetwork->tickNetworkLoop(); }, "net");
if(mConfig->inst.startWithoutTime && !mNetworkConnected)
every(std::bind(&app::tickSend, this), mConfig->inst.sendInterval, "tSend");
// Plugins
#if defined(PLUGIN_DISPLAY)
if (DISP_TYPE_T0_NONE != mConfig->plugin.display.type)
@ -275,6 +278,8 @@ void app::tickIVCommunication(void) {
if (mTimestamp >= (mSunset + mConfig->sun.offsetSecEvening)) { // current time is past communication stop, nothing to do. Next update will be done at midnight by tickCalcSunrise
nxtTrig = 0;
} else { // current time lies within communication start/stop time, set next trigger to communication stop
if((!iv->commEnabled) && mConfig->inst.rstValsCommStart)
zeroValues = true;
iv->commEnabled = true;
nxtTrig = mSunset + mConfig->sun.offsetSecEvening;
}