add: receive/receiveTime as optional sketch functions for handling

incoming messages
This commit is contained in:
Henrik Ekblad
2015-09-21 10:02:49 +02:00
parent 9d398154c7
commit aa22a3eaec
70 changed files with 303 additions and 317 deletions
@@ -76,8 +76,6 @@ unsigned long lastPulse =0;
void setup()
{
setIncomingCallback(incomingMessage);
// initialize our digital pins internal pullup resistor so one pulse switches from high to low (less distortion)
pinMode(DIGITAL_INPUT_SENSOR, INPUT_PULLUP);
@@ -156,7 +154,7 @@ void loop()
}
}
void incomingMessage(const MyMessage &message) {
void receive(const MyMessage &message) {
if (message.type==V_VAR1) {
unsigned long gwPulseCount=message.getULong();
pulseCount += gwPulseCount;