19 Commits

Author SHA1 Message Date
Daniel Agar
f2cd7667dc systemcmds/bsondump: new command line utility (extracted from parameters) 2022-12-21 10:14:00 -05:00
Ville Juven
59e86c490d Remove include <log.h> from defines.h
The reason for this is that log.h includes drv_hrt.h which sucks in
half the project's include files with it, which causes strange build
issues
2022-09-29 07:56:24 +02:00
Daniel Agar
80ef6e19df tinybson: explicitly append int32 or int64 2022-01-02 10:46:34 -05:00
Daniel Agar
9cbb5c9920 parameters: fix export shutdown locking
- in NuttX bchlib keeps a sector sized buffer that might not be written
out to RAMTRON until the file is closed
2022-01-02 10:46:34 -05:00
Daniel Agar
3f3836afa8 parameters: simplify import mark_unsaved and don't fail bson decode unnecessarily 2021-12-24 14:32:40 -05:00
Daniel Agar
38731662c6 parameters use bitset for mark_unsaved 2021-12-24 14:32:40 -05:00
Daniel Agar
7560d45c61 parameters: import tolerate unhanlded BSON types 2021-12-06 09:37:08 -05:00
Daniel Agar
1af068179e parameters: tinybson print errors and count imported types 2021-12-06 09:37:08 -05:00
Daniel Agar
684424bf73 parameters: delete unused BSON_BINDATA handling 2021-03-09 19:29:42 -05:00
Daniel Agar
711a69854b uthash: move remaining utarray usage to parameters and delete unused
- this is to discourage further use until utarray can be dropped entirely
2021-02-20 11:28:22 +01:00
Beat Küng
3e9692c5bd param_import: add mark_saved argument
Behavior of the 'param import' command:
- if no file provided, parameters are marked as saved (differs from before)
- if a file is provided: parameters are not marked as saved
2020-10-12 15:22:26 +02:00
Beat Küng
f6e8ddfaa0 param_export: add optional filter method 2020-10-12 15:22:26 +02:00
Daniel Agar
0e64baa93b parameters: delete unused PARAM_TYPE_STRUCT 2020-08-25 09:59:29 -04:00
Beat Küng
dfb5b5d7d9
fix param import transition
* fix param import transition for MC_DTERM_CUTOFF

The previous implementation did not work, as there was a check for
param_find_no_notification() returning PARAM_INVALID for IMU_DGYRO_CUTOFF,
and therefore would not call param_modify_on_import().

This moves param_modify_on_import() before the check and makes it modify
the bson node directly.

* parameters: fix param import transition when testing is enabled

BUILD_TESTING is used for unit test builds, PX4_TESTING is used to enable additional test material within PX4

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-04-02 18:41:00 -04:00
Beat Küng
b54e5a1c23 param: automatically update calibration ID params on import
This avoids the need for recalibration, and also cleans up other driver
ID's (merge separate accel/gyro).

The SPI address was previously set to a board-specific (arbitrary) value,
and is now set to 0. This will allow extending for multiple sensors of the
same type on the same bus.
2020-03-10 10:11:43 -04:00
Beat Küng
3198610f85 src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.

command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done

Transitional headers for submodules are added (px4_{defines,log,time}.h)
2019-10-30 11:48:47 +01:00
Daniel Agar
2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Beat Küng
5b4a77a67b params: add possibility to access files if flash-based params are enabled
- the flash-backend is selected by specifying nullptr as file or -1 as fd
- the default file is nullptr, and thus the FLASH
- 'param select' has no effect, FLASH is always the default

Thus there should be no functional change to existing setups.
2018-12-23 15:49:37 -05:00
Daniel Agar
060463e8a7
parameters lib convert to c++ (#10267) 2018-09-04 09:18:28 -04:00