aboutsummaryrefslogtreecommitdiff
path: root/robot/sercomm.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-02 12:12:47 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-02 12:12:47 +0200
commitb12d6b2ecee0be03122a4bdba8ebbc91112fae3f (patch)
tree1bcc95eb0c26ffd1fbf23fab79f9ea80f26425b8 /robot/sercomm.c
parent139651d45a72d57c5147e2854647d95cb87c9e4e (diff)
dirc working
Diffstat (limited to 'robot/sercomm.c')
-rw-r--r--robot/sercomm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/robot/sercomm.c b/robot/sercomm.c
index deef39f..519568d 100644
--- a/robot/sercomm.c
+++ b/robot/sercomm.c
@@ -37,10 +37,11 @@ void w2_sercomm_main() {
#ifdef W2_SIM
w2_sim_print_serial(data);
#endif
- serial_send("\xff", 1);
+ serial_send_blocking("\xff", 1);
for (uint8_t i = 0; i < data->bytes; i++) {
uint8_t byte = data->data[i];
- byte == 0xff ? serial_send("\xff\xff", 2) : serial_send((char *)&byte, 1);
+ byte == 0xff ? serial_send_blocking("\xff\xff", 2)
+ : serial_send_blocking((char *)&byte, 1);
}
g_w2_sercomm_offset = (g_w2_sercomm_offset + 1) % W2_SERCOMM_BUFFER_SIZE;
}