Skip to content

Commit

Permalink
Update ZgatewaySERIAL.ino to conditionally set receiverReady based on…
Browse files Browse the repository at this point in the history
… heartbeat configuration
  • Loading branch information
mycprotein committed Jan 7, 2025
1 parent 9050203 commit 135b06e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main/ZgatewaySERIAL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,17 @@ const TickType_t semaphoreTimeout = pdMS_TO_TICKS(1000); // 1 second timeout
# define SEMAPHORE_SERIAL_GIVE
# endif

# ifdef SENDER_SERIAL_HEARTBEAT
bool receiverReady = false;
# else
bool receiverReady = true;
# endif

// use pointer to stream class for serial communication to make code
// compatible with both softwareSerial as hardwareSerial.
Stream* SERIALStream = NULL;
//unsigned long msgCount = 0;

bool receiverReady = true;
unsigned long lastHeartbeatReceived = 0;
unsigned long lastHeartbeatAckReceived = 0;
unsigned long lastHeartbeatSent = 0;
Expand Down

0 comments on commit 135b06e

Please sign in to comment.