uncrustify
09c4f76b57
uncrustify libraries/AP_Common/AP_Param.cpp
13 years ago
uncrustify
c18e73a54d
uncrustify libraries/AP_Common/c++.cpp
13 years ago
uncrustify
ca476e5851
uncrustify libraries/AP_Common/examples/menu/menu.pde
13 years ago
Pat Hickey
42e24a869f
uncrustify libraries/AP_Common/AP_Param.h with fixups by hand
13 years ago
rmackay9
976679208c
AP_Common: change a few more "int" to "int16_t"
13 years ago
Andrew Tridgell
c70bae9617
AP_MetaClass: fixed a warning
13 years ago
Andrew Tridgell
7f4b7703c1
AP_Param: fixed some build warnings
13 years ago
Andrew Tridgell
e6e25525bc
AP_Param: avoid saving values within 0.01% of the default value
...
this saves some more space due to rounding errors
13 years ago
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.
13 years ago
Andrew Tridgell
e1725e9ea5
AP_Param: added some docs on the eeprom header format
13 years ago
Andrew Tridgell
9d221b3625
AP_Common: fixed some duplicate product ID warnings
13 years ago
Craig Elder
69bf5700cd
IMU: expose IMU_PRODUCT_ID as EEPROM Variable
...
this will allow us to log the Product ID in tlogs
13 years ago
Craig Elder
4c46955612
PRODUCT: Define product IDs for all supported products
13 years ago
Andrew Tridgell
4f90e6e844
build: cope with Arduino 1.0 in command line build
...
this should autodetect 1.0 versus older builds
13 years ago
Amilcar Lucas
6e9ffb4249
correct small typos in comments
13 years ago
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
13 years ago
Pat Hickey
337af0c7a2
AP_Param: nested group recursion into next_group disableable by macro
...
* c.f. 0251932c81fe7eb, e5515bb6ef82
13 years ago
Pat Hickey
2648694489
AP_Param: One more nexted group recursion disableable by macro
...
* c.f. e5515bb6ef82
13 years ago
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
13 years ago
Andrew Tridgell
cb52b6c6d9
AP_Param: show numerical value in eeprom dump utility
13 years ago
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
13 years ago
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
13 years ago
Andrew Tridgell
fa443bd928
AP_Param: make the templating code a bit clearer
...
add comments on the arguments, and name them in a clearer way
13 years ago
Andrew Tridgell
f10097a6d5
AP_Param: added some comments on AP_Vector3f handling
13 years ago
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
13 years ago
Andrew Tridgell
53b87229ff
AP_Param: added ParamToken type for variable list traversal
13 years ago
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
13 years ago
Andrew Tridgell
4b15b63d21
AP_Param: fixed copy-assignment operators for AP_Param vectors
13 years ago
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
13 years ago
Andrew Tridgell
80a6773b8b
AP_Param: added an initialised() method
...
this will be used by the compass code
13 years ago
Michael Oborne
2f81776b0d
eedump ap param in perl
13 years ago
Andrew Tridgell
048aed5427
fixed dump size
13 years ago
Andrew Tridgell
089db43183
show group_element too
13 years ago
Andrew Tridgell
ea6a46fc9b
AP_Param: added eeprom_aaparam.c dump utility
13 years ago
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.
13 years ago
Andrew Tridgell
be5ffdedbb
AP_Param: allow dumping of AP_Vector3f
...
this means the 'show' command in the CLI shows the compass offsets now
13 years ago
Andrew Tridgell
74bbc72b11
move AP_Var code and example into libraries/AP_Var
...
you can use AP_Var by defining USE_AP_VAR
13 years ago
Andrew Tridgell
d55a0c3a71
added AP_Param::show_all()
...
this moves the logic into common code
13 years ago
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.
13 years ago
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
13 years ago
Andrew Tridgell
678a1df3be
fixed support for AP_PARAM_SPARE
...
spare group elements are needed if we remove a group parameter
13 years ago
Andrew Tridgell
accaf9bb30
fixed build on arduino 1.0
13 years ago
Andrew Tridgell
5418302b38
AP_Param: fixed desktop build
13 years ago
Andrew Tridgell
95e107ab75
AP_Param: added generic cast_to_float
13 years ago
Andrew Tridgell
9509c69f42
AP_Param: disable debug ready for production
13 years ago
Andrew Tridgell
5d03f13aa5
AP_Param: make ptype in first() and next() optional
13 years ago
Andrew Tridgell
e8c4ecf9fa
added nested group support and validation
13 years ago
Andrew Tridgell
94a86204ee
added size of Vector6f
13 years ago
Andrew Tridgell
497a400841
hacks to get AP_Param to compile
13 years ago
Andrew Tridgell
5b842a447f
new AP_Param subsystem
13 years ago