Commit Graph

109 Commits

Author SHA1 Message Date
Andrew Tridgell 0b948d3faf AP_Param: allow save_sync without send 2021-04-21 07:12:55 +10:00
Andrew Tridgell 23785c00dc AP_Param: improved queue handling and added set_and_save_by_name_ifchanged 2021-04-21 07:12:55 +10:00
Andrew Tridgell 7b98ab0f12 AP_Param: added get_param_by_index
useful for parameter conversion within an object
2021-04-15 06:57:16 +10:00
Michelle Rossouw 8bc0f100a2 AP_Param: added blimp frame type 2021-03-31 12:27:07 +11:00
Andrew Tridgell 6c684538d3 AP_Param: greatly speed up param download with disabled parameters
allows fast skip over disabled subgroups. This removes a long delay
with param download on a MatekF405-STD where the final parameters
associated with the OSD took 80ms to fetch, causing a long loop delay
2021-01-26 10:43:09 +11:00
Andrew Tridgell 4d58bcb321 AP_Param: support restoring from parameter backup region
if header on primary parameter storage is corrupt then restore from
backup
2021-01-16 06:47:10 +11:00
Peter Barker 840c386a33 AP_Param: add _FLAG to AP_PARAM_NO_SHIFT
Just for consistency with the other flags
2020-12-16 19:30:29 +11:00
Andrew Tridgell 084b589f3a AP_Param: added template class AP_Enum for enum AP_Int8 values 2020-12-02 18:33:07 +11:00
Tom Pittenger 150b8653a4 Revert "AP_Param: add set_and_save_and_notify()"
This reverts commit 96a2aa485a.
2020-10-07 19:11:38 +11:00
Tom Pittenger 96a2aa485a AP_Param: add set_and_save_and_notify() 2020-09-15 13:09:50 -07:00
Andy Piper 7aa98d55eb AP_Param: expose the stable key for use by AP_OSD
add support for finding parameters by name and returning the token
2020-09-09 20:36:42 +10:00
bugobliterator c6e45dd536 AP_Param: add set_and_save_ifchanged for Vector3f params 2020-09-02 17:06:05 +10:00
Randy Mackay a66893a295 AP_Param: minor spelling fix 2020-08-10 19:26:20 +10:00
Andrew Tridgell db0d3c5e89 AP_Param: fixed race in param count handling 2020-04-29 07:36:55 +10:00
Andrew Tridgell 766fb32292 AP_Param: added set_enable() API
used to set value of an enable parameter, clearing count cache
2020-04-29 07:36:55 +10:00
Andrew Tridgell 456b685779 AP_Param: make type_size() public 2020-04-29 07:36:55 +10:00
Andrew Tridgell bb87da628e AP_Param: fixed build warning 2020-04-28 10:32:23 +10:00
Andrew Tridgell 8d1bf46dab AP_Param: use smaller param area for all 1M flash boards 2020-03-28 15:28:03 +11:00
Nick Exton 741abaf760 AP_Param: Add static assert on NVM struct sizes 2020-03-14 13:47:25 +11:00
Siddharth Purohit 1d2985e967 AP_Param: add method to find key of top level group variable by pointer 2020-02-19 13:59:53 +09:00
Peter Hall 5164eacc4a AP_Param: add get and set functions 2020-02-18 10:18:12 +11:00
Peter Hall 623c1aa3cd AP_Param: add singleton 2020-02-18 10:18:12 +11:00
Peter Hall 1ee14ffa75 AP_Param: use thread safe object buffer 2020-02-12 07:05:05 +11:00
Andrew Tridgell aa3642d9de AP_Param: save 7k flash for HAL_MINIMIZE_FEATURES boards 2020-02-01 06:58:43 +11:00
Michael du Breuil 1f20cc10f8 AP_Param: Fix failing to invalidate the cached parameter count
This would cause a GCS to download fewer then the requested number of
parameters
2020-01-15 14:02:59 +11:00
Andrew Tridgell 7ef86c9bb1 AP_Param: added convert_parameter_width()
this allows for easy conversion of the width of a parameter without
changing indexes
2020-01-14 14:23:11 +11:00
Andrew Tridgell 6573857a90 AP_Param: support @READONLY marker in param files
allows for read-only parameters embedded in firmware
2019-09-12 10:50:30 +10:00
Peter Barker b493805fb4 AP_Param: methods to provide amount of parameter space used
AP_Param: provide method for storage size
2019-08-28 11:51:09 +10:00
Andrew Tridgell f897eae89d AP_Param: enable reduced size support for AP_Periph 2019-08-27 10:29:56 +10:00
Peter Barker 2049e86dda AP_Param: optionally return parameter flags in AP_Param::find(...) 2019-08-22 09:23:56 +10:00
Peter Barker 70daf0010b AP_Param: add param flag bit indicating internal-use-only 2019-08-22 09:23:56 +10:00
Michael du Breuil 40753ab14e AP_Param: Remove non functional AP_Param ignore flags 2019-06-11 10:28:45 +10:00
Randy Mackay 2ccb9061d9 AP_Param: minor format fixes 2018-12-06 12:23:41 +09:00
Randy Mackay 98cd300885 AP_Param: add set_defaults_from_table 2018-12-06 12:23:41 +09:00
Andrew Tridgell 4d662a913a AP_Param: use background parameter save
this moves both the storage scan and the save code out of the main
thread and into the IO thread. It means that if we have more than 30
parameters saves in very rapid succession while armed that we can lose
parameter changes, but that is extremely unlikely.

This fixes an issue where parameter saves in flight can cause
considerable scheduling problems, sometimes several milliseconds
2018-08-16 12:40:10 +10:00
Lucas De Marchi 1a45aa12f5 AP_Param: warn on last pass only about unknown parameters
Do not warn about unknown parameters on the first pass, i.e. when
AP_Param:load_all() is called. This is because we may still not know
about dynamically loaded parameters. When we call the second (last)
time, we expect to already know all possible parameters, so print a
warning to both console and the debug terminal.
2018-06-28 10:18:19 -07:00
Lucas De Marchi 7f0d5ddf21 AP_Param: stop panic()'ing on unknown parameters
Our track record on keeping parameters up to date with master is not
great and panic()'ing when loading them apparently is not helping
because every and each vehicle has a different file.

On aerofc load_defaults_file() is used in the same way as
load_embedded_param_defaults() is in which the panic() behavior has been
previously removed.

This finishes the removal of the panic param and add warnings to the
debug console when reading the parameters (rather than when counting
them).
2018-06-28 10:18:19 -07:00
Andrew Tridgell c6c5603382 AP_Param: added back key dumping code
this is essential for working out conversion tables.
2018-01-24 18:23:59 +11:00
Michael du Breuil a1a5665213 AP_Param: Support marking a param group as ignoring the enable flag 2018-01-17 22:21:55 +00:00
Andrew Tridgell 4ac49483c8 AP_Param: added support for embedded parameters
use a block of flash to hold embedded parameters that can be changed
using apj_tool.py
2017-12-18 11:14:59 +11:00
Jacob Walser d5896287b7 AP_Param: Add set_by_name and set_and_save_by_name helpers 2017-10-25 21:07:09 +11:00
Peter Barker e3599ab4f9 AP_Param: remove CLI 2017-08-14 10:23:50 +09:00
Andrew Tridgell 7e24be95c9 AP_Param: added macro for var table extension in object 2017-05-03 20:12:04 +10:00
Andrew Tridgell 47803e73e4 AP_Param: allow for dynamic var_info tables
this allows the var_info entry in a table to be a constant pointer,
allowing the selection of a type for a parameter class at runtime.
2017-03-25 16:22:10 +11:00
Peter Barker c93942695f AP_Param: load parameters from a comma-separated-list
This patch will break things for anyone who is using
a comma in their filenames for their ardupilot defaults
files.
2017-02-23 22:46:33 -08:00
Peter Barker fe189fefbc AP_Param: Factor load_defaults_file (NFC) 2017-02-23 22:46:33 -08:00
Andrew Tridgell 79b0c856b2 AP_Param: added support for frame specific parameters
this allows for libraries that have parameters that are only activated
on particular frame types
2017-02-14 19:49:29 +11:00
Lucas De Marchi 85eadca7ad AP_Param: shut up float comparison warning
We want to compare the value previously set in memory.
2017-02-06 09:27:22 -08:00
Andrew Tridgell 4687785185 AP_Param: fixed a bug in default file handling
this fixes a bug in how default file values are handled that affects
any common sub-objects. When we had a default value for something like
SERVO12_FUNCTION then configured_in_defaults_file() would return true
for SERVO1_FUNCTION as it shares a common default value pointer

this changes the implementation to use the object pointer instead
2017-01-24 09:50:25 +11:00
Peter Barker a481e52861 AP_Param: make configured() const 2017-01-20 13:02:53 +09:00