diff options
Diffstat (limited to 'robot/setup.c')
-rw-r--r-- | robot/setup.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/robot/setup.c b/robot/setup.c index fcac6d4..36c5da1 100644 --- a/robot/setup.c +++ b/robot/setup.c @@ -5,6 +5,7 @@ #include "halt.h" #include "modes.h" #include "orangutan_shim.h" +#include "sercomm.h" #include "setup.h" // pointers for endianness check @@ -25,33 +26,9 @@ void w2_setup_main() { // clear lcd clear(); + // start serial input + serial_receive_ring(g_w2_serial_buffer, W2_SERIAL_READ_BUFFER_SIZE); + // indicate startup done play("L50 c>c"); - -#ifdef W2_SIM -#include "sercomm.h" - w2_s_bin *data = malloc(sizeof(w2_s_bin) + sizeof(uint8_t) * 20); - data->bytes = 20; - data->data[0] = 0x00; - data->data[1] = 0x01; - data->data[2] = 0x00; - data->data[3] = 0x01; - data->data[4] = 0x00; - data->data[5] = 0x01; - data->data[6] = 0x00; - data->data[7] = 0x01; - data->data[8] = 0xde; - data->data[9] = 0xad; - data->data[10] = 0xbe; - data->data[11] = 0xef; - data->data[12] = 0xff; - data->data[13] = 0xff; - data->data[14] = 0x00; - data->data[15] = 0x00; - data->data[16] = 0xff; - data->data[17] = 0xff; - data->data[18] = 0x00; - data->data[19] = 0x69; - w2_sercomm_append_msg(data); -#endif } |