Commit Graph

14 Commits

Author SHA1 Message Date
Andrew Tridgell f44f7308e8 AP_Param: we don't need to avoid writes in AP_Param now
now handled in the HAL
2013-06-04 14:02:49 +10:00
Andrew Tridgell 26b7de668a AP_Param: fixed parameter save bug
This bug affected parameters where the defaults are overridden in the
object constructor. For example, a PID object may have a default value
for PID_D of 0.0, but have a constructor based default of 0.2. If the
user tries to set the value to exactly 0.0, then the set wouldn't happen,
as the value matches the value in the object default var_info[]
table. 

This change ensures we force a save to eeprom if the value is changing
from the current value, regardless of the var_info[] default.

Thanks to Tom Coyle for finding this bug!
2013-06-02 14:49:34 +10:00
Andrew Tridgell ad2f6e1217 AP_Param: add support for converting between old and new parameters
this allows for a conversion table between old parameters and new
parameters, making firmware upgrades with moved parameters much easier
for users
2013-05-31 07:58:29 +10:00
Andrew Tridgell 9171d5587d AP_Param: make it easier to show the value of a parameter 2013-04-20 13:52:36 +10:00
James Bielman 5631f865b2 Update floating point calculations to use floats instead of doubles.
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
Andrew Tridgell 7be1335b3a AP_Param: removed copy_name() and add token to find_by_index()
this allows callers to avoid another var_info traverse
2013-01-09 13:30:51 +11:00
Andrew Tridgell c8ae665ac3 AP_Param: added copy_name_token()
this avoids an expensive var_info traversal on every copy_name call
2013-01-08 14:37:39 -08:00
Andrew Tridgell 3a762f891e AP_Param: fixup for ARM compiler 2013-01-02 14:45:08 +11:00
Andrew Tridgell ceb3f577d8 libraries: use new math functions 2012-12-20 14:53:22 +11:00
Andrew Tridgell af12c18dea AP_Param: setup var_info and num_vars earlier
needed for AP_HAL startup
2012-12-20 14:52:29 +11:00
Andrew Tridgell 95d4cc2ce9 AP_Param: change method of loading defaults
this avoids a dependency on the constructor ordering by loading
defaults for each object separately
2012-12-20 14:51:38 +11:00
Pat Hickey ec53515648 AP_Param: eeprom translated to use AP_HAL. No unit tests available! 2012-12-20 14:51:29 +11:00
Pat Hickey f2b21ecc41 AP_Param: Port to work with AP_HAL class instead of FastSerial 2012-12-20 14:51:24 +11:00
Pat Hickey c4dbe8c627 AP_Param: move from AP_Common to its own library 2012-12-20 14:51:19 +11:00