Commit Graph

269 Commits

Author SHA1 Message Date
uncrustify 953cab5c5f uncrustify libraries/AP_Common/AP_Test.h 2012-08-21 19:19:51 -07:00
uncrustify 4b60e53736 uncrustify libraries/AP_Common/AP_Loop.h 2012-08-21 19:01:03 -07:00
uncrustify 7d438cd65d uncrustify libraries/AP_Common/include/menu.h 2012-08-21 19:01:02 -07:00
uncrustify 6bb8e4e8ac uncrustify libraries/AP_Common/AP_Common.h 2012-08-21 19:01:02 -07:00
uncrustify 0c99546f45 uncrustify libraries/AP_Common/AP_MetaClass.h 2012-08-21 19:01:02 -07:00
uncrustify e79d9adea0 uncrustify libraries/AP_Common/c++.h 2012-08-21 19:00:52 -07:00
uncrustify 3a26b94af2 uncrustify libraries/AP_Common/tools/eedump.c 2012-08-21 19:00:51 -07:00
uncrustify 4a50e56a48 uncrustify libraries/AP_Common/tools/eedump_apparam.c 2012-08-21 19:00:51 -07:00
uncrustify 3e4507a4a2 uncrustify libraries/AP_Common/menu.cpp 2012-08-21 19:00:51 -07:00
uncrustify 09c4f76b57 uncrustify libraries/AP_Common/AP_Param.cpp 2012-08-21 19:00:51 -07:00
uncrustify c18e73a54d uncrustify libraries/AP_Common/c++.cpp 2012-08-21 19:00:51 -07:00
uncrustify ca476e5851 uncrustify libraries/AP_Common/examples/menu/menu.pde 2012-08-21 19:00:51 -07:00
Pat Hickey 42e24a869f uncrustify libraries/AP_Common/AP_Param.h with fixups by hand 2012-08-21 19:00:51 -07:00
rmackay9 976679208c AP_Common: change a few more "int" to "int16_t" 2012-08-18 18:05:18 +09:00
Andrew Tridgell c70bae9617 AP_MetaClass: fixed a warning 2012-08-09 16:19:04 +10:00
Andrew Tridgell 7f4b7703c1 AP_Param: fixed some build warnings 2012-08-09 16:18:53 +10:00
Andrew Tridgell e6e25525bc AP_Param: avoid saving values within 0.01% of the default value
this saves some more space due to rounding errors
2012-08-08 13:13:30 +10:00
Andrew Tridgell c298d5130f AP_Param: major update to use default values in var_info table
this stores the default value for all scalar variables in the var_info
table, which makes it possible to avoid storing default values in
eeprom. That allows us to oversubscribe the eeprom space with a much
lower risk of overrun.
2012-08-08 12:11:57 +10:00
Andrew Tridgell e1725e9ea5 AP_Param: added some docs on the eeprom header format 2012-07-10 14:03:49 +10:00
Andrew Tridgell 9d221b3625 AP_Common: fixed some duplicate product ID warnings 2012-05-17 23:37:32 +10:00
Craig Elder 69bf5700cd IMU: expose IMU_PRODUCT_ID as EEPROM Variable
this will allow us to log the Product ID in tlogs
2012-05-09 18:30:36 -07:00
Craig Elder 4c46955612 PRODUCT: Define product IDs for all supported products 2012-05-09 18:30:36 -07:00
Andrew Tridgell 4f90e6e844 build: cope with Arduino 1.0 in command line build
this should autodetect 1.0 versus older builds
2012-04-27 15:38:42 +10:00
Amilcar Lucas 6e9ffb4249 correct small typos in comments 2012-03-11 21:30:09 +01:00
Andrew Tridgell f4329d2680 AP_Param: ensure we can't have duplicate keys in Parameters.h
this is O(n^2), but only at startup, and takes less than 1ms to run.
It catches a very nasty coding error
2012-03-02 15:48:28 +11:00
Pat Hickey 337af0c7a2 AP_Param: nested group recursion into next_group disableable by macro
* c.f. 0251932c81fe7eb, e5515bb6ef82
2012-02-29 19:48:43 -08:00
Pat Hickey 2648694489 AP_Param: One more nexted group recursion disableable by macro
* c.f. e5515bb6ef82
2012-02-29 18:48:54 -08:00
Pat Hickey eac8b66385 AP_Param: Make nested group recursion disableable by macro
* Eliminates recursive calls inside AP_Param.
  This is important to Pat @ Galois, but not the project in general.
  Recursion depth on these functions is bounded structurally using
  existing nested group constructors (can't create loops in finite space)
  and checked at init time
2012-02-28 16:28:27 -08:00
Andrew Tridgell cb52b6c6d9 AP_Param: show numerical value in eeprom dump utility 2012-02-28 09:43:49 +11:00
Andrew Tridgell a432232db9 AP_Param: fixed v.load() on a sub-element of a AP_Vector3f
this isn't actually used at the moment in APM, but we should get it
right in case someone does try to load a single element of a vector
2012-02-28 09:43:49 +11:00
Andrew Tridgell 87a6d97f7b AP_Param: fixed setting of CAM_P_G in ArduCopter
the variable CAM_P_G has the same prefix as the CAM_P group. We want
to allow for parameters having a common prefix with a group, so we
need to keep searching after we've found a group that matches the
prefix
2012-02-27 10:54:33 +11:00
Andrew Tridgell fa443bd928 AP_Param: make the templating code a bit clearer
add comments on the arguments, and name them in a clearer way
2012-02-27 10:54:33 +11:00
Andrew Tridgell f10097a6d5 AP_Param: added some comments on AP_Vector3f handling 2012-02-25 11:37:20 +11:00
Andrew Tridgell 2e9105c68a AP_Param: added special handling for Vector3f
We would like to be able to use Vector3f as a parameter while exposing
the individual elements of the vector as MAVLink parameters. This
change to AP_Param makes that possible, by giving AP_Vector3f a dual
personality
2012-02-25 11:37:20 +11:00
Andrew Tridgell 53b87229ff AP_Param: added ParamToken type for variable list traversal 2012-02-19 17:05:28 +11:00
Andrew Tridgell 882cd4ea83 AP_Param: moved AP_Vector3f and AP_Matrix3f declarations to AP_Math.h
this avoids us needing AP_Math.h in every utility sketch and example
2012-02-18 10:51:57 +11:00
Andrew Tridgell 4b15b63d21 AP_Param: fixed copy-assignment operators for AP_Param vectors 2012-02-18 10:51:57 +11:00
Andrew Tridgell 7f3858cb7f AP_Param: added a set_and_save_ifchanged() method
this can be used to avoid the scan() in more frequenctly saved
variables, such as the MAVLink stream rates in APM
2012-02-18 10:51:57 +11:00
Andrew Tridgell 80a6773b8b AP_Param: added an initialised() method
this will be used by the compass code
2012-02-18 10:51:57 +11:00
Michael Oborne 2f81776b0d eedump ap param in perl 2012-02-15 21:31:58 +08:00
Andrew Tridgell 048aed5427 fixed dump size 2012-02-15 10:44:09 +11:00
Andrew Tridgell 089db43183 show group_element too 2012-02-15 10:42:21 +11:00
Andrew Tridgell ea6a46fc9b AP_Param: added eeprom_aaparam.c dump utility 2012-02-15 10:41:06 +11:00
Andrew Tridgell 601a991a46 added SITL_debug() macro
this can be used to print a message into the logs in the SITL
simulator. This will be used for critical conditions.
2012-02-15 08:50:45 +11:00
Andrew Tridgell be5ffdedbb AP_Param: allow dumping of AP_Vector3f
this means the 'show' command in the CLI shows the compass offsets now
2012-02-14 08:34:50 +11:00
Andrew Tridgell 74bbc72b11 move AP_Var code and example into libraries/AP_Var
you can use AP_Var by defining USE_AP_VAR
2012-02-13 16:22:53 +11:00
Andrew Tridgell d55a0c3a71 added AP_Param::show_all()
this moves the logic into common code
2012-02-13 16:22:52 +11:00
Andrew Tridgell 9175ebe33a change back to 256 max variables in _var_info[]
this keeps the header to 24 bits, and allows the token to be 16
bits. If we need more variables we can put them in a nested group.
2012-02-13 16:22:52 +11:00
Andrew Tridgell f2a6a31645 AP_Param: added group idx, and change packing of header elements
adding a idx element to the GroupInfo will make it less likely that a
developer will change the IDs of group elements, and make it easier to
see that these IDs are important for identifying a variable in EEPROM

The header packing has changed to make it 24 bits on all platforms,
which allows us to lower the EEPROM variable max size to 1024 bytes
again
2012-02-13 16:22:52 +11:00
Andrew Tridgell 678a1df3be fixed support for AP_PARAM_SPARE
spare group elements are needed if we remove a group parameter
2012-02-13 16:22:52 +11:00
Andrew Tridgell accaf9bb30 fixed build on arduino 1.0 2012-02-13 16:22:52 +11:00
Andrew Tridgell 5418302b38 AP_Param: fixed desktop build 2012-02-13 16:22:51 +11:00
Andrew Tridgell 95e107ab75 AP_Param: added generic cast_to_float 2012-02-13 16:22:51 +11:00
Andrew Tridgell 9509c69f42 AP_Param: disable debug ready for production 2012-02-13 16:22:51 +11:00
Andrew Tridgell 5d03f13aa5 AP_Param: make ptype in first() and next() optional 2012-02-13 16:22:51 +11:00
Andrew Tridgell e8c4ecf9fa added nested group support and validation 2012-02-13 16:22:51 +11:00
Andrew Tridgell 94a86204ee added size of Vector6f 2012-02-13 16:22:51 +11:00
Andrew Tridgell 497a400841 hacks to get AP_Param to compile 2012-02-13 16:22:50 +11:00
Andrew Tridgell 5b842a447f new AP_Param subsystem 2012-02-13 16:22:50 +11:00
Randy Mackay ed19c25a97 Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Mike Smith 9c5a776456 Teach the Makefile about the new Arduino sourcefile suffix 2012-01-15 11:51:38 -08:00
Jason Short e2830ca147 fixed type error 2012-01-10 23:43:44 -08:00
Michael Oborne 92886cfa10 make file relax 2011-12-17 20:42:51 +08:00
Michael Oborne f4b7aea1ee add relax 2011-12-17 16:53:14 +08:00
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 0da5125b7f upload: force hex file format for upload
this should fix a problem with hex file format detection on MacOS
2011-11-27 09:36:10 +11:00
Andrew Tridgell 7fa59a6849 AP_Common: added typesafe wrapper for memcpy_P() 2011-11-26 17:17:50 +11:00
Andrew Tridgell 92e0e929a4 AP_Common: replace strlcat_P() with a C implementation
the one in the Arduino libc was giving us bogus results on one
machine, and is suspect. We couldn't spot what is wrong in the
assembler, but replacing the implementation with a C one fixes the
bug, so we replaced it
2011-11-26 17:02:56 +11:00
Andrew Tridgell 6e9e857157 make configure default to 2560
1280 is less common for devs these days
2011-11-25 20:00:17 -08:00
Pat Hickey a159669cee build: added jtag-program make target
useful for when you have hosed your USB
2011-11-25 20:00:16 -08:00
James Goppert 7ef8578029 Separated controller block class.
Also improved documentation of AP_ControllerBlock.
2011-11-24 13:28:14 -05:00
Wenyao Xie 8017b0415e Working on new hil message for mavlink. 2011-11-15 17:15:54 -05: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
Andrew Tridgell d78bbb1a40 added pgm_read_pointer()
this will be used by the menu code to make reading pointers from
progmem portable
2011-11-07 22:56:13 +11:00
Andrew Tridgell 251cf7d87c force LANG=C for MacOS awk 2011-11-07 13:33:38 +11:00
James Goppert 77da85648d Clean up formatting for AP_Common 2011-10-28 14:43:43 -04:00
James Goppert 32af63f734 Added battery monitoring, arming to apo.
Arming added for quadrotor. Need to add to rover still. Battery
monitoring added with auto shut-off in quadrotor controller.
Finally split apo header and source files to allow faster
compiling/ fix cyclic header inclusions.
2011-10-16 02:55:34 -04:00
Andrew Tridgell bcb8fb1c7f desktop: silence an implicit cast warning 2011-10-11 20:53:43 +11:00
Andrew Tridgell 0939b51a4c added build makefiles 2011-10-10 07:18:38 +11:00
Andrew Tridgell 41dd8d60ba use ifdef for DESKTOP_BUILD 2011-10-09 22:16:14 +11:00
Andrew Tridgell 7098e8cfa1 first rough build for desktop CPUs
this allows ArduPlane to build and startup on 'desktop' systems (eg. a
Linux box). Very rough for now, and only for HIL so far
2011-10-09 22:16:13 +11:00
Andrew Tridgell 28ebca1bf6 fixed PROGMEM declaration for desktop build 2011-10-09 22:16:13 +11:00
Andrew Tridgell bcc2aed8fb initialise spare bits in AP_Var headers
if we ever need these bits, it would be nice to know that they are
zero in existing eeproms
2011-10-09 22:09:00 +11:00
Andrew Tridgell 00d52a8bd7 ap_common: use intptr_t for pointer casts
this allows building on systems with pointers that aren't 16 bits long
2011-10-09 22:08:59 +11:00
Amilcar Lucas 45950489d1 More improvements to MS Windows
Now the avr-gdb, avrdude and avarice tools do not need to be in the path.
2011-10-03 19:16:55 +02:00
amilcar 7a510084b1 Fix serial port on windows 2011-10-03 12:10:27 +02:00
amilcar 550deffbe8 Make it work on windows "out-of-the-box" 2011-10-03 12:08:19 +02:00
Amilcar Lucas c37fabea66 Added a comment to the BOARD type of teh make configure output file 2011-10-02 00:04:21 +02:00
Amilcar Lucas eaaf44e2c8 Fix Arduino version detection on some systems 2011-10-02 00:03:57 +02:00
James Goppert 0c7c508541 Optional recursion added. 2011-09-30 17:17:51 -04:00
James Goppert 9e6b47184a Arduino version directory updated to lib/version.txt
Also updated cmake files.
2011-09-29 22:10:26 -04:00
James Goppert 5489b84f8e Improvements to cmake. 2011-09-29 21:23:26 -04:00
James Goppert 71fbdf721a Added APO branch. 2011-09-28 20:51:12 -04:00
Amilcar Lucas 03740469fd fix quotes and indentation 2011-09-27 04:40:00 +02:00
James Goppert 9c766d6373 Added override for mega upload protocol. 2011-09-26 20:29:09 -04:00
James Goppert 6abb8a0796 Modified Arduino.mk to use correct upload protocol if not overrided.
The previous comment of upload protocol not working cannot be verified on
linux. If this problem persists on cygwin, please override with
UPLOAD_PROTOCOL=arduino in the enivornment before calling Arduino.mk
2011-09-22 13:35:26 -04:00
Andrew Tridgell ba6c58a33c build: cope with more depths for libraries
this finds the libraries at more levels up from the current directory
2011-09-17 14:58:02 +10:00
Janne M d5e5240e19 Issue #415: Modified spotlight search string. Added UPLOAD_PROTOCOL parameter to makefile to use different programmer. 2011-09-15 22:38:22 +03:00
Mike Smith 42abbb41fd Add options to generate assembly listings for all of the compiled
files.  This is a possible starting point for a tool to analyse the
call graph and stack usage of APM.

It's also interesting by itself.
2011-09-14 22:39:34 -07:00
unknown a4e001bbcf Adding CMake support 2011-09-14 15:44:55 +02:00