diff options
Diffstat (limited to 'robot/main.c')
-rw-r--r-- | robot/main.c | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/robot/main.c b/robot/main.c index 21d0e5c..fbfd38b 100644 --- a/robot/main.c +++ b/robot/main.c @@ -1,34 +1,12 @@ -#include <pololu/orangutan.h> -#include <stdlib.h> +#include "main.h" +#include "hypervisor.h" +#include "setup.h" int main() { - play("L50 c>c"); - serial_set_baud_rate(9600); + w2_setup_main(); - char *buf = malloc(20); - unsigned int counter = 0; - - while (1) { - serial_receive_blocking(buf, 1, 65e3); - - switch (buf[0]) { - case 0x7f: { - counter--; - lcd_goto_xy(counter, 0); - print(" "); - lcd_goto_xy(counter, 0); - break; - } - default: { - print(&buf[0]); - counter++; - if (counter > 20) { - counter = 0; - lcd_goto_xy(0, 0); - } - } - } - } + for (;;) w2_hypervisor_main(); + // satisfy compiler return 0; } |