Commit Graph

28 Commits

Author SHA1 Message Date
Ramon Roche
9d6a648a07 fix(kconfig): surface generator errors from loadconfig
ensure_env() sent the child's stdout to DEVNULL to keep this process's stdout
parseable, but the generator reports missing imports with print(), so that was
exactly the output being discarded. What survived was a CalledProcessError
whose message repeats the argv, and the argv carries every .msg path: 9901
bytes on one line, naming no cause and no remedy.

Capture both streams and, on failure, exit with the child's own output. The
message names the command that failed and its exit code rather than asserting
what kind of failure it was, so it stays accurate whatever the child is or why
it failed. Missing empy now reports 167 bytes:

  loadconfig: px_generate_zenoh_topic_files.py failed (exit 1)
  Failed to import em: No module named 'em'

  You may need to install it using:
      pip3 install --user empy

stdout stays clean on success, so callers that parse it are unaffected.

Smoke tested on Ubuntu 24.04, matching the runner base: happy path returns
valid JSON for --group and --group --seeders; missing empy and missing
pyros-genmsg each report the cause and remedy; an unrunnable generator reports
the interpreter's own "can't open file"; a child exiting non-zero with no
output reports "(no output)" rather than an empty message; and a preset
ZENOH_KCONFIG_TOPICS still skips the generator entirely.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-08-20 12:11:15 -07:00
Ramon Roche
1fa6012d5d fix(kconfig): fail when kconfig discards an assignment
A .px4board line whose value does not fit its symbol's type is not an error to
kconfiglib. It warns, drops the assignment, and leaves the symbol at its
default, so the loaded config quietly differs from the file and no consumer
downstream can tell. corvon 743v2 built with the wrong UAVCAN interface count
this way, and the only trace was a warning in a job that exited 0.

load_target_config() now compares kconf.warnings before and after the load and
exits on any "assignment ignored", naming the file and quoting the warning.

Checked against the whole tree: 293 targets load with none rejected, so this
does not fail existing boards. Reintroducing the quoted value makes it exit 1
with the file path and the reason.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-08-20 12:10:30 -07:00
Ramon Roche
eba76cbb69 fix(ci): restore board target matrix generation after zenoh Kconfig change
Since b11e615810 src/modules/zenoh/Kconfig sources the generated topic
catalog through ZENOH_KCONFIG_TOPICS, which only cmake exports, so every
standalone Kconfig parse crashed and build_all_targets produced an empty
build matrix on every run while the scan job still reported success.

Add Tools/kconfig/loadconfig.py as the single entry point for parsing
the Kconfig tree outside cmake: it generates the topic catalog exactly
like cmake/kconfig.cmake and provides shared board/target enumeration
and config loading. Port generate_board_targets_json.py (CI matrix) and
updateconfig.py (make updateconfig) to it; both were independently
broken and each reimplemented board scanning on its own.

Harden the workflow so the next failure of this class is loud: run the
generator as a standalone assignment, so bash -e fails the step (the
previous echo "matrix=$(...)" form masked the exit code), and write
the JSON outputs through the heredoc GITHUB_OUTPUT form.

Matrix output verified byte-identical to the pre-b11e6158101 baseline
in all three modes; updateconfig output verified identical against the
same baseline.

Assisted-by: Claude:claude-fable-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-07-20 20:24:10 -04:00
Phil-Engljaehringer
f2eecc33f7 feat(drivers): implemented serial passthrough (#27605)
* feat: implemented serial passthrough

* fix: used make format

* fix: changed function order to match other drivers

* fix: moved passthrough from systemcmds to drivers

* fix: renamed BITBANG_TIMER to UART_BITBANG_TIMER

* fix: used make format

* feat: added PASSTHRU_EN guard to start of dshot&pwm_out

* fix: made changing ESC channels more stable

* fix: adjusted naming of guards

* fix: changed include guard of bitbang

* fix: removed unused variable SER_PASS_BAUD

* fix: adjusted comments

* fix: adjusted print_usage() to match other drivers

* fix: remove bitbang_write_byte from public API and some buffer guard

* fix: added Serialpassthrough&Bitbang to exclude list of allyesconfig.py

* fix: added missing flag to print_usage()
2026-06-12 18:27:26 +02:00
Julian Oes
110be82e7d fix(Tools): add clarifying comment (#27403)
It wasn't clear to me why this merge_config.py was required. It is now
clear, so let me leave a comment.
2026-05-20 14:06:11 -06:00
Michael Fritsche
0932ad144b feat(drivers): add support for hiwonder 4 channel encoder motor module (#27229)
* driver: hiwonder encoder motor module

* fix(drivers): Change HiwonderEMM from CRTP API to non-template ModuleBase

* fix(drivers): exclude hiwonder_emm driver from sitl build, as it fails i2c dependencies

* feat(drivers, hiwonder4channel): add parameter update subsciption

* feat(drivers, hiwonder4channel): add requested changes of original PR

* fix(drivers, hiwonder4channel): add default in hiwonder_emm module.yaml

* fix(drivers, hiwonder4channel): formatting

* fix(drivers, hiwonder4channel): add the hiwonder driver to all px4board s that include the roboclaw driver

* cleanup(drivers, hiwonder4channel): update copyright year

* chore(drivers): move hiwonder driver startup call from rc.board_sensors to rc.rover

* chore(drivers): hiwonder 4 channel - improve HIWONDER_EMM_EN description

* chore(drivers): hiwonder4channel - move to int8 for internal speed values

* chore(drivers): hiwonder4channel - move unconfigurable value to initialization.

* chore(drivers): hiwonder4channel - add reboot_required to enable parameter

* chore(drivers): hiwonder4channel - add docs

---------

Co-authored-by: chfriedrich98 <chfriedrich@student.ethz.ch>
2026-05-13 15:09:39 +02:00
Valentin Bugrov
7ac1cbd719 feat(allyes): Remove redundant filters from exception_list_sitl 2026-04-24 15:37:25 -07:00
Pedro Roque
6474e5d7c1 feat: configurable board pwm freq from Kconfig (#24787)
* feat: configurable board pwm freq from Kconfig

* feat: add board_pwm_config to submenu

* fix: define sequence correction

* fix: revert Tools/simulation/gz

* fix: track upstream gz

* fix: track upstream mavlink

* feat: adjustable pwm for multiple board types

* feat: add conditional check for CONFIG_ for correct fallback

* add: spacecraft board with correct BOARD_PWM_FREQ supporting 10Hz actuation rate

* fix: set dependencies for submenu arch chips

* fix: keep only upper arch level

* fix: proper checking - still not showing up for board config

* feat: add hidden kconfig for platforms

* Merge Nuttx config into px4board

Allows to expose nuttx into PX4 if needed

* Kconfig: Include nuttx symbols in updateconfig

Only if applicable i.e. defined in the kconfig

* fix: merged config with previously generated boardconfig

* doc: updated code comment

---------

Co-authored-by: Daniel Agar <daniel@agar.ca>
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-07-23 08:23:13 -07:00
Alexander Lerach
2356cb973f Performance & testing targets
* Added minimal configs for performance testing

* Rename recovery to performance

* added mfg_cfg

* fix params & don't inherit from default

* rename performance -> performance-test

---------

Co-authored-by: Igor-Misic <igy1000mb@gmail.com>
2025-02-24 16:02:46 +01:00
Pedro Roque
e7e76e2e21 Spacecraft build and bare control allocator (#24221) 2025-02-06 23:54:24 -05:00
Matthias Grob
077ade4f8f Add IO timer channel mode for RPM and also sync up rpi configuration to work with all these drivers 2024-12-19 07:30:25 +01:00
Peter van der Perk
a9ba0acb2a cmake: all allyes target for better CI coverage
Currently only v6x-rt and SITL are supported
But targets with label allyes will try to enable all kconfig symbols
2024-04-01 22:05:20 -04:00
Daniel Agar
db4e09d529 Tools/kconfig: delete old migration helpers
- people are updating this without really understanding the purpose,
and it's generally no longer useful
2022-06-17 19:31:45 -04:00
Daniel Mesham
06a9be74fa microdds: add xrce client 2022-03-22 09:01:05 +01:00
Julian Oes
490a0c473b Rename vmount to gimbal 2022-02-07 19:21:15 -05:00
Daniel Agar
d077ca15fb delete PWM_SERVO_SET, PWM_SERVO_SET_MODE, systemcmds/motor_ramp, and pwm_out test 2022-01-10 09:51:11 -05:00
Daniel Agar
df44df2df6 delete systemcmds/esc_calib
- this is redundant with commander esc_calibration
2022-01-10 09:51:11 -05:00
Igor Mišić
0f60e7debf pps_capture: add kconfig 2021-12-17 07:56:08 +01:00
Peter van der Perk
c6f249f7f1 Kconfig merge_config only set to 'n' when BOOL
Run make updateconfig to fix delta's of derived configs
2021-11-02 09:34:21 -04:00
Peter van der Perk
51abb804ac UAVCANv1 Fix NodeClient header and Kconfig merge logic 2021-10-27 10:07:01 -04:00
Peter van der Perk
b3e799e277 [Kconfig] Add all distance sensors 2021-10-07 10:09:01 -04:00
Peter van der Perk
21e6547ac7 [Kconfig] Toolchain & platform fixes, SITL still broken 2021-10-07 10:09:01 -04:00
Peter van der Perk
0400c24af5 [Kconfig] 17-08-21 rebase fixes 2021-10-07 10:09:01 -04:00
Peter van der Perk
c2ad07b983 [Kconfig] Don't inherit kconfig when bootloader (and canbootloader) 2021-10-07 10:09:01 -04:00
Peter van der Perk
6af0477733 [Kconfig] Gnerate px4board from old cmake
Added make updateconfig to update all config when default's have changed
Added cmake to px4board conversion script
2021-10-07 10:09:01 -04:00
Peter van der Perk
815617e670 Added common options for sensor drivers
uavcan_board_identity check for existance
Added kconfig for compiler definitions
2021-10-07 10:09:01 -04:00
Peter van der Perk
82888d3320 [Kconfig] Merge/diff fixes and added some FMUv5 targets 2021-10-07 10:09:01 -04:00
Peter van der Perk
ea393b54d9 [Kconfig] non-default labels config inherit default.px4board config 2021-10-07 10:09:01 -04:00