X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fcobboard%2Fcommands_cobboard.c;h=888d15a366761139e90a92339bc1074822db6d69;hp=249a69be9d7a15969d15f5bc2a4f55aeaabcb0a9;hb=9a55e14e6ec1c05dfc3a6a7a9bc1b9c879207cad;hpb=57b3e145f2ff46e1a7e7d522c85f3c56821dbf48 diff --git a/projects/microb2010/cobboard/commands_cobboard.c b/projects/microb2010/cobboard/commands_cobboard.c index 249a69b..888d15a 100644 --- a/projects/microb2010/cobboard/commands_cobboard.c +++ b/projects/microb2010/cobboard/commands_cobboard.c @@ -53,8 +53,6 @@ #include "spickle.h" #include "shovel.h" -extern uint16_t state_debug; - struct cmd_event_result { fixed_string_t arg0; fixed_string_t arg1; @@ -68,7 +66,7 @@ static void cmd_event_parsed(void *parsed_result, __attribute__((unused)) void * u08 bit=0; struct cmd_event_result * res = parsed_result; - + if (!strcmp_P(res->arg1, PSTR("all"))) { bit = DO_ENCODERS | DO_CS | DO_BD | DO_POWER; if (!strcmp_P(res->arg2, PSTR("on"))) @@ -146,18 +144,18 @@ struct cmd_color_result { static void cmd_color_parsed(void *parsed_result, __attribute__((unused)) void *data) { struct cmd_color_result *res = (struct cmd_color_result *) parsed_result; - if (!strcmp_P(res->color, PSTR("red"))) { - cobboard.our_color = I2C_COLOR_RED; + if (!strcmp_P(res->color, PSTR("yellow"))) { + cobboard.our_color = I2C_COLOR_YELLOW; } - else if (!strcmp_P(res->color, PSTR("green"))) { - cobboard.our_color = I2C_COLOR_GREEN; + else if (!strcmp_P(res->color, PSTR("blue"))) { + cobboard.our_color = I2C_COLOR_BLUE; } printf_P(PSTR("Done\r\n")); } prog_char str_color_arg0[] = "color"; parse_pgm_token_string_t cmd_color_arg0 = TOKEN_STRING_INITIALIZER(struct cmd_color_result, arg0, str_color_arg0); -prog_char str_color_color[] = "green#red"; +prog_char str_color_color[] = "blue#yellow"; parse_pgm_token_string_t cmd_color_color = TOKEN_STRING_INITIALIZER(struct cmd_color_result, color, str_color_color); prog_char help_color[] = "Set our color"; @@ -374,7 +372,7 @@ prog_char str_state_debug_arg0[] = "state_debug"; parse_pgm_token_string_t cmd_state_debug_arg0 = TOKEN_STRING_INITIALIZER(struct cmd_state_debug_result, arg0, str_state_debug_arg0); parse_pgm_token_num_t cmd_state_debug_on = TOKEN_NUM_INITIALIZER(struct cmd_state_debug_result, on, UINT8); -prog_char help_state_debug[] = "Set debug timer for state machine"; +prog_char help_state_debug[] = "Set debug for state machine"; parse_pgm_inst_t cmd_state_debug = { .f = cmd_state_debug_parsed, /* function to call */ .data = NULL, /* 2nd arg of func */