printf -> logs in xbee_user
[protos/xbee-avr.git] / commands.c
index cf060fc..3448ded 100644 (file)
@@ -1288,94 +1288,6 @@ const parse_inst_t PROGMEM cmd_raw = {
        },
 };
 
-/* ************* */
-
-/* this structure is filled when cmd_dump is parsed successfully */
-struct cmd_dump_result {
-       fixed_string_t dump;
-       fixed_string_t onoff;
-};
-
-/* function called when cmd_dump is parsed successfully */
-static void cmd_dump_parsed(void *parsed_result, void *data)
-{
-       struct cmd_dump_result *res = parsed_result;
-
-       (void)data;
-       if (!strcmp(res->onoff, "on"))
-               xbee_hexdump = 1;
-       else
-               xbee_hexdump = 0;
-}
-
-const char PROGMEM str_dump[] = "dump";
-const char PROGMEM str_dump_onoff[] = "on#off";
-
-const parse_token_string_t PROGMEM cmd_dump_dump =
-       TOKEN_STRING_INITIALIZER(struct cmd_dump_result, dump,
-                                str_dump);
-
-const parse_token_string_t PROGMEM cmd_dump_onoff =
-       TOKEN_STRING_INITIALIZER(struct cmd_dump_result, onoff,
-                                str_dump_onoff);
-
-const char PROGMEM help_dump[] = "enable/disable hexdump of received packets";
-
-const parse_inst_t PROGMEM cmd_dump = {
-       .f = cmd_dump_parsed,  /* function to call */
-       .data = NULL,      /* 2nd arg of func */
-       .help_str = help_dump,
-       .tokens = {        /* token list, NULL terminated */
-               (PGM_P)&cmd_dump_dump,
-               (PGM_P)&cmd_dump_onoff,
-               NULL,
-       },
-};
-
-/* ************* */
-
-/* this structure is filled when cmd_debug is parsed successfully */
-struct cmd_debug_result {
-       fixed_string_t debug;
-       fixed_string_t onoff;
-};
-
-/* function called when cmd_debug is parsed successfully */
-static void cmd_debug_parsed(void *parsed_result, void *data)
-{
-       struct cmd_debug_result *res = parsed_result;
-
-       (void)data;
-       if (!strcmp(res->onoff, "on"))
-               xbee_debug = 1;
-       else
-               xbee_debug = 0;
-}
-
-const char PROGMEM str_debug[] = "debug";
-const char PROGMEM str_debug_onoff[] = "on#off";
-
-const parse_token_string_t PROGMEM cmd_debug_debug =
-       TOKEN_STRING_INITIALIZER(struct cmd_debug_result, debug,
-                                str_debug);
-
-const parse_token_string_t PROGMEM cmd_debug_onoff =
-       TOKEN_STRING_INITIALIZER(struct cmd_debug_result, onoff,
-                                str_debug_onoff);
-
-const char PROGMEM help_debug[] = "enable/disable additionnal debug";
-
-const parse_inst_t PROGMEM cmd_debug = {
-       .f = cmd_debug_parsed,  /* function to call */
-       .data = NULL,      /* 2nd arg of func */
-       .help_str = help_debug,
-       .tokens = {        /* token list, NULL terminated */
-               (PGM_P)&cmd_debug_debug,
-               (PGM_P)&cmd_debug_onoff,
-               NULL,
-       },
-};
-
 /**********************************************************/
 
 /* this structure is filled when cmd_baudrate is parsed successfully */
@@ -1937,8 +1849,6 @@ const parse_ctx_t PROGMEM main_ctx[] = {
        &cmd_monitor_del,
        &cmd_ping,
        &cmd_raw,
-       &cmd_dump,
-       &cmd_debug,
        &cmd_baudrate,
        &cmd_beep,
        &cmd_servo_set,