Fix a few sketch problems found.
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
|
||||
#include <SPI.h>
|
||||
#include <EEPROM.h>
|
||||
#include <RF24.h>
|
||||
#include <MsTimer2.h>
|
||||
#include <PinChangeInt.h>
|
||||
#include <MyGateway.h>
|
||||
|
||||
@@ -55,7 +55,7 @@ void loop()
|
||||
gw.process();
|
||||
unsigned long now = millis();
|
||||
// Only send values at a maximum frequency or woken up from sleep
|
||||
bool sendTime = now - lastSend > 1000*SEND_FREQUENCY;
|
||||
bool sendTime = now - lastSend > SEND_FREQUENCY;
|
||||
if (pcReceived && (SLEEP_MODE || sendTime)) {
|
||||
// New watt value has been calculated
|
||||
if (!SLEEP_MODE && watt != oldWatt) {
|
||||
|
||||
@@ -66,7 +66,7 @@ void loop()
|
||||
currentTime = millis();
|
||||
|
||||
// Only send values at a maximum frequency or woken up from sleep
|
||||
bool sendTime = currentTime - lastSend > 1000*SEND_FREQUENCY;
|
||||
bool sendTime = currentTime - lastSend > SEND_FREQUENCY;
|
||||
if (pcReceived && (SLEEP_MODE || sendTime)) {
|
||||
// New flow value has been calculated
|
||||
if (!SLEEP_MODE && flow != oldflow) {
|
||||
|
||||
Reference in New Issue
Block a user