#include "spickle.h"
#include "shovel.h"
-extern uint16_t state_debug;
-
struct cmd_event_result {
fixed_string_t arg0;
fixed_string_t arg1;
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")))
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";
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 */