mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-12 02:48:28 -04:00
Print the key associated with a variable when the variable is printed using AP_Var_menu_show.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1812 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
0431b6dc69
commit
cdc5241363
@ -124,7 +124,7 @@ AP_Var_menu_show(uint8_t argc, const Menu::arg *argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// print name and value
|
// print name and value
|
||||||
Serial.printf_P(PSTR("%-32.32s: "), name_buffer);
|
Serial.printf_P(PSTR("%03u:%-32.32s: "), vp->key(), name_buffer);
|
||||||
AP_Var_print(vp);
|
AP_Var_print(vp);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
}
|
}
|
||||||
@ -132,12 +132,12 @@ AP_Var_menu_show(uint8_t argc, const Menu::arg *argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// show variable by name
|
// show variable by name
|
||||||
Serial.printf_P(PSTR("%s: "), argv[1].str);
|
|
||||||
vp = AP_Var::find(argv[1].str);
|
vp = AP_Var::find(argv[1].str);
|
||||||
if (NULL == vp) {
|
if (NULL == vp) {
|
||||||
Serial.println_P(PSTR("not found"));
|
Serial.println_P(PSTR("not found"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Serial.printf_P(PSTR("%03u:%s: "), vp->key(), argv[1].str);
|
||||||
AP_Var_print(vp);
|
AP_Var_print(vp);
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user