iv->commEnabled=!iv->config->disNightCom;// if sun.disNightCom is false, communication is always on
if(!iv->commEnabled){// inverter communication only during the day
if(mTimestamp<(mSunrise-mConfig->sun.offsetSecMorning)){// current time is before communication start, set next trigger to communication start
nxtTrig=mSunrise-mConfig->sun.offsetSecMorning;
if(mTimestamp<(mSunrise+mConfig->sun.offsetSecMorning)){// current time is before communication start, set next trigger to communication start
nxtTrig=mSunrise+mConfig->sun.offsetSecMorning;
}else{
if(mTimestamp>=(mSunset+mConfig->sun.offsetSecEvening)){// current time is past communication stop, nothing to do. Next update will be done at midnight by tickCalcSunrise