|
|
@ -579,7 +579,6 @@ void app::sendMqtt(void) { |
|
|
|
char topic[32 + MAX_NAME_LENGTH], val[32]; |
|
|
|
float total[4]; |
|
|
|
bool sendTotal = false; |
|
|
|
memset(total, 0, sizeof(float) * 4); |
|
|
|
snprintf(val, 32, "%ld", millis() / 1000); |
|
|
|
|
|
|
|
mMqtt.sendMsg("uptime", val); |
|
|
@ -588,6 +587,7 @@ void app::sendMqtt(void) { |
|
|
|
return; |
|
|
|
|
|
|
|
while(!mMqttSendList.empty()) { |
|
|
|
memset(total, 0, sizeof(float) * 4); |
|
|
|
for (uint8_t id = 0; id < mSys->getNumInverters(); id++) { |
|
|
|
Inverter<> *iv = mSys->getInverterByPos(id); |
|
|
|
if (NULL == iv) |
|
|
@ -653,7 +653,6 @@ void app::sendMqtt(void) { |
|
|
|
} |
|
|
|
|
|
|
|
mMqttSendList.pop(); // remove from list once all inverters were processed
|
|
|
|
} |
|
|
|
|
|
|
|
if (true == sendTotal) { |
|
|
|
uint8_t fieldId; |
|
|
@ -678,6 +677,7 @@ void app::sendMqtt(void) { |
|
|
|
mMqtt.sendMsg(topic, val); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|