Commit Graph
29 Commits
Author SHA1 Message Date
Benjamin CabéandJacob Dahl 026e64b241 refactor(safety_button): use board macros for the button and LED (#29226)
* refactor(safety_button): use board macros for the button and LED

The driver read the safety button and wrote the safety LED as the GPIO pinsets GPIO_BTN_SAFETY and GPIO_LED_SAFETY of board_config.h, the LED active low. A board can now define BOARD_SAFETY_BUTTON(), true while the button is pressed, and BOARD_SAFETY_LED(on_true) instead, as the FIXMEs next to these GPIOs in the board_config.h of FMU-v5, FMU-v6X, FMU-v6XRT and 26 other boards suggest, for a button and an LED that aren't GPIO pinsets or whose polarity differs. The macros default to the GPIOs, so that the existing boards are unchanged.

Assisted-by: Claude:opus-5.5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>

* refactor(boards): drop the safety button and LED FIXMEs

The safety_button driver now takes either the GPIO pinsets or the
BOARD_SAFETY_BUTTON()/BOARD_SAFETY_LED() macros, so the GPIO
definitions are no longer something to replace.

Assisted-by: Claude:claude-opus-5-5

---------

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-10-29 18:34:36 -06:00
Marin Doetterer a7d8b8f263 fix(boards): set NET_ETH_PKTSIZE to 1514 for a 1500 byte MTU
CONFIG_NET_ETH_PKTSIZE includes the 14 byte Ethernet header but not the
    4 byte FCS, so the IP MTU is PKTSIZE - 14. With 1518 the MTU was 1504,
    larger than the 1500 bytes defined by RFC 894.

      ETH header | IP packet (IP | UDP/TCP | payload)
      14         | 1500

    On the STM32H7 and STM32F7 Ethernet drivers the RX buffer stays 1536
    bytes, so full-size frames incl. FCS still fit. ESP32 (Wi-Fi only) uses
    the value only for its TX buffer.

    Applied to all STM32H7, STM32F7 and ESP32 boards.
    i.MX RT (ENET MAX_FL) and S32K3 (RX DMA buffer size) boards are left at 1518,
    since there the value also sets hardware limits and 1514 would reject or
    truncate full-size frames.

    Signed-off-by: Marin Doetterer <marin@auterion.com>
    Assisted-by: Claude Opus 5.5
2026-10-29 17:19:57 +01:00
bab8fade6b feat(driver): Murata/SCH16T-K10 IMU with external FIFO driver (#26675)
* feat(driver): Murata/SCH16T-K10 IMU with external FIFO driver,and update X6 Ultra flight controller

Assisted-by: Codex

* fix(drivers/zeroone_sch16t): remove invalid SPI6 reset call

The driver already requests a software reset. The board-specific SPI6
reset call references an undeclared variable and breaks builds on boards
that define SPI6_RESET, including ark_fmu-v6xrt_allyes.

Assisted-by: Codex
Signed-off-by: Sharanie0612 <sharanie0612w@gmail.com>

---------

Signed-off-by: Sharanie0612 <sharanie0612w@gmail.com>
Co-authored-by: seguall_4 <916213716@qq.com>
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: Sharanie0612 <sharanie0612w@gmail.com>
2026-10-28 09:34:09 +01:00
Jacob Dahl 3f6fe0e40c refactor(uavcan): base the libuavcan clock on HRT instead of a dedicated timer (#28569)
* refactor(uavcan): base the libuavcan clock on HRT instead of a dedicated timer

The stm32, stm32h7 and kinetis drivers each ran a 16-bit hardware timer
with a software overflow extension, a second copy of what HRT provides,
and slewed UTC by patching that accumulator from the timer interrupt.
Every CAN board paid a general-purpose timer for it, and the bus time
base led HRT by the timer phase at seeding even when the FC is the sync
master.

Monotonic time is now hrt_absolute_time() and UTC is HRT plus an offset
that time sync moves. Each adjustment is applied directly; the rate PID
and its lock accessors had no callers, and at the sub-100 us errors sync
produces after convergence a 1 Hz offset correction bounds the error to
crystal drift over one second. The timer number plumbing and the
BOARD_UAVCAN_TIMER_OVERRIDE option go with it.

* refactor(uavcan): drop the vestigial clock::init and the timer enables it left behind

With the hardware timer gone, init() only set a flag, so the flag is set
where the singleton is constructed. The three boards that enabled their
override timer in defconfig alongside the override no longer need it.
2026-09-08 20:12:29 -06:00
Peter van der Perk 4890d11de8 feat(boards): upgrade NuttX to 12.12.0
boards: Disable MMC_IOC_CMD ioctl

NuttX default is Y, but it's not used

boards: Fix meminfo/free

boards: fix libc float setting

boards: Reduce flash usage

Using strerr short mode
Don't cache DNS entries (also saves some ram)

fix(boards): kakutef7 disable optical flow ekf2 to save flash

kakutef7 overflows with nuttx 12.12.0 also it doesn't have optical
flow drivers anyhow. Thus disable ekf2 optical flow
2026-09-03 12:31:07 -07:00
Jacob Dahl c9f5442402 feat(sensors): classify sensors independently of bus topology (#28352)
* feat(sensors): decouple sensor internal/external classification from the bus

A sensor's internal/external classification was derived from its bus
(px4_i2c_bus_external / px4_spi_bus_external), but a bus is a wire: one bus
routinely serves both chips soldered on the FC and a pinned-out connector, and
any onboard sensor on such a shared bus was classified external. That hands an
onboard mag an operator-settable rotation instead of the board rotation, feeds
an onboard baro's self-heated die temperature into air density as if it were
ambient, and inverts the 75/50 default priority. FMU-v6C and AirBrainH743
worked around it with hand-rolled device_id whitelists behind
BOARD_OVERRIDE_I2C_DEVICE_EXTERNAL; FMU-v6XRT's second onboard baro was simply
misclassified.

Classify the device instead of the bus: drivers publish is_external in
sensor_accel/gyro/mag/baro, derived from the device id by default and
overridden by the new -O start flag ("onboard") for onboard sensors that share
a bus with an external connector. -I/-X stay pure bus probe filters.

The question "is this sensor external" had four answers. It now has one, with
a single override point:

  -O -> I2CSPIDriverConfig::external -> Device::set_external() and the
        PX4* wrappers -> is_external in the sensor topic

px4_i2c_device_external() was px4_i2c_bus_external() with a device id decode in
front, and calibration::DeviceExternal() forwarded to device_is_external();
both are gone. Device::external() stops being a bus query: it is non-virtual,
defaults to device_is_external(), and takes the declared value through
set_external(), so the five I2C/SPI overrides that used to answer it from the
bus are deleted and cannot diverge again. device::I2C and device::SPI set it
from the config, so every driver built on the bus framework follows -O without
doing anything. px4_i2c_bus_external() and px4_spi_bus_external() survive as
what they honestly are - bus predicates - reachable only through the fallback.

-O is opt-in per driver (BusCLIArguments::support_onboard), the same way -k is:
a flag that every driver advertised but only a handful honoured would be a
silent no-op on the rest. This also drops the special case for the mcp23009 and
mcp23017 GPIO expanders, which use -O for their output state and simply do not
opt in.

sensor_gyro_fifo carries is_external too. VehicleAngularVelocity prefers the
FIFO topic for any IMU that publishes one, so without it the rate controller
would take its rotation from the bus while VehicleIMU took it from the topic -
the same chip, two classifications.

The BOARD_OVERRIDE_I2C_DEVICE_EXTERNAL hook is removed along with both board
implementations, replaced by -O on the affected rc.board_sensors lines.
FMU-v5x, MR-CANHUBK3, KakuteF7, NXT-Dual and MicoAir H743-Lite each start an
onboard barometer on an external bus and get the flag as well.

Assisted-by: Claude:claude-fable-5, Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* feat(sensors): treat shared buses as first-class topology

A boolean internal/external flag cannot describe a bus that carries both
hard-mounted chips and a connector. -O was an opt-in override for that
case, so most drivers silently ignored it and classification still
followed the bus.

Declare Internal / External / Shared on the bus, probe External and
Shared, and classify each sensor from -I/-s vs -X/-S.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(ci): drop stale ITCM symbols and clang-tidy errors

ITCM lists still named calibration::DeviceExternal and
px4_spi_bus_external after both were removed. The host test stubs
forwarded varargs in a way the analyzer rejected, and stripped I2C
headers kept extra trailing newlines.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(sensors): inline device_is_external into the header

Reaching it through drivers__device pulled the kernel-only library into
the userspace image of a protected build; giving it a library of its own
put an archive referencing px4_i2c_buses/px4_spi_buses after the board
library that defines them. Inlining sidesteps both.

* fix(sensors): compile tcbp001ta and probe canhubk3 GPS mag

tcbp001ta is not an I2CSPIDriver, so config.external does not exist; it
only ever starts on internal SPI. -X on canhubk3 I2C2 never ran because
that bus is Internal.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-28 21:14:13 -06:00
Jacob Dahl 55bb62c2c7 refactor(sensors)!: replace SENS_INT_BARO_EN with CAL_BAROn_PRIO (#28351)
* refactor(sensors)!: replace SENS_INT_BARO_EN with CAL_BAROn_PRIO

SENS_INT_BARO_EN gated driver startup, so disabling the internal barometer
also stopped it being logged, and every board had to reimplement the check in
its rc.board_sensors - most never did. CAL_BAROn_PRIO already selects
barometers per device_id, so use it instead: 0 now means the driver runs and
the data is logged, corrected and voter-tracked, but the sensor is never
selected, never used as a failover, and never blocks arming.

Disabling a barometer that way was previously only partly effective. The voter
could still pick a priority-0 sensor when it was the only one with data, fault
demotion could raise a disabled sensor's priority back to 1, and the clamp in
ParametersUpdate() could not reach 0 at all once a sensor had been demoted.

Excluding a sensor from selection must not stop it being evaluated:
DataValidator::confidence() is the only thing that maintains the error state
every sensor reports, so a priority-0 sensor is still scored, just never
chosen. Handing over from a sensor the operator disabled is likewise not a
failover, and is no longer counted as one.

The arming check follows the magnetometer's shape: the barometer actually in
use has to be healthy, as does any the estimator is fusing, but the spares do
not. Having no enabled barometer, or none the voter can select, each reports
its own failure.

A disabled barometer now also receives the relative and GNSS offsets, which is
what makes its logged data directly comparable to the primary.

Users who had SENS_INT_BARO_EN=0 lose the setting on upgrade: the calibration
slot depends on enumeration order and is not knowable at import time. The
internal barometer returns as a failover only, since external barometers
default to priority 75 against 50.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* test(sensors): run the data validator tests in CI

The DataValidator tests still included <validation/data_validator.h>, a path
that stopped existing when the library moved out of ecl, and their CMakeLists
was never added to any build - so nothing had compiled them, let alone run
them, for years.

Port them to gtest and register them with px4_add_unit_gtest so they run with
the rest of the unit tests. Coverage is unchanged apart from replacing rand()
with a fixed sequence, so a failure reproduces, and adding the priority-0
cases: a disabled sensor is never selected even when it is the only one with
data, it still reports its own error state, and handing over from one is not
a failover.

DataValidator is otherwise a leaf library, but print() reaches for the logging
macros and the high-resolution timer, which would drag uORB, the work queues
and the POSIX daemon into a host test. A small stub translation unit supplies
those three symbols instead.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-28 20:27:18 -06:00
Jacob Dahl d983b6424f refactor(boards): remove dead defines from board_config.h (#28168)
* refactor(boards): remove unused INPUT_CAP* board defines

INPUT_CAP*_TIMER, INPUT_CAP*_CHANNEL and GPIO_INPUT_CAP* have never had a
consumer. They are present as far back as v1.8.0 (then in
src/drivers/boards/px4fmu-v5/board_config.h) and no code outside a
board_config.h has ever read them.

Input capture is configured in the board timer_config.cpp via
initIOTimerChannelCapture() and driven by
platforms/nuttx/.../io_pins/input_capture.c. On ten of these boards the
removed defines restate, in a second notation, exactly the channel
timer_config.cpp already declares -- fmu-v5x described T5C4 on PI0 and
declares initIOTimerChannelCapture({Timer5, Channel4}, {PortI, Pin0}).

Being unread, the duplicates drifted:

  - cuav/7-nano INPUT_CAP4 named GPIO_TIM4_CH1IN_2 on PD12 while its own
    INPUT_CAP4_TIMER said 15; the configured channel is T15C2 on PE6.
  - modalai/fc-v2 and sky-drones/smartap-airlink declare input capture
    pins while configuring no capture channel at all.

New boards kept inheriting the block by copying an existing
board_config.h.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* refactor(boards): remove leftover BOARD_HAS_PWM defines

a8e75d174c ("boards: remove BOARD_HAS_PWM and use
DIRECT_PWM_OUTPUT_CHANNELS") dropped the last consumer in 2021, but the
board_config.h side of that cleanup was never finished and boards added
since have kept copying it in. Every remaining definition is a bare alias
of DIRECT_PWM_OUTPUT_CHANNELS, which is the macro actually read.

mamba-f405-mk2 defined it twice in the same header.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* refactor(boards): remove leftover DIRECT_INPUT_TIMER_CHANNELS defines

c5c80e31b6 ("boards: remove DIRECT_INPUT_TIMER_CHANNELS from
board_config.h") removed the last consumer in 2021. These ten boards
either predate the sweep or were added afterwards by copying a
board_config.h that still carried it.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* refactor(boards): remove unused BOARD_NUMBER_I2C_BUSES defines

Nothing reads BOARD_NUMBER_I2C_BUSES. The bus count actually in use is
PX4_NUMBER_I2C_BUSES, which each architecture sets in its micro_hal.h
(STM32_NI2C, KINETIS_NI2C, or a literal) and a board cannot influence.

The near-miss name is worse than a plain unused define: it reads like the
board is declaring its bus count when the value is inert.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* refactor(boards): remove unused BOARD_DMA_NUM_DSHOT_CHANNELS defines

Nothing reads it. The dshot driver sizes its DMA buffers from
MAX_IO_TIMERS and MAX_NUM_CHANNELS_PER_TIMER, so the accompanying comment
describes a budget the board cannot actually declare.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* refactor(boards/ark): remove dead board_config defines

cannode: the eight GPIO_TIM*_RESET pin configs were never added to
PX4_GPIO_INIT_LIST, unlike the GPIO_I2C1_{SCL,SDA}_RESET pair written
beside them, so nothing ever applied them.

fmu-v6s: ARKV6S_0 is a leftover from copying the fmu-v6x config. fmu-v6x
keys its SPI buses on the FMUM ID via initSPIFmumID(ARKV6X_0, ...), but
fmu-v6s has a single hardware version and uses the plain initSPIBus form,
so the ID is never referenced.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-05 22:26:22 -06:00
Jacob Dahl 1c5db5ff65 refactor(platforms/nuttx): remove dead PX4_I2C_BUS_MTD board define (#28167)
* refactor(platforms/nuttx): remove dead PX4_I2C_BUS_MTD board define

The macro's value has been unused since the MTD manifest refactor
(68ab736b1 "Refactor mtd to make available to board startup"), which made
the board manifest the source of truth for the EEPROM bus and address:
at24xxx_attach() derives the bus from PX4_I2C_DEVID_BUS(instance.devid).
All that survived was a presence check that silently degraded a former
compile-time #error into a runtime failure.

Because the value stopped mattering, it drifted freely. Eleven boards
carry "4,5", which is not even a usable bus number, and several boards
disagree with their own manifest (fmu-v5x declares 4,5 against actual
buses 3 and 4; fmu-v6xrt declares 1 against 3 and 6; 7-nano declares 1
against 4). crazyflie21 defines it with no MTD manifest at all.

Guard at24xxx_attach() on CONFIG_I2C instead, which is the condition the
code actually depends on and matches how the neighbouring ramtron_attach()
guards on CONFIG_MTD_RAMTRON.

Assisted-by: Claude:claude-opus-5[1m]
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* fix(platforms/nuttx): guard at24xxx_attach on CONFIG_MTD

CONFIG_I2C is too broad: nearly every board enables I2C, including those
without MTD. Compiling the real at24xxx_attach body kept the mtd_partition
/ register_mtddriver / ftl_initialize path live, so boards without
CONFIG_MTD failed to link.

CONFIG_MTD is the NuttX flag that actually enables that infrastructure
(and is set on every board with an I2C EEPROM manifest). CONFIG_MTD_AT24XX
is not suitable: only crazyflie sets it; FMU boards use px4_24xxxx_mtd.c
and deliberately omit the NuttX AT24 driver.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-08-05 21:45:29 -06:00
DuoYuWangandJacob Dahl 05be273a35 fix(boards): enable CONFIG_FS_LARGEFILE for NuttX boards with MMC/SD (#28043)
* boards: enable CONFIG_FS_LARGEFILE for NuttX boards with MMC/SD

Without large file support, fsblkcnt_t/off_t are 32-bit and statfs
consumers (procfs /fs/usage, df) compute the volume size as
f_bsize * f_blocks in 32 bits, which wraps at 4GB. Boards with an
SD card or eMMC larger than 4GB report the wrong capacity, e.g. a
32GB SD card on FMU-V6X:

    nsh> ls -l /dev/mmcsd0
     brw-rw-rw-1850212352 /dev/mmcsd0   (= 31914983424 mod 2^32)
    nsh> df -h
      vfat       1749M      240K      1749M /fs/microsd

With CONFIG_FS_LARGEFILE=y the same card reports the full 29G.

This enables the option on the 77 boards that build the MMC/SD block
driver (CONFIG_MMCSD=y, SDIO or SPI). Boards without removable storage
and constrained-flash targets (CONFIG_BOARD_CONSTRAINED_FLASH=y) are
left unchanged.

Note: on the px4_firmware_nuttx-10.3.0+ branch the 64-bit file types
are additionally gated on CONFIG_HAVE_LONG_LONG, which is only defined
via nuttx/compiler.h include order, making the option unreliable. That
gating is fixed by the companion NuttX backport PR
(PX4/NuttX, branch backport-fs-largefile, upstream commit 92b2f1bd3d3).

Tested on a custom STM32H743 board with 8GB eMMC and on FMU-V6X with a
32GB SD card.

* fix(boards): enable CONFIG_FS_LARGEFILE for MMC/SD variant configs

The test/console/stackcheck/socketcan/sysview/cyphal/debug/cryptotest
variant configs of boards covered by the previous commit were missed,
leaving them with 32-bit off_t. fmu-v5 protected is intentionally
excluded: protected-mode syscall proxies keep 32-bit widths.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

* chore(nuttx): bump submodule for FS_LARGEFILE backport

Picks up the backport of upstream NuttX 92b2f1bd3d3, which gates the
64-bit file types on CONFIG_FS_LARGEFILE alone instead of the
include-order-dependent CONFIG_HAVE_LONG_LONG.

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>

---------

Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2026-07-22 19:22:37 -06:00
Julian Oes 225c1b70ef fix(mavlink): require CONFIG_PTHREAD_MUTEX_TYPES for recursive send mutex
The per-channel send mutex is genuinely recursive: callers hold lock_send()
while the MAVLink C library re-enters send_start()/send_finish() on the same
mutex via MAVLINK_START_UART_SEND. On NuttX a recursive mutex only works with
CONFIG_PTHREAD_MUTEX_TYPES; without it pthread_mutexattr_settype() is a no-op
and the nested lock deadlocks. Only a handful of boards happened to enable the
option (for Zenoh), so mavlink could deadlock at startup on most boards, e.g.
when bringing up a USB link.

Enable CONFIG_PTHREAD_MUTEX_TYPES on the NuttX boards that build mavlink, add
a compile-time guard so a board missing the option fails the build loudly
instead of deadlocking silently, and check the settype() return. Enabling the
option is free in flash and RAM on these boards since they already enable
CONFIG_PRIORITY_INHERITANCE / CONFIG_PTHREAD_MUTEX_ROBUST.

Signed-off-by: Julian Oes <julian@oes.ch>
2026-07-06 08:46:35 -07:00
ZeroOne-Aero 02b41f81d9 feat(boards/zeroone): Add IIM42652 and BMP581 support for ZeroOneX6 Series V2 (#27475)
* Add TDK IIM42652 IMU and Bosch BMP581 Baro support for ZeroOneX6 Series V2 board
2026-05-28 18:03:43 -04:00
Julian Oes 1a3d232e7b fix(bootloader): remove broken PROTO_SET_DELAY boot-delay feature (#27081)
The bootloader boot-delay feature has been mechanically broken on
every modern FMU board since the STM32F7/H7 transition. It has three
independent bugs that prevent it from ever working:

1. Offset mismatch: BOOT_DELAY_ADDRESS is hardcoded to 0x1a0, but the
   NuttX vector table is 504 B (F76x) to 664 B (H743) long. The
   linker places _bootdelay_signature at ALIGN(32) past end of
   vectors (e.g. 0x2a0 on CubeOrange), never at 0x1a0. The bootloader
   reads random exception_common pointers in place of the magic and
   never matches BOOT_DELAY_SIGNATURE1/2. Verified on CubeOrange with
   objdump of cubepilot_cubeorange_default.elf.

2. Flash cache never flushes: fc_write() stores arbitrary writes in
   cache line 1 and only flushes on a very specific condition tied
   to the sequential firmware upload flow. A standalone write during
   PROTO_SET_DELAY is cached forever. fc_read() then returns the
   cached value, so the post-write verify lies and the bootloader
   reports success. Nothing ever reaches flash.

3. H7 write granularity: the STM32H7 flash controller requires a
   full 32-byte program cycle per write. Single 32-bit writes from
   flash_func_write_word() would not be accepted by the controller
   even if they reached it.

The feature has been silently dead on every H7/F7 FMU board for
years and no one noticed, which is strong evidence nothing actually
depends on it. Rather than fix it (which would mean rewriting
PROTO_SET_DELAY, the flash cache path, and the H7 flash programming
path), remove it.

Changes:
- bl.c: PROTO_SET_DELAY case now immediately NACKs (goto cmd_bad)
  so clients that still send the command get a clear rejection
  instead of the previous silent fake-success. The opcode stays in
  the protocol enum for backwards compatibility.
- bl.h: drop BOOT_DELAY_SIGNATURE1/2 and BOOT_DELAY_MAX.
- stm/stm32_common/main.c, nxp/imxrt_common/main.c: drop the
  startup boot-delay sig check block.
- image_toc.c: decouple find_toc() from BOOT_DELAY_ADDRESS.
  BOARD_IMAGE_TOC_OFFSET is now the required define when
  BOOTLOADER_USE_TOC is enabled. The body is wrapped in #ifdef
  BOOTLOADER_USE_TOC and falls back to a stub returning false when
  the TOC is not in use (no upstream board currently enables it).
- Linker scripts: strip EXTERN(_bootdelay_signature) and the
  FILL/. += 8 block from all 142 affected .ld files across boards/.
- hw_config.h: strip the #define BOOT_DELAY_ADDRESS and its comment
  block entry from all 48 affected boards.
- Tools/px4_uploader.py, Tools/teensy_uploader.py: remove --boot-delay,
  set_boot_delay(), and SET_BOOT_DELAY client-side counterpart.

Smoke-built on cubepilot_cubeorange_default and
cubepilot_cubeorange_bootloader; no link errors, no unresolved
symbols, flash usage unchanged.

Tested:
- New BL, new FW
- Old BL, old FW
- Old BL, new FW
- New BL, old FW
2026-04-29 13:04:03 +12:00
ZeroOne-Aero 35a94343d6 feat(boards/zeroone-x6): Add BMM350 compass compatibility 2026-04-18 13:21:19 -07:00
Andrew BrahimandJacob Dahl f0453f5694 fix(temperature_compensation): remove temp compensation from enclosed autopilots (#27015)
* fix(temperature_compensation): remove temp compensation from enclosed autopilots

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(temperature_compensation): remove from 3dr/mro

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(temperature_compensation): remove manually from 6x default kconfig

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(temperature_compensation): remove from modalai fc-vx boards

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fix(temperature_compensation): remove from all other boards

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* Update boards/px4/sitl/default.px4board

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-04-13 12:46:00 -04:00
Jacob Dahl e0b663f32b refactor(zeroone/x6/pwm_voltage): convert params.c to module.yaml
Convert 1 parameter file(s) from legacy C format to YAML
module configuration.
2026-03-19 23:21:23 -08:00
Jacob Dahl ba5b96edbe fix(boards): correct GPIO_VDD_3V3_SENSORS_EN macro name (#26751)
* fix(fmu-v6c): correct GPIO_VDD_3V3_SENSORS_EN macro name

VDD_3V3_SENSORS_EN() referenced GPIO_VDD_3V3_SENSORS4_EN which
does not exist. The correct macro is GPIO_VDD_3V3_SENSORS_EN.

Fixes #26454

* fix(boards): rename VDD_3V3_SENSORS4_EN to VDD_3V3_SENSORS_EN

These boards have a single sensor power rail that was incorrectly
named SENSORS4_EN (copy-paste from boards with 4 rails). Rename
to SENSORS_EN to match the actual hardware.

Boards with legitimately numbered rails (fmu-v6xrt, x25-evo,
x25-super) are not changed.
2026-03-16 14:51:47 -08:00
963a776fa6 feat(heater): Add multi-instance support for heaters (#26325)
* heater: add multi-instance support, refactor parameter handling, remove legacy params file

This change introduces multi-instance heater support to allow independent temperature control for multiple IMUs.

Main changes:
- Add support for multiple heater instances
- Refactor parameter handling to use per-instance parameters
- Remove the legacy parameter file and migrate to the updated parameter structure

This improves scalability and makes heater configuration consistent across setups with multiple sensors.

* Refactor heater configuration across multiple boards

- Updated heater GPIO definitions to introduce a new naming convention for better clarity and consistency.
- Replaced `GPIO_HEATER_OUTPUT` with `GPIO_HEATER1_OUTPUT` and adjusted the corresponding output enable macros.
- Changed parameter names from `SENS_TEMP_ID` to `HEATER1_IMU_ID` in various board default configurations to reflect the new heater setup.
- Ensured all affected board configurations are updated to maintain functionality with the new heater definitions.

* heater: fix missing HEATER1_OUTPUT_EN control

* heater: fix more missing HEATER1_OUTPUT_EN control

* heater: tidy config, docs, and instance handling

- Remove unused controller period member and use CONTROLLER_PERIOD_DEFAULT
- Improve HEATER${i}_IMU_ID description and instance-related logging/behavior
- Add a guard when HEATER_NUM exceeds HEATER_MAX_INSTANCES

Note: drop intermediate/reverted change around the 'celsius' spelling.

* heater: refactor constructor to remove unused parameter and add instance name function

- Remove unused ModuleParams argument from Heater constructor
- Add heater_instance_name() helper to provide per-instance work queue task names
- Use instance-specific parameter lookup (HEATER{n}_*) during initialization

Use heater_instance_name() to label each instance (heater_1/2/3) in work queue.
Also drop unused ModuleParams argument from constructor and keep per-instance
parameter handle lookup in initialization.

* format

* board: update GPIO configuration for multiple heater instances, add HEATER_NUM for boards using PX4IO

* heater: update heater control to use HEATER1_OUTPUT_EN when using PX4IO for consistency

* heater: add a TODO for px4io multi-instance

* heater: update missing GPIO_HEATER1_OUTPUT in  sky-drones

* heater: fix multiple newlines at EOF (resolve CI check failure)

* heater: switch to PublicationMulti for heater_status and log multi-instance

- Changed _heater_status_pub from Publication to PublicationMulti to support independent per-instance publications without overwriting.
- Updated logged_topics.cpp to use add_optional_topic_multi("heater_status")

This fixes the issue where multiple heater instances were writing to the same heater_status topic, causing data overwriting and incorrect update rates in logs.

---------

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2026-03-02 12:13:08 -09:00
Alexander Lerach 4ac7853479 auterion autostarter: Added autostart for PWM_EXPANDER, generalized c… (#25925)
* auterion autostarter: Added autostart for PWM_EXPANDER, generalized code, renamed module

* auterion autostarter: Enable on v6s, robustify error handling

* review comments
2026-01-21 19:05:09 +01:00
Matthias Grob f6de211a27 boards: skip resetting INA parameters to the same default value 2025-11-27 15:16:50 +01:00
Julian Oes fa7ffa423c boards: remove MAVLink development dialect
We should not build and release with the MAVLink development dialect
because messages in development.xml can change at any time and break
things.

Instead we should prototype and test things using specific mavlink-dev
targets.
2025-11-20 23:23:40 -09:00
Ramon RocheandJacob Dahl 0cddd3dfb0 drivers: disable INS by default (#25303)
* drivers: disable INS by default

With the growing number of INS drivers some targets are running out of flash
and its becoming challenge to keep them under the limit.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* Update boards/nxp/tropic-community/default.px4board

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

* Update boards/px4/fmu-v6xrt/default.px4board

Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>
2025-07-31 11:42:21 -08:00
xue cb71aea7fa boards: Updated ZeroOne X6
* Starts pwm_voltage_apply
* Enable Septentrio modules
* Enable IIM42653 IMU
* Enable SCH16T IMU

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-02 09:13:01 -07:00
Silvan 8c1f7ec7c0 rename FWPositionController to FWModeManager
Signed-off-by: Silvan <silvan@auterion.com>
2025-05-26 14:47:38 +02:00
RomanBapst 779a55c6dc FW Position Controller rework
- split up old module into two, one handling setpoint generation, one control
- add lateral and longitudinal control setpoints topics that can also be
injected from companion computer
- add configuration topics that (optionally) configure the controller
with limits and momentary settings

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2025-05-26 14:47:38 +02:00
Alexander Lerach 047578a844 Disarm PWM ESCs before reboot 2025-02-10 18:16:48 +01:00
ZeroOne-Aero 374e70c48f ZeroOne X6: add IST8310 support 2025-01-07 09:14:31 +01:00
PX4 BuildBot 01445feacc update all px4board kconfig 2024-10-02 15:09:29 -04:00
ZeroOne-Aero 1850cf5715 boards: new board support ZeroOne x6 2024-09-25 10:55:39 -04:00