16 Commits

Author SHA1 Message Date
jmackay2
5b66a1eff1 Fix generate component regex escape sequence 2024-11-19 09:31:11 +01:00
Matthias Grob
4c0b6dbe86 Remove trailing whitespaces and trailing duplicate newlines 2023-12-01 13:11:00 -05:00
Beat Küng
22c94f805a component information: add translation support 2023-03-20 21:57:25 -04:00
Beat Küng
dafead6f20 logger: add compressed events metadata file if it exists in the ROMFS
Allows to decode events not (yet) on main.
The file is currently ~15KB.
2022-10-05 07:44:55 +02:00
Beat Küng
02035d94aa metadata: sort json output
ensures the files don't change arbitrarily
2022-10-05 07:44:55 +02:00
Beat Küng
9a9aad98a1 mavlink: add COMPONENT_METADATA message
And still support the previous message COMPONENT_INFORMATION for now.
2022-04-14 09:55:06 -04:00
Beat Küng
b94c5db55d component_information: add actuators json generation & CI deployment 2021-11-23 12:40:22 -05:00
mcsauder
21163d859e Whitespace cleanup. 2021-10-19 13:29:26 -04:00
Beat Küng
d8214f5e00 component_information: merge extra component_information_header target
With Makefile build, generate_component_general.py was called twice during
build, which did not happen with the ninja build.

This created a race condition with the following error in rare cases:
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1

Merging the targets avoids the duplicate execution.
2021-08-25 10:04:39 -04:00
Beat Küng
af53b60713 Revert "component_information: add debug instrumentation for FileNotFoundError exception"
This reverts commit ca454c93d163a551f7f24baac41a3b29538860ae.
2021-08-25 10:04:39 -04:00
Beat Küng
ca454c93d1 component_information: add debug instrumentation for FileNotFoundError exception
The following exception occurs in some rare cases (but only with make build: NO_NINJA_BUILD=1 px4_sitl_default):
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1
2021-08-03 10:36:25 +02:00
Beat Küng
38f3b8d356 mavlink & system: add events interface
- sending protocol
- uorb event message & template methods for argument packing
- libevents submodule to send common events and handle json files
- cmake maintains a list of all (PX4) source files for the current build
  (PX4 modules + libs), which is used to extract event metadata and
  generate a json file
2021-07-07 21:38:09 -04:00
Beat Küng
2219e096d7 cmake: embed param metadata if not CONSTRAINED_FLASH and not "test" LABEL 2021-04-15 08:16:51 +02:00
Beat Küng
6a7688cbca component_information: rework to reflect mavlink message changes 2021-03-30 08:18:49 +02:00
Beat Küng
5a1c60b5a1 component_information: switch from gzip to xz
Improves compression, e.g. current params file: 62KB to 51KB

There's also a PRESET_EXTREME option, which reduces by another 2KB.
We can revisit that once needed, as it increases mem usage as well.
2021-02-09 09:44:50 +01:00
Beat Küng
1f8e7de824 mavlink: implement COMPONENT_INFORMATION
- implement COMP_METADATA_TYPE_VERSION & add component_version.json.gz to
  ROMFS for all targets.
- implement COMP_METADATA_TYPE_PARAMETER (only enabled for SITL currently)
2021-02-09 09:44:50 +01:00