summaryrefslogtreecommitdiff
path: root/robot/consts.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-17 22:37:09 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-17 22:37:09 +0200
commit154df68cb2a74a3b22456e8ec5af3af54352a41f (patch)
treef9d2c83b30322d81691ae1a013813add6ec6b99e /robot/consts.h
parent2b75425070662b869c15673623df44e30ce43ebe (diff)
fix buffer overflow in error handling module
- fixed ring buffer overflow in errcatch module - fixed naming of commands in sercomm module - added comments to macro's in consts.h - properly handle `W2_E_WARN_UNCAUGHT_ERROR` and `W2_E_WARN_ERR_BUFFER_FULL` (these used to cause infinite loops) - added buffer full warning code - added options to hide some simulation messages - more boilerplate sercomm module code
Diffstat (limited to 'robot/consts.h')
-rw-r--r--robot/consts.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/robot/consts.h b/robot/consts.h
index d74d034..94a161d 100644
--- a/robot/consts.h
+++ b/robot/consts.h
@@ -5,6 +5,11 @@
#define W2_BUILD_STR ("????????")
#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)
-#define W2_E_BUFFER_SIZE (16)
+/** 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)