But the two new ones (could be old stock) don't allow any changes in CLI. CLI loads up fine but does not take any commands... If I type help, setup on the prompt and press enter nothing happens...
The two units behave exactly the same, code loads up as should, both units boot up nice and all lights are correct.
What could be the problem?
Regards,
Patrik
Replies
len = argc;
while (len <= MENU_ARGS_MAX) {
_argv[len].str = "";
_argv[len].i = 0;
_argv[len].f = 0;
len++;
}
This did the trick for me it seems. Thank you.
I actually had the same problem! I had to update to the current SVN version, because the Beta release had a bug with the Airspeed sensor and after updating I could not run the test in CLI mode. As the Beta version worked, it was obviously a bug in the trunk.
I ended up tracking down the issue to the "Simple command line menu system" utility, inside the AP_Common library. In revision #760, a new protection has been added, which should initialize the command parameters to empty strings and zeros (it would allow the developers to avoid having to check for the size of the arguments and instead rely on the empty values), but it seems that this causes the processing to enter an infinite loop.
To fix this, you can revert changes from revision #760, or just simply remove this protection, by commenting lines 92 to 96 in file "libraries\AP_Common\menu.cpp":
// populate arguments that have not been specified with "" and 0
// this is safer than NULL in the case where commands may look
// without testing argc
// while (argc <= MENU_ARGS_MAX) {
// _argv[argc].str = "";
// _argv[argc].i = 0;
// _argv[argc].f = 0;
// }
Alternatively, you can also modify this to finalize the change that was intended with this loop, by changing to:
// populate arguments that have not been specified with "" and 0
// this is safer than NULL in the case where commands may look
// without testing argc
len = argc;
while (len <= MENU_ARGS_MAX) {
_argv[len].str = "";
_argv[len].i = 0;
_argv[len].f = 0;
len++;
}
Let me know if it works. I don't have any idea on how to submit patches, but I can try to open an issue in Google Code to explain this.