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
justinbeech
62b104cbfa
Found free extra 256 bytes of RAM eliminate _clz use from libgcc
...
Believe it or not, changing / 2^31 to >>31 saved 256 bytes in the "d" segment.
The reason is that GCC version prior to 4.3.5 does not have a count_leading_zeros (clz) assembler macro, so it uses a 256 byte lookup table called _clz
The _clz table gets pulled in if you do 64 bit division.
This tiny change is the only place that we do long long division.
Changing to a shift saves 256 bytes of ram.
13 years ago
Jason Short
24ce02c6a4
made I term return in same pattern as D term
13 years ago
Andrew Tridgell
79d622939a
ADC: on channel overflow we should not zero last_ch6_micros
...
this happens every 64 seconds because of unused channels on the
ADC. Zeroing this creates a bad delta_t value for the DCM code.
13 years ago
Jason Short
026e4a6567
change constant to float 44330.0
13 years ago
Michael Oborne
2f81776b0d
eedump ap param in perl
13 years ago
Andrew Tridgell
a48a118128
SITL: adjust the SITL compass code to have saner z values
13 years ago
Andrew Tridgell
62326c0f72
Compass: enable compass offsets for HIL compass
...
this makes the null_offsets algorithm have an effect for the HIL
compass that is used for SITL, which makes for easier testing of
compass calibration
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
4398171374
SITL: catch floating point errors
...
if we get a FPE then log a message and exit
13 years ago
Andrew Tridgell
245d265c6a
DCM: added a SITL_debug() for DCM normalisation errors
...
I have seen normalisation errors during simulation runs, but have not
yet tracked down the cause. This log message may help track things
down.
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
085cc00c33
RC_Channel_aux: fixed a uninitialied variable error, and save a bit of stack space
13 years ago
Andrew Tridgell
43c56be70c
SITL: add some magnetometer offsets
...
this ensures the compass null_offset algorithm has some work to do in
autotest
13 years ago
Andrew Tridgell
f95d7cadc5
fixed SITL GPS heading to be 0..360
13 years ago
Andrew Tridgell
6a42598ade
use stdint types in the compass code
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
d90dc4d893
GPS: change back to 4Hz for MTK GPS
...
this will hopefully fix the NO_GPS problems that have been regularly
happening in recent months. I will watch the logs carefully to see if
the problem recurs
13 years ago
Andrew Tridgell
804332c340
AP_Baro: fixed some signed/unsigned warnings
...
and a potential bug on timer wrap
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
23ed5c2cee
fixed imax load/save in PID
13 years ago
Andrew Tridgell
37cabb4cfa
fixed dead zone load/save
13 years ago
Andrew Tridgell
150a67c262
fixed PID initialisation
13 years ago
Andrew Tridgell
47807ec68d
RC_Channel_aux: catch invalid function settings
...
a bad function setting would overwrite the heap
13 years ago
Andrew Tridgell
1f05e7dafb
fixed types in GPS detect code
...
using int everywhere is wasteful and non-portable
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
9c5a5473ab
added indexes to group info structures
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
db96303fa0
convert APM_PI library to AP_Param
13 years ago
Andrew Tridgell
452749149f
convert AC_PID library to AP_Param
13 years ago
Andrew Tridgell
f9eed9bd9e
fixed missing return in D value
13 years ago
Andrew Tridgell
f760b3c717
restore _fCut that was lost in AP_Param development
13 years ago
Andrew Tridgell
84aef17bb0
fixed initialisation of RC_Channel class
13 years ago
Andrew Tridgell
5418302b38
AP_Param: fixed desktop build
13 years ago
Andrew Tridgell
d658bc6f9d
desktop: more progmem string functions
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
e01af5885f
adapt Mavlink_compat.h to AP_Param
13 years ago
Andrew Tridgell
bf4a77da81
convert libraries to new typesafe macros
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
12dac42174
modify RC_Channel for AP_Param
13 years ago
Andrew Tridgell
e5a0074312
modify the PID library for AP_Param
13 years ago