diff options
Diffstat (limited to 'robot/sercomm.c')
-rw-r--r-- | robot/sercomm.c | 5 |
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; } |