Commit Graph

15 Commits

Author SHA1 Message Date
Doug Weibel 997ddde7f5 Added back the feature to prompt users when an invalid CLI command is entered.
Thanks to Yury Smirnov for this patch!
2011-11-26 21:10:53 -07:00
Andrew Tridgell b927e64440 desktop: fixed 2 crashes in the menu code
handle an empty line gracefully, and use pgm_read_pointer() for
functions pointers in progmem
2011-11-07 22:56:13 +11:00
James Goppert 77da85648d Clean up formatting for AP_Common 2011-10-28 14:43:43 -04:00
tridge60@gmail.com a633617eef added -Wformat in Arduino.mk
when building with 'make' we get warnings related to printf() format
strings

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1798 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-21 07:26:03 +00:00
DrZiplok@gmail.com 458dfde81d Move the warning controls for APM out to AP_Common. This makes it easier to grab these for libraries uniformly.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@960 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-27 23:27:08 +00:00
DrZiplok@gmail.com a468abcdbf Add a better workaround for a GCC bug that generates spurious warnings for PSTR()
git-svn-id: https://arducopter.googlecode.com/svn/trunk@920 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-25 02:59:30 +00:00
DrZiplok f345d5392f Back out the workaround for PSTR() warnings; it doesn't.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@912 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-24 08:06:09 +00:00
DrZiplok@gmail.com 906239160d Add a workaround for a GCC bug that generates spurious warnings for PSTR()
git-svn-id: https://arducopter.googlecode.com/svn/trunk@900 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-23 09:07:47 +00:00
james.goppert 33a7d26846 Adding missing loop counter for menu.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@809 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-09 01:58:00 +00:00
DrZiplok@gmail.com c39639045c Default un-supplied command arguments to the empty string and zero rather than leaving them potentially un-initialised. This makes it safe for commands to compare argument strings without adding the expense of checking argc first.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@760 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-11-01 03:40:54 +00:00
DrZiplok@gmail.com 6838829428 Use strtok_r rather than strtok. Saves a stack frame, two bytes of global, and fixes backwards compatibility with older avr-libc versions.
Fixes issue #131

git-svn-id: https://arducopter.googlecode.com/svn/trunk@554 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 18:13:08 +00:00
DrZiplok@gmail.com 4b09c9fade Fell asleep before committing these, oops.
Cut menu entry return type down to int8_t, make menu command checks case-insensitive.

Fixes issue #135

git-svn-id: https://arducopter.googlecode.com/svn/trunk@553 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-25 18:02:41 +00:00
DrZiplok@gmail.com e2184615d9 Change the way pre-prompt printing works to avoid having to deal with "magic" menu entries.
Add a default 'exit' command to back out of a menu.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@546 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 07:31:59 +00:00
DrZiplok@gmail.com 064dda10bf Provide an easy way to print stuff before displaying the prompt.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@545 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 06:18:59 +00:00
DrZiplok@gmail.com eb6113e685 Add a simple commandline menu library.
The library has an interface suitable for both interactive and automated use (i.e. Arduino console or GCS operation).


git-svn-id: https://arducopter.googlecode.com/svn/trunk@544 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-09-24 05:50:02 +00:00