Check individual heartbeat frames for timeouts

This commit is contained in:
jazzpi
2022-07-30 22:22:05 +02:00
parent d9e8cc5f52
commit 4316e604da
4 changed files with 31 additions and 2 deletions

View File

@ -12,5 +12,6 @@
#define SlavesTimeoutError 1
#define SlavesErrorFrameError 2
#define SLAVES_FRAME_TIMEOUT_ERROR 3
#endif /* INC_AMS_ERRORCODES_H_ */

View File

@ -19,6 +19,7 @@
#define NUMBEROFTEMPS 32
#define SLAVETIMEOUT 500
#define SLAVE_HEARTBEAT_FRAMES 11
typedef struct {
@ -28,6 +29,7 @@ typedef struct {
uint32_t timestamp;
uint8_t error;
uint8_t timeout;
uint32_t frame_timestamps[SLAVE_HEARTBEAT_FRAMES];
} SlaveHandler;