18 Commits

Author SHA1 Message Date
Thomas Debrunner
fd267fb9a5 param save: Add a blocking API for param saves to be used from shell. 2023-06-21 08:19:52 +02: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
20d3e6f4e1 parameters: add simple BSON verification pass after export 2021-12-27 09:17:00 -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
0614789db3 tests: add simple parameter custom default testing 2021-02-12 08:27:47 -05: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
Daniel Agar
1c4e854f93 cmake don't build param "c" files and remove param defines
- these aren't actual source code
2019-11-11 10:25:42 -05: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
184aa2861a PX4_ISFINITE use builtin everywhere 2019-02-21 14:56:08 -05:00
mcsauder
9d67bbc328 Standardized/updated copyright file headers in the src/systemcmds/tests/ directory. 2019-01-30 14:25:18 -05:00
Daniel Agar
2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Mara Bos
e9fb17c51a Always use FILE* for standard output.
The threads running commands for clients through the Posix daemon used
to write to a char buffer through snprintf (etc.) which was then written
directly to the file descriptor, whereas in the other case printf
(etc.) was used to write to stdout (FILE*). Both versions used some
macro's and repeated code to have the same output.

This change unifies these two cases by using a FILE* in both cases. The
(line) buffering is done by the standard C library's implementation
(just like with stdout), and px4_log.c now uses the same code in all
cases (using fprintf, etc.) for printing (colored) output.
2018-11-23 12:15:41 +01:00
Daniel Agar
ad321c8824 parameters test save restored parameters when finished 2018-08-30 11:29:39 -04:00
Beat Küng
c0cac0594e file paths: add PX4_STORAGEDIR & use it where appropriate 2018-08-08 21:09:39 +02:00
Daniel Agar
59fd22be1b parameters import/export test 2018-01-30 09:17:56 -05:00
Daniel Agar
a02caff1bc unit_test inline implementation and remove module build 2017-08-23 08:06:55 +02:00
Daniel Agar
4937449890 move parameter unittest into systemcmds 2017-06-12 12:18:53 -04:00