+/**********************************************************/
+
+/* this structure is filled when cmd_baudrate is parsed successfully */
+struct cmd_baudrate_result {
+ fixed_string_t arg0;
+ uint32_t arg1;
+};
+
+/* function called when cmd_baudrate is parsed successfully */
+static void cmd_baudrate_parsed(void * parsed_result, __attribute__((unused)) void *data)
+{
+ struct cmd_baudrate_result *res = parsed_result;
+ struct uart_config c;
+
+ uart_getconf(XBEE_UART, &c);
+ c.baudrate = res->arg1;
+ uart_setconf(XBEE_UART, &c);
+}
+
+const char PROGMEM str_baudrate_arg0[] = "baudrate";
+const parse_token_string_t PROGMEM cmd_baudrate_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_baudrate_result, arg0,
+ str_baudrate_arg0);
+const parse_token_num_t PROGMEM cmd_baudrate_arg1 =
+ TOKEN_NUM_INITIALIZER(struct cmd_baudrate_result, arg1,
+ UINT32);
+
+const char PROGMEM help_baudrate[] = "Change xbee baudrate";
+const parse_inst_t PROGMEM cmd_baudrate = {
+ .f = cmd_baudrate_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_baudrate,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_baudrate_arg0,
+ (PGM_P)&cmd_baudrate_arg1,
+ NULL,
+ },
+};
+
+
+/**********************************************************/
+
+/* this structure is filled when cmd_beep is parsed successfully */
+struct cmd_beep_result {
+ fixed_string_t beep;
+};
+
+/* function called when cmd_beep is parsed successfully */
+static void cmd_beep_parsed(void *parsed_result, void *data)
+{
+ (void)parsed_result;
+ (void)data;
+
+ beep(0, 3, 3);
+ beep(1, 3, 3);
+ beep(2, 3, 3);
+ beep(0, 1, 1);
+ beep(1, 1, 1);
+ beep(2, 1, 1);
+}
+
+const char PROGMEM str_beep[] = "beep";
+const parse_token_string_t PROGMEM cmd_beep_beep =
+ TOKEN_STRING_INITIALIZER(struct cmd_beep_result, beep,
+ str_beep);
+
+const char PROGMEM help_beep[] = "Send a beep";
+
+const parse_inst_t PROGMEM cmd_beep = {
+ .f = cmd_beep_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_beep,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_beep_beep,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_servo is parsed successfully */
+struct cmd_servo_result {
+ fixed_string_t arg0;
+ fixed_string_t arg1;
+ uint16_t num;
+ uint16_t val;
+};
+
+/* function called when cmd_servo is parsed successfully */
+static void cmd_servo_parsed(void * parsed_result, void *data)
+{
+ struct cmd_servo_result *res = parsed_result;
+
+ (void)data;
+
+ if (!strcmp_P(res->arg1, PSTR("set"))) {
+ if (res->num >= N_SERVO) {
+ printf_P(PSTR("bad servo num\n"));
+ return;
+ }
+ if (res->val >= 1024) {
+ printf_P(PSTR("bad servo val\n"));
+ return;
+ }
+ spi_servo_set(res->num, res->val);
+ }
+ else if (!strcmp_P(res->arg1, PSTR("bypass"))) {
+ spi_servo_set_bypass(!!res->val);
+ }
+ else if (!strcmp_P(res->arg1, PSTR("ppm"))) {
+ spi_servo_set_ppm(!!res->val);
+ }
+ else if (!strcmp_P(res->arg1, PSTR("show"))) {
+ spi_servo_dump();
+ }
+}
+
+const char PROGMEM str_servo_arg0[] = "servo";
+const parse_token_string_t PROGMEM cmd_servo_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_servo_result, arg0,
+ str_servo_arg0);
+const char PROGMEM str_servo_arg1_set[] = "set";
+const parse_token_string_t PROGMEM cmd_servo_arg1_set =
+ TOKEN_STRING_INITIALIZER(struct cmd_servo_result, arg1,
+ str_servo_arg1_set);
+const parse_token_num_t PROGMEM cmd_servo_num =
+ TOKEN_NUM_INITIALIZER(struct cmd_servo_result, num,
+ UINT16);
+const parse_token_num_t PROGMEM cmd_servo_val =
+ TOKEN_NUM_INITIALIZER(struct cmd_servo_result, val,
+ UINT16);
+
+const char PROGMEM help_servo_set[] = "set servo value";
+const parse_inst_t PROGMEM cmd_servo_set = {
+ .f = cmd_servo_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_servo_set,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_servo_arg0,
+ (PGM_P)&cmd_servo_arg1_set,
+ (PGM_P)&cmd_servo_num,
+ (PGM_P)&cmd_servo_val,
+ NULL,
+ },
+};
+
+const char PROGMEM str_servo_arg1_show[] = "show";
+const parse_token_string_t PROGMEM cmd_servo_arg1_show =
+ TOKEN_STRING_INITIALIZER(struct cmd_servo_result, arg1,
+ str_servo_arg1_show);
+
+const char PROGMEM help_servo_show[] = "read servo and config";
+const parse_inst_t PROGMEM cmd_servo_show = {
+ .f = cmd_servo_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_servo_show,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_servo_arg0,
+ (PGM_P)&cmd_servo_arg1_show,
+ NULL,
+ },
+};
+
+const char PROGMEM str_servo_arg1_bypassppm[] = "bypass#ppm";
+const parse_token_string_t PROGMEM cmd_servo_arg1_bypassppm =
+ TOKEN_STRING_INITIALIZER(struct cmd_servo_result, arg1,
+ str_servo_arg1_bypassppm);
+
+const char PROGMEM help_servo_bypassppm[] = "change bypass/ppm";
+const parse_inst_t PROGMEM cmd_servo_bypassppm = {
+ .f = cmd_servo_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_servo_bypassppm,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_servo_arg0,
+ (PGM_P)&cmd_servo_arg1_bypassppm,
+ (PGM_P)&cmd_servo_val,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_test_spi is parsed successfully */
+struct cmd_test_spi_result {
+ fixed_string_t arg0;
+};
+
+static void cmd_test_spi_parsed(void * parsed_result, void *data)
+{
+ uint8_t i, flags, wait_time = 0;
+ uint16_t val = 0;
+
+ (void)parsed_result;
+ (void)data;
+
+ spi_servo_set_bypass(0);
+ spi_servo_set_ppm(0);
+
+ /* stress test: send many commands, no wait between each servo
+ * of a series, and a variable delay between series */
+ printf_P(PSTR("stress test\r\n"));
+ while (!cmdline_keypressed()) {
+
+ wait_time++;
+ if (wait_time > 20)
+ wait_time = 0;
+
+ IRQ_LOCK(flags);
+ val = global_ms;
+ IRQ_UNLOCK(flags);
+ val >>= 3;
+ val &= 1023;
+
+ for (i = 0; i < 6; i++)
+ spi_servo_set(i, val);
+
+ wait_ms(wait_time);
+ printf_P(PSTR("%4.4d %4.4d %4.4d %4.4d %4.4d %4.4d\r\n"),
+ spi_servo_get(0), spi_servo_get(1), spi_servo_get(2),
+ spi_servo_get(3), spi_servo_get(4), spi_servo_get(5));
+ }
+
+ printf_P(PSTR("bypass mode, with spi commands in background\r\n"));
+ spi_servo_set_bypass(1);
+
+ /* test bypass mode */
+ while (!cmdline_keypressed()) {
+
+ wait_time++;
+ if (wait_time > 20)
+ wait_time = 0;
+
+ IRQ_LOCK(flags);
+ val = global_ms;
+ IRQ_UNLOCK(flags);
+ val >>= 3;
+ val &= 1023;
+
+ for (i = 0; i < 6; i++)
+ spi_servo_set(i, val);
+
+ wait_ms(wait_time);
+ printf_P(PSTR("%4.4d %4.4d %4.4d %4.4d %4.4d %4.4d\r\n"),
+ spi_servo_get(0), spi_servo_get(1), spi_servo_get(2),
+ spi_servo_get(3), spi_servo_get(4), spi_servo_get(5));
+ }
+
+ printf_P(PSTR("PPM to servo\r\n"));
+ spi_servo_set_bypass(0);
+ spi_servo_set_ppm(0);
+
+ /* test PPM to servo (bypass) mode */
+ while (!cmdline_keypressed()) {
+ for (i = 0; i < 6; i++) {
+ val = spi_servo_get(i);
+ spi_servo_set(i, val);
+ }
+ }
+
+ printf_P(PSTR("PPM to (servo + PPM)\r\n"));
+ spi_servo_set_bypass(0);
+ spi_servo_set_ppm(1);
+
+ /* test PPM to servo (bypass) mode */
+ while (!cmdline_keypressed()) {
+ for (i = 0; i < 6; i++) {
+ val = spi_servo_get(i);
+ spi_servo_set(i, val);
+ }
+ }
+}
+
+const char PROGMEM str_test_spi_arg0[] = "test_spi";
+const parse_token_string_t PROGMEM cmd_test_spi_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_test_spi_result, arg0,
+ str_test_spi_arg0);
+
+const char PROGMEM help_test_spi[] = "Test the spi";
+const parse_inst_t PROGMEM cmd_test_spi = {
+ .f = cmd_test_spi_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_test_spi,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_test_spi_arg0,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_dump_xbee_stats is parsed successfully */
+struct cmd_dump_xbee_stats_result {
+ fixed_string_t arg0;
+};
+
+static void cmd_dump_xbee_stats_parsed(void *parsed_result, void *data)
+{
+ (void)parsed_result;
+ (void)data;
+
+ xbee_dump_stats(xbee_dev);
+}
+
+const char PROGMEM str_dump_xbee_stats_arg0[] = "dump_xbee_stats";
+const parse_token_string_t PROGMEM cmd_dump_xbee_stats_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_dump_xbee_stats_result, arg0,
+ str_dump_xbee_stats_arg0);
+
+const char PROGMEM help_dump_xbee_stats[] = "Test the spi";
+const parse_inst_t PROGMEM cmd_dump_xbee_stats = {
+ .f = cmd_dump_xbee_stats_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_dump_xbee_stats,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_dump_xbee_stats_arg0,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_rc_proto_stats is parsed successfully */
+struct cmd_rc_proto_stats_result {
+ fixed_string_t arg0;
+ fixed_string_t arg1;
+};
+
+static void cmd_rc_proto_stats_parsed(void *parsed_result, void *data)
+{
+ struct cmd_rc_proto_stats_result *res = parsed_result;
+ (void)data;
+
+ if (!strcmp(res->arg1, "show"))
+ rc_proto_dump_stats();
+ else /* reset */
+ rc_proto_reset_stats();
+}
+
+const char PROGMEM str_rc_proto_stats_arg0[] = "rc_proto_stats";
+const parse_token_string_t PROGMEM cmd_rc_proto_stats_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_stats_result, arg0,
+ str_rc_proto_stats_arg0);
+const char PROGMEM str_rc_proto_stats_arg1[] = "show#reset";
+const parse_token_string_t PROGMEM cmd_rc_proto_stats_arg1 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_stats_result, arg1,
+ str_rc_proto_stats_arg1);
+
+const char PROGMEM help_rc_proto_stats[] = "dump rc_proto stats";
+const parse_inst_t PROGMEM cmd_rc_proto_stats = {
+ .f = cmd_rc_proto_stats_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_rc_proto_stats,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_rc_proto_stats_arg0,
+ (PGM_P)&cmd_rc_proto_stats_arg1,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_rc_proto_timers is parsed successfully */
+struct cmd_rc_proto_timers_result {
+ fixed_string_t arg0;
+ fixed_string_t arg1;
+ uint16_t servo_min;
+ uint16_t servo_max;
+ uint16_t power_probe;
+ uint16_t autobypass;
+};
+
+static void cmd_rc_proto_timers_parsed(void *parsed_result, void *data)
+{
+ struct cmd_rc_proto_timers_result *res = parsed_result;
+ (void)data;
+
+ if (!strcmp_P(res->arg1, PSTR("set"))) {
+ rc_proto_timers.send_servo_min_ms = res->servo_min;
+ rc_proto_timers.send_servo_max_ms = res->servo_max;
+ rc_proto_timers.send_power_probe_ms = res->power_probe;
+ rc_proto_timers.autobypass_ms = res->autobypass;
+ }
+
+ printf_P(PSTR("rc_proto_timers: min=%d, max=%d, "
+ "power_probe=%d autobypass=%d\n"),
+ rc_proto_timers.send_servo_min_ms,
+ rc_proto_timers.send_servo_max_ms,
+ rc_proto_timers.send_power_probe_ms,
+ rc_proto_timers.autobypass_ms);
+}
+
+const char PROGMEM str_rc_proto_timers_arg0[] = "rc_proto_timers";
+const parse_token_string_t PROGMEM cmd_rc_proto_timers_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_timers_result, arg0,
+ str_rc_proto_timers_arg0);
+const char PROGMEM str_rc_proto_timers_arg1[] = "set";
+const parse_token_string_t PROGMEM cmd_rc_proto_timers_arg1 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_timers_result, arg1,
+ str_rc_proto_timers_arg1);
+const parse_token_num_t PROGMEM cmd_rc_proto_timers_servo_min =
+ TOKEN_NUM_INITIALIZER(struct cmd_rc_proto_timers_result, servo_min,
+ UINT16);
+const parse_token_num_t PROGMEM cmd_rc_proto_timers_servo_max =
+ TOKEN_NUM_INITIALIZER(struct cmd_rc_proto_timers_result, servo_max,
+ UINT16);
+const parse_token_num_t PROGMEM cmd_rc_proto_timers_power_probe =
+ TOKEN_NUM_INITIALIZER(struct cmd_rc_proto_timers_result, power_probe,
+ UINT16);
+const parse_token_num_t PROGMEM cmd_rc_proto_timers_autobypass =
+ TOKEN_NUM_INITIALIZER(struct cmd_rc_proto_timers_result, autobypass,
+ UINT16);
+
+const char PROGMEM help_rc_proto_timers[] = "set rc_proto_timers (servo_min, "
+ "servo_max, pow_probe, autobypass)";
+const parse_inst_t PROGMEM cmd_rc_proto_timers = {
+ .f = cmd_rc_proto_timers_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_rc_proto_timers,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_rc_proto_timers_arg0,
+ (PGM_P)&cmd_rc_proto_timers_arg1,
+ (PGM_P)&cmd_rc_proto_timers_servo_min,
+ (PGM_P)&cmd_rc_proto_timers_servo_max,
+ (PGM_P)&cmd_rc_proto_timers_power_probe,
+ (PGM_P)&cmd_rc_proto_timers_autobypass,
+ NULL,
+ },
+};
+
+const char PROGMEM str_rc_proto_timers_show_arg1[] = "show";
+const parse_token_string_t PROGMEM cmd_rc_proto_timers_show_arg1 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_timers_result, arg1,
+ str_rc_proto_timers_show_arg1);
+
+const char PROGMEM help_rc_proto_timers_show[] = "show rc_proto timers value";
+const parse_inst_t PROGMEM cmd_rc_proto_timers_show = {
+ .f = cmd_rc_proto_timers_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_rc_proto_timers_show,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_rc_proto_timers_arg0,
+ (PGM_P)&cmd_rc_proto_timers_show_arg1,
+ NULL,
+ },
+};
+
+/**********************************************************/
+
+/* this structure is filled when cmd_rc_proto_mode is parsed successfully */
+struct cmd_rc_proto_mode_result {
+ fixed_string_t arg0;
+ fixed_string_t cmd;
+ fixed_string_t val;
+};
+
+static void cmd_rc_proto_mode_parsed(void *parsed_result, void *data)
+{
+ struct cmd_rc_proto_mode_result *res = parsed_result;
+ (void)data;
+ uint8_t flags;
+ uint8_t on = 0;
+
+ flags = rc_proto_get_mode();
+ if (!strcmp_P(res->val, PSTR("on")))
+ on = 1;
+
+ if (!strcmp_P(res->cmd, PSTR("rx_copy_spi"))) {
+ if (on == 1)
+ flags |= RC_PROTO_FLAGS_RX_COPY_SPI;
+ else
+ flags &= ~RC_PROTO_FLAGS_RX_COPY_SPI;
+ }
+ else if (!strcmp_P(res->cmd, PSTR("rx_autobypass"))) {
+ if (on == 1)
+ flags |= RC_PROTO_FLAGS_RX_AUTOBYPASS;
+ else
+ flags &= ~RC_PROTO_FLAGS_RX_AUTOBYPASS;
+ }
+ else if (!strcmp_P(res->cmd, PSTR("tx_stats"))) {
+ if (on == 1)
+ flags |= RC_PROTO_FLAGS_TX_STATS;
+ else
+ flags &= ~RC_PROTO_FLAGS_TX_STATS;
+ }
+ else if (!strcmp_P(res->cmd, PSTR("tx_power_probe"))) {
+ if (on == 1)
+ flags |= RC_PROTO_FLAGS_TX_POW_PROBE;
+ else
+ flags &= ~RC_PROTO_FLAGS_TX_POW_PROBE;
+ }
+ else if (!strcmp_P(res->cmd, PSTR("compute_best_pow"))) {
+ if (on == 1)
+ flags |= RC_PROTO_FLAGS_COMPUTE_BEST_POW;
+ else
+ flags &= ~RC_PROTO_FLAGS_COMPUTE_BEST_POW;
+ }
+ else if (!strcmp_P(res->cmd, PSTR("tx"))) {
+ flags &= ~RC_PROTO_FLAGS_TX_MASK;
+ if (!strcmp_P(res->val, PSTR("bypass")))
+ flags |= RC_PROTO_FLAGS_TX_BYPASS;
+ else if (!strcmp_P(res->val, PSTR("copy_spi")))
+ flags |= RC_PROTO_FLAGS_TX_COPY_SPI;
+ }
+ rc_proto_set_mode(flags);
+
+ /* dump state */
+ if ((flags & RC_PROTO_FLAGS_TX_MASK) == RC_PROTO_FLAGS_TX_OFF)
+ printf_P(PSTR("rc_proto_mode tx off\n"));
+ else if ((flags & RC_PROTO_FLAGS_TX_MASK) == RC_PROTO_FLAGS_TX_BYPASS)
+ printf_P(PSTR("rc_proto_mode tx bypass\n"));
+ else if ((flags & RC_PROTO_FLAGS_TX_MASK) == RC_PROTO_FLAGS_TX_COPY_SPI)
+ printf_P(PSTR("rc_proto_mode tx copy_spi\n"));
+ printf_P(PSTR("rc_proto_mode rx_copy_spi %s\n"),
+ (flags & RC_PROTO_FLAGS_RX_COPY_SPI) ? "on" : "off");
+ printf_P(PSTR("rc_proto_mode rx_autobypass %s\n"),
+ (flags & RC_PROTO_FLAGS_RX_AUTOBYPASS) ? "on" : "off");
+ printf_P(PSTR("rc_proto_mode tx_stats %s\n"),
+ (flags & RC_PROTO_FLAGS_TX_STATS) ? "on" : "off");
+ printf_P(PSTR("rc_proto_mode tx_power_probe %s\n"),
+ (flags & RC_PROTO_FLAGS_TX_POW_PROBE) ? "on" : "off");
+ printf_P(PSTR("rc_proto_mode compute_best_pow %s\n"),
+ (flags & RC_PROTO_FLAGS_COMPUTE_BEST_POW) ? "on" : "off");
+}
+
+const char PROGMEM str_rc_proto_mode_arg0[] = "rc_proto_mode";
+const parse_token_string_t PROGMEM cmd_rc_proto_mode_arg0 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_mode_result, arg0,
+ str_rc_proto_mode_arg0);
+
+const char PROGMEM str_rc_proto_mode_cmd[] =
+ "rx_copy_spi#rx_autobypass#tx_stats#tx_power_probe#compute_best_pow";
+const parse_token_string_t PROGMEM cmd_rc_proto_mode_cmd =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_mode_result, cmd,
+ str_rc_proto_mode_cmd);
+
+const char PROGMEM str_rc_proto_mode_onoff[] = "on#off";
+const parse_token_string_t PROGMEM cmd_rc_proto_mode_onoff =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_mode_result, val,
+ str_rc_proto_mode_onoff);
+
+const char PROGMEM help_rc_proto_mode[] = "Set rc proto behavior";
+const parse_inst_t PROGMEM cmd_rc_proto_mode = {
+ .f = cmd_rc_proto_mode_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_rc_proto_mode,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_rc_proto_mode_arg0,
+ (PGM_P)&cmd_rc_proto_mode_cmd,
+ (PGM_P)&cmd_rc_proto_mode_onoff,
+ NULL,
+ },
+};
+
+const char PROGMEM str_rc_proto_mode_cmd2[] = "tx";
+const parse_token_string_t PROGMEM cmd_rc_proto_mode_cmd2 =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_mode_result, cmd,
+ str_rc_proto_mode_cmd2);
+
+const char PROGMEM str_rc_proto_mode_val[] = "off#bypass#copy_spi";
+const parse_token_string_t PROGMEM cmd_rc_proto_mode_val =
+ TOKEN_STRING_INITIALIZER(struct cmd_rc_proto_mode_result, val,
+ str_rc_proto_mode_val);
+
+const parse_inst_t PROGMEM cmd_rc_proto_mode2 = {
+ .f = cmd_rc_proto_mode_parsed, /* function to call */
+ .data = NULL, /* 2nd arg of func */
+ .help_str = help_rc_proto_mode,
+ .tokens = { /* token list, NULL terminated */
+ (PGM_P)&cmd_rc_proto_mode_arg0,
+ (PGM_P)&cmd_rc_proto_mode_cmd2,
+ (PGM_P)&cmd_rc_proto_mode_val,
+ NULL,
+ },
+};