Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Tridgell 513fd4065b AP_Menu: use strtof() instead of atof() 2019-10-28 15:53:16 +11:00
murata aa3fb830af AP_Menu: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi 25c289b74c AP_Menu: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Lucas De Marchi bdd1d5e9d4 AP_Menu: fix wrong printf format for printf
"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
2015-10-30 14:35:41 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi 6f0db45b57 Replace use of strcasecmp_P() with strcasecmp() 2015-10-30 14:35:08 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Julien BERAUD 22af74bfe6 AP_Menu: Fix warning
Declare member in an appropriate type so there is no warning
2015-10-06 10:36:22 +11:00
Gustavo Jose de Sousa 8e5fc67903 AP_Menu: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:38:18 +10:00
Peter Barker 39b2cdcc3c AP_Menu: avoid segmentation fault
Insufficient input would cause a segfault
2015-07-24 08:05:13 +10:00
tcr3dr 523acc1c54 AP_Menu: Corrects string null comparison in AP_Menu. 2015-07-01 11:31:54 +10:00
Lucas De Marchi ff398dbf0c AP_Menu: Do not compare delegate to NULL
Use the simpler "if (delegate_name)" since it allows simpler
implementation in the class, i.e. the bool operator rather than having
to compare to another object.
2015-05-26 13:46:48 +10:00
Andrew Tridgell db13f657a8 AP_Menu: support member functions for rover 2015-05-21 07:48:46 +10:00
Andrew Tridgell a86ec8c786 AP_Menu: fixed double display of prompt 2013-11-06 10:49:47 +11:00
Andrew Tridgell 45381e5341 AP_Menu: added check_for_input() API
this allows for async use of the menus, so that a main loop can run
while allowing the user to enter menu commands
2013-11-06 09:40:49 +11:00
Andrew Tridgell 46724db144 AP_Menu: zero buffer contents on allocation 2013-11-06 09:40:46 +11:00
Andrew Tridgell 470e5f570d AP_Menu: dynamically allocate the menu buffers
this saves memory when the menus are not used, and allows for the
commandline and argument limits to be changed
2013-11-06 09:40:40 +11:00
Andrew Tridgell 134bf5a5c9 AP_Menu: be friendly to multi-tasking OSes in menus 2013-10-01 13:04:40 +10:00
Andrew Tridgell 2819dd99fa AP_Menu: copy with newline from console
helps debugging on HAL_Linux
2013-10-01 13:00:48 +10:00
Andrew Tridgell 5fdf6ff4f7 AP_Menu: fixed indent-tabs-mode 2013-05-30 09:51:43 +10:00
Andrew Tridgell 68051f3ea6 AP_Menu: fixed crash bug in strtok_r() handling
on PX4 this causes a hard fault in CLI menus
2013-04-17 22:20:00 +10:00
Pat Hickey 3b1150d857 AP_Menu: ported to AP_HAL 2012-12-20 14:51:29 +11:00
Andrew Tridgell ba4b9b9961 AP_Menu: allow menus to work on ports other than UART0 2012-11-21 21:41:34 +11:00
Pat Hickey 1bf21aae20 AP_Menu: create new library with menu from AP_Common 2012-10-18 20:50:16 -07:00