Skip to content

Commit

Permalink
Total voltage/current of Smartshunt (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
shining-man committed Nov 20, 2024
1 parent d22beac commit df99d2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/SmartShunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void newLabelRecv(char * mName, char * mValue)
i16_tVolt=val/10;
rxValues|=RX_VAL_U;

if(mDevData->bo_sendMqttMsg) mqttPublish(MQTT_TOPIC_DATA_DEVICE, mDataMappingNr, MQTT_TOPIC2_TOTAL_VOLTAGE, -1, i16_tVolt);
if(mDevData->bo_sendMqttMsg) mqttPublish(MQTT_TOPIC_DATA_DEVICE, mDataMappingNr, MQTT_TOPIC2_TOTAL_VOLTAGE, -1, i16_tVolt/100.0f);
//BSC_LOGI(TAG,"U=%i, rxValues=%i",i16_tVolt,rxValues);
}
else if(strcmp_P(mName, "I") == 0)
Expand All @@ -74,7 +74,7 @@ void newLabelRecv(char * mName, char * mValue)
i16_tCurr=val/10;
rxValues|=RX_VAL_I;

if(mDevData->bo_sendMqttMsg) mqttPublish(MQTT_TOPIC_DATA_DEVICE, mDataMappingNr, MQTT_TOPIC2_TOTAL_CURRENT, -1, i16_tCurr);
if(mDevData->bo_sendMqttMsg) mqttPublish(MQTT_TOPIC_DATA_DEVICE, mDataMappingNr, MQTT_TOPIC2_TOTAL_CURRENT, -1, i16_tCurr/100.0f);
//(TAG,"I=%i, rxValues=%i",i16_tCurr,rxValues);
}

Expand Down

0 comments on commit df99d2e

Please sign in to comment.