aboutsummaryrefslogtreecommitdiff
path: root/shared/serial_parse.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-26 12:14:04 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-26 12:14:04 +0200
commit54b69efe150e1a102faafb4e214159c92abbb841 (patch)
tree6c1cd23f61cbc3012078453f2f7c507704c39a01 /shared/serial_parse.c
parente63abbdff3408c17b45c9032e7f7ba0199b43bd0 (diff)
clean up ugly switch case in favor of array lookup
Diffstat (limited to 'shared/serial_parse.c')
-rw-r--r--shared/serial_parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/serial_parse.c b/shared/serial_parse.c
index 3bf9c14..d755dc8 100644
--- a/shared/serial_parse.c
+++ b/shared/serial_parse.c
@@ -3,6 +3,7 @@
#include "consts.h"
#include "serial_parse.h"
+// TODO: give this function last time of byte, and measure if >5ms, throw warning
void w2_serial_parse(uint8_t byte) {
static uint8_t current_message[W2_SERIAL_READ_BUFFER_SIZE] = {0};
static uint8_t current_message_index = 0;