Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
gskjold committed Dec 4, 2023
1 parent a121fbd commit 8e9e60e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/AmsToMqttBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ AmsWebServer ws(commonBuffer, &Debug, &hw, &rdc);
bool mqttEnabled = false;
AmsMqttHandler* mqttHandler = NULL;

#if defined(ESP32)
#if defined(ESP32) && defined(ENERGY_SPEEDOMETER_PASS)
JsonMqttHandler* energySpeedometer = NULL;
MqttConfig energySpeedometerConfig = {
"mqtt.sandtime.energy",
Expand Down Expand Up @@ -564,7 +564,7 @@ void loop() {
mqttHandler->disconnect();
}

#if defined(ENERGY_SPEEDOMETER_PASS)
#if defined(ESP32) && defined(ENERGY_SPEEDOMETER_PASS)
if(sysConfig.energyspeedometer == 7) {
if(!meterState.getMeterId().isEmpty()) {
if(energySpeedometer == NULL) {
Expand Down Expand Up @@ -756,7 +756,7 @@ void handleSystem(unsigned long now) {
if(mqttHandler != NULL) {
mqttHandler->publishSystem(&hw, eapi, &ea);
}
#if defined(ENERGY_SPEEDOMETER_PASS)
#if defined(ESP32) && defined(ENERGY_SPEEDOMETER_PASS)
if(energySpeedometer != NULL) {
energySpeedometer->publishSystem(&hw, eapi, &ea);
}
Expand Down Expand Up @@ -1376,7 +1376,7 @@ void handleDataSuccess(AmsData* data) {
delay(10);
}
}
#if defined(ENERGY_SPEEDOMETER_PASS)
#if defined(ESP32) && defined(ENERGY_SPEEDOMETER_PASS)
if(energySpeedometer != NULL && energySpeedometer->publish(&meterState, &meterState, &ea, eapi)) {
delay(10);
}
Expand Down

0 comments on commit 8e9e60e

Please sign in to comment.