summaryrefslogtreecommitdiff
path: root/robot/consts.h
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-26 15:39:31 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-26 15:39:31 +0200
commit60f07661602a5dfe8e39b8038964b38bddcb33a5 (patch)
tree0b257acda0797a13cd09e7df2d16a6da0a6aef11 /robot/consts.h
parent333eea840a17d0f8ecf0110d952df2857fea4da0 (diff)
parentf073c9d3848dab915bed4844e9d13684aa5e23eb (diff)
merge dev into master
Diffstat (limited to 'robot/consts.h')
-rw-r--r--robot/consts.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/robot/consts.h b/robot/consts.h
deleted file mode 100644
index a81908d..0000000
--- a/robot/consts.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#pragma once
-
-#ifndef W2_BUILD_STR
-// is defined by CFLAGS += -DW2_BUILD_STR in makefile
-#define W2_BUILD_STR ("????????")
-#endif
-
-#define W2_MAX_MODULE_CYCLE_MS (20)
-#define W2_SERIAL_BAUD (9600)
-#define W2_ERROR_BUFFER_SIZE (16)
-
-#define W2_ERR_TYPE_CRIT (0b00 << 6)
-#define W2_ERR_TYPE_WARN (0b01 << 6)
-#define W2_ERR_TYPE_INFO (0b10 << 6)
-#define W2_ERR_TYPE_VERB (0b11 << 6)
-#define W2_ERR_TYPE_MASK (0b11 << 6)
-
-/**
- * enum storing all error codes
- *
- * error codes are between 0-63 because the two most significant bits are
- * reserved for error type checking
- */
-enum w2_e_errorcodes {
- // critical error codes
- W2_ERR_CONN_LOST = 0x00 | W2_ERR_TYPE_CRIT,
- W2_ERR_COM_UNAVAILABLE = 0x01 | W2_ERR_TYPE_CRIT, // client-only
- W2_ERR_LINE_LOST = 0x02 | W2_ERR_TYPE_CRIT,
- W2_ERR_OBSTACLE_STUCK = 0x03 | W2_ERR_TYPE_CRIT,
-
- // warnings
- W2_ERR_BATTERY_LOW = 0x00 | W2_ERR_TYPE_WARN,
- W2_ERR_OBSTACLE_DETECTED = 0x01 | W2_ERR_TYPE_WARN,
- W2_ERR_CYCLE_EXPIRED = 0x02 | W2_ERR_TYPE_WARN,
- W2_ERR_UNCAUGHT_ERROR = 0x03 | W2_ERR_TYPE_WARN,
-};