summaryrefslogtreecommitdiff
path: root/shared/consts.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-27 12:53:42 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-27 12:53:42 +0200
commit4c4d045329c4a149bae0b53952c39c14243e1870 (patch)
tree18ce1a31adb20421635738d627b46150b1fb9fea /shared/consts.h
parent05318790dcbd6714a2adb3532e902a56a6638ca0 (diff)
throw error on noisy serial channel
Diffstat (limited to 'shared/consts.h')
-rw-r--r--shared/consts.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/shared/consts.h b/shared/consts.h
index 50b16b9..cdd96b3 100644
--- a/shared/consts.h
+++ b/shared/consts.h
@@ -12,21 +12,24 @@
#warning "host operating system unknown"
#endif
-/** max logic module execution time in milliseconds */
-#define W2_MAX_MODULE_CYCLE_MS (20)
/** serial baud rate (bit/s) */
#define W2_SERIAL_BAUD (9600)
+/** size of input (receive) buffer (in bytes) */
+#define W2_SERIAL_READ_BUFFER_SIZE (255)
+
/** size of the error handling buffer (in errors, not bytes) */
#define W2_ERROR_BUFFER_SIZE (16)
/** size of the serial communication buffer (in messages, not bytes) */
#define W2_SERCOMM_BUFFER_SIZE (16)
-/** size of input (receive) buffer (in bytes) */
-#define W2_SERIAL_READ_BUFFER_SIZE (255)
-/** exponential moving average new measurement weight (double 0-1) */
-#define W2_EMA_WEIGHT (0.10)
/** size of mode history buffer */
#define W2_MODE_HISTORY_BUFFER_SIZE (4)
+/** max logic module execution time in milliseconds */
+#define W2_MAX_MODULE_CYCLE_MS (20)
+
+/** exponential moving average new measurement weight (double 0-1) */
+#define W2_EMA_WEIGHT (0.10)
+
/** front-facing distance sensor pinout */
#define W2_FRONT_SENSOR_PIN 5
/** battery voltage sensor pinout */