Skip to content

Commit 974f1dd

Browse files
committed
fixed compile errors
1 parent a400608 commit 974f1dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ESP8266-Power-Monitor.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,16 @@ void stopwatchCounter() {
293293
Blynk.virtualWrite(vPIN_ENERGY_TIME, days + hours_o + hours + mins_o + mins + secs_o + secs);
294294
}
295295

296-
#ifdef FIXED_ENERGY_PRICE
296+
297297
// This section is for setting the kWh price from your electric company.
298298
// I use a SPOT rate which means I need to update it all the time.
299299
// If you know your set price per kWh (in cents), then enter the price in settings: FIXED_ENERGY_PRICE
300300
void getPrice() {
301+
#ifdef FIXED_ENERGY_PRICE
301302
Blynk.virtualWrite(vPIN_ENERGY_API, ENERGY_API); // local API Server to get current power price per mWh
303+
#endif
302304
}
305+
#ifdef FIXED_ENERGY_PRICE
303306
BLYNK_WRITE(vPIN_ENERGY_API) {
304307
energyPrice = param.asFloat();
305308
Blynk.virtualWrite(vPIN_ENERGY_PRICE, String(energyPrice, 4) + String('c') );

0 commit comments

Comments
 (0)