Commit 023075bb authored by Patrick's avatar Patrick

ensure the buffer is larger than the sending rate

parent 306d5e96
......@@ -41,7 +41,7 @@ state_machine_e g_current_state = SLEEP_IDLE;
t_SensorData last_reading_time;
#define ORDINAL_INTERVAL 1
#define NUM_MMNT 10 // measurement buffer length
#define NUM_MMNT 11 // measurement buffer length
// then create a pre-sized array of these structs to hold a set of timestamped measurements
uint8_t num_mmnt = NUM_MMNT;
t_measurement measurements[NUM_MMNT] = {};
......@@ -54,7 +54,7 @@ t_SensorData last_sending_time;
// how many readings should be collected for sending (<NUM_MMNT)
#define NUM_TO_SEND 10
#if NUM_TO_SEND > NUM_MMNT
#if NUM_TO_SEND >= NUM_MMNT
#error "Can't hold all the readings, reduce NUM_TO_SEND below NUM_MMNT"
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment