diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-05-26 12:14:04 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-05-26 12:14:04 +0200 |
commit | 54b69efe150e1a102faafb4e214159c92abbb841 (patch) | |
tree | 6c1cd23f61cbc3012078453f2f7c507704c39a01 /shared/serial_parse.c | |
parent | e63abbdff3408c17b45c9032e7f7ba0199b43bd0 (diff) |
clean up ugly switch case in favor of array lookup
Diffstat (limited to 'shared/serial_parse.c')
-rw-r--r-- | shared/serial_parse.c | 1 |
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; |