Attendees (unique) : 8
UTC0707
master ← andyp1per:pr-motortest-error-rate
opened 07:28PM - 12 Oct 25 UTC
### Summary
A rising ESC telemetry error rate is often the first sign of a desy… nc or an impending motor failure, and two field cases so far would have been caught by watching it. During a motor test the GCS warns, at most once a second, when an ESC of the motor being spun reports more than 1%, naming the ESC by its output number. With TKOFF_RPM_MIN (Copter) or Q_TKOFF_RPM_MIN (QuadPlane auto takeoff) set, takeoff is also blocked while any motor's ESC reports more than 1%, or has stopped reporting its rate.
Only bidirectional DShot on flight controller outputs is checked, as it is the one driver whose rate is a known percentage. DroneCAN ESCs put a cumulative error count in the same telemetry field, which would otherwise block takeoff once an ESC had counted two errors. IOMCU DShot, FETtec and the other drivers are not checked either, and ESC.Err logs exactly what it did before for all of them. The DShot percentage is kept with its own timestamp, so BLHeli serial telemetry on the same ESC can neither hide it nor keep a stale one alive.
Three existing DShot bugs fed the rate wrong numbers and are fixed: a missing reply was counted against the wrong output, the empty window after a DShot command was counted as an error, and an ESC that stopped replying never reset its counters, so they wrapped. The counters restart every 5 s, so the rate the check reads keeps the last full window's across a restart: a few good replies just after one cannot pass a failing ESC.
Parameters: setting TKOFF_RPM_MIN or Q_TKOFF_RPM_MIN now also enables the 1% error rate check, and both descriptions say so. The new SITL-only SIM_ESC_ERR_RATE sets the simulated ESC error rate.
### Classification & Testing (check all that apply and add your own)
- [x] Automated test(s) verify changes (e.g. unit test, autotest)
- [x] Tested manually, description below (e.g. SITL)
- [x] Tested on hardware: flown with bidirectional DShot; the restart handling is not flown yet
Copter.TakeoffCheck and QuadPlane.TakeoffCheck block takeoff with SIM_ESC_ERR_RATE at 5% and the RPM in range; with the 1% limit removed the Copter subtest fails. Copter.MotorTestErrorRate runs a four-motor test on the "+" frame at 5%: the warnings name motors 3, 1, 4 and 2, the outputs it spins, where the first version named 1, 2 and 3 and nothing for the fourth. At 0.5% there is no warning, and with motor 1 on outputs 5 and 6 both are named. Copter.MotorTest, QuadPlane.MotorTest and Copter.FETtecESC still pass.
Flown on a quad with bidirectional DShot over eleven boots: armed, ESC.Err stayed at or below 0.9% on every motor, reaching 1.5-1.9% only in hard acro, and the takeoff check never blocked. SITL cannot run the DShot driver, so the restart handling was run as extracted code, with the misses evenly spaced; good replies in 55 s reading 1% or under:
| ESC | before | after |
|---|---|---|
| failing 50% of replies | 11 | 0 |
| failing 50%, telemetry starting 6.5 s after boot | 13 | 0 |
| failing 5%, at 500 and 100 replies a second | 277, 240 | 0, 0 |
| failing 50% from 20 ms after a restart | 8 | 3 |
| healthy | every one | every one after its first 250 |
### Description
Detail for reviewers; not needed to review the change in outline.
A unit-level probe of AP_ESC_Telem shows a DroneCAN count of 2 no longer blocking, and a 0.5% DShot rate failing once DShot has been silent for 400 ms while BLHeli RPM continues.
Drivers say whether their error rate is a percentage when they call update_rpm(); only the ChibiOS bidirectional DShot driver and the SITL ESC backend do. error_rate is still stored as the latest driver reported it, so ESC.Err and AP_Periph's relayed DroneCAN error_count are unchanged. A percentage is also stored in error_rate_pct with its own timestamp, and is only used within ESC_RPM_CHECK_TIMEOUT_US, the timeout the RPM check already uses. Bidirectional DShot republishes each ESC's latest reading every pulse, with the current rate, until a corrupt reply replaces it; an ESC whose replies stop goes on being republished, its misses counted into the rate, so it fails the check on the rate. This costs 8 bytes of RAM per ESC slot, 128 bytes on a 1 MB board and 256 on larger ones.
Converting the DroneCAN count to a rate instead would need a window per ESC and a rate the DSDL does not define, and AP_Periph already sends its DShot percentage in that same error_count field. Dropping the count from DroneCAN would change ESC.Err for every DroneCAN user.
The DShot fixes: a reply that never arrived was counted with erpm_errors[curr_telem_chan], the next slot within the timer group rather than the output, as the DMA callback has already moved it on; it now uses group.chan[prev_telem_chan], as the decode path does. ESCs do not answer DShot commands, so each pulse now records whether it sent a command to the channel in the telemetry slot, and that missing reply is not counted. A missing reply now goes through the same 5 s statistics reset as a reply that fails to decode.
The restart: each pulse republished the cached reading with the rate of a window that had just restarted, which read 0%. The driver now keeps the rate of the last window that counted 250 frames; while the new window has fewer it reports the larger of that and its own errors divided by no fewer than 250 frames, or 100% before any window has been full. Divided by the frames counted so far, one miss just after a restart read 100% and stayed over 1% for about half a second, long enough for the motor test to name a healthy ESC; it now counts as 0.4%. A window is closed before the reply that ends it is counted, so a miss there shows in the new one, and a window cut short by a pause in telemetry gives no rate. The rate divides by the frames counted, not one more, which read 3 errors in 299 frames as 1.00%, under the limit. It is worked out in the RCOutput thread at each counted reply and published as one value, because the IOMCU firmware reads it from another thread. 250 frames rather than 100: at 100, a 5% ESC still read under 1% on some frames at 500 replies a second.
The motor test finds the outputs a test order spins with AP_Motors::get_test_seq_output_mask(), which uses the same test-order mapping as the motor output. The warning is one STATUSTEXT, at most once a second, taking a motor's outputs in turn. In SITL it reports 0 rpm unless SIM_VIB_MOT_MAX or SIM_ESC_ARM_RPM is set, because SITL does not otherwise simulate motor RPM.
Against the head before the 2026-10-30 fixes, CubeOrange-bdshot copter grew by 380 bytes of flash; the restart handling adds 256 bytes of flash and 128 of RAM on an H7 board.
Not covered:
- An ESC configured for bidirectional DShot that has never reported a rate since boot is not checked, as nothing in AP_HAL says which outputs run bidirectional DShot. Without another RPM source such an ESC already fails the RPM check; with BLHeli serial telemetry supplying RPM it passes. A getter on AP_HAL::RCOutput would close this.
- Error rates passed in by scripts are not checked, as the Lua binding of update_rpm() cannot say that its value is a percentage.
- Tri, single, coax and tailsitter frames give no motor test warning, as AP_Motors only maps the test order for matrix frames.
- A failure that starts just after a restart reads over 1% from its third miss rather than its first, since a window's first 250 frames divide their errors by 250; a full 250-frame window already lets two misses through.
- A failure that starts late in a 5 s window is diluted by that window's earlier good replies: after 2000 good ones, an ESC failing half its replies takes about 21 misses to read over 1%. A shorter or sliding window would catch it sooner.
- With random rather than evenly spaced loss, a full window from an ESC failing 2% of its replies can read 1% or under (47 of 220 windows in a host probe), and very rarely one failing 5%: sampling noise against the 1% limit.
Andrew : It adds a lot of error messages pre-flight.
Peter : It looks like it’s blocking spoolup.
A : Some ESCs report error rates as % and some don’t?
Let’s leave it for later.
UTC0718
master ← rmackay9:serial-passthru-param-desc
opened 02:36AM - 03 Nov 26 UTC
Parameter values are expanded to include Networking, DroneCAN and Scripting seri… al ports
- Networking is 21–24 (AP_NETWORKING_NUM_PORTS is 4).
- DroneCAN is 41–43 and 51–53 (AP_DRONECAN_SERIAL_NUM_PORTS is 3).
- Scripting is 61–63 (3 ports).
I've chosen to make the names in the hopes that they are more human readable but I'm very open to suggestions.
I've tested serial passthrough using networking on my aerial photography copter. I think at the conference @joshanne told me that he'd used serial passthrough with DroneCAN serial ports succesfully.
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [x] Non-functional change
- [x] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [ ] Automated test(s) verify changes (e.g. unit test, autotest)
- [ ] Tested manually, description below (e.g. SITL)
- [x] Tested on hardware
- [ ] Logs attached
- [ ] Logs available on request
Merged!
UTC0720
master ← IamPete1:glide_fs_mode
opened 12:56AM - 03 Nov 26 UTC
### Summary
A alternate approach to https://github.com/ArduPilot/ardupilot/pull… /34351, by making the glide failsafe a dedicated mode all the tricky entry and exit behavior is resolved.
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [x] Automated test(s) verify changes (e.g. unit test, autotest)
- [ ] Tested manually, description below (e.g. SITL)
- [ ] Tested on hardware
- [ ] Logs attached
- [ ] Logs available on request
### Description
Changes to a dedicated mode, there is some behavior changes as a result, but I think for the better. The benefit of the dedicated mode is that its clearer to the user when they are in normal FBWA and when there in a Glide failsafe. There is no contradiction of reported mode and behavior. I'm open to better name ideas, I wanted to make it clear that this was a failsafe and not related to soaring/thermaling.
This also opens the path for potential improvements, such as gliding into the wind rather than just holding 0/0.
A : Wny not switch into FBWA and glide instead?
George : I think it was because there were some bugs with FBWA behaving strangely in absence of RC.
A : Ah, it seems to be in response to a report from Henry.
Approved!
UTC0728
master ← andyp1per:pr-ekf3-flow-tilt-timeout
opened 07:41PM - 30 Oct 26 UTC
### Summary
If you fly acro with an optical-flow EKF3 lane, holding more than… 45 deg of tilt for 5 s makes that lane throw away a good velocity and restart from zero, and Loiter on it afterwards can hold a dive lean as if fighting wind. Time the tilt check spends withholding flow no longer counts towards the 5 s flow timeout.
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [x] Automated test(s) verify changes (e.g. unit test, autotest)
- [x] Tested manually, description below (e.g. SITL)
- [x] Logs available on request
### Description
Flow is not fused past 45 deg of tilt. A lane that goes 5 s without fusing flow times out of relative aiding, re-enters it on the next update, and both transitions zero its horizontal velocity. In acro that happens whenever the vehicle holds a steep attitude for 5 s, and the velocity it discards is usually good: on one flight the IMU had carried it to 18.1 m/s against 18.6 m/s from GPS when it was zeroed. Above the range finder that lane did not recover: it later read 0.3-0.9 m/s while the copter flew at 13 m/s, the pilot selected Loiter, and Loiter held the 31 deg lean as if into wind.
The timeout is for flow that is rejected. With this change, time the tilt check spends withholding flow from a lane that fuses it does not count towards it, so while the tilt lasts the lane dead-reckons on the IMU with its velocity variance growing, and flow is fused again once the vehicle levels. Flow that is rejected or stops arriving still times the lane out once 5 s of that has built up since the last fusion, however it is interleaved with tilts.
Replayed on two real flights through a port to a 4.7 beta (the logs are in its format): flow lane speed error against GPS 9.5 -> 4.0 m/s rms on one and 9.2 -> 2.6 m/s on the other, with 4 and 6 aiding timeouts going to none. A hover flight replays identically. The new autotest OpticalFlowTiltNoTimeout banks a flow-only lane past 45 deg for 7 s; master times out 5 s into the bank and this change does not.
<img width="1430" height="792" alt="reentry_before_after" src="https://github.com/user-attachments/assets/7868f4c3-0c99-4348-b322-9f44fc85cfab" />
No parameters change.
Everything below is detail for reviewers; the change can be reviewed in outline without it.
#### The test
Core 0 runs on GPS and core 1 on flow alone (EK3_SRC_OPTIONS 8), so the vehicle flies normally while core 1 is watched. Three checks, each on the "IMU1 stopped aiding" message:
- Level in Loiter, SIM_FLOW_ENABLE 0 must time core 1 out, and with flow back it must fuse again before the bank.
- Banked 55 deg in ACRO at 55-65 m (roll checked to stay above 47 deg) for 7 s, core 1 must not time out.
- Still banked, SIM_FLOW_ENABLE 0 must time it out after 4 to 10 s. This is what separates the change from simply suppressing the timeout while tilted.
On three builds: master fails the second check, a variant that suppresses the timeout while tilted fails the third (no timeout at all), and this change passes, timing out 5.4 s after the flow stopped. SITL flow reports quality 51 at any attitude, so banked samples keep arriving and reach the new branch. The bank is above the range finder's reach, as on the flight that exposed this.
#### Why not keep the velocity on re-entry instead
#33568 skips the velocity and position resets on the ABSOLUTE -> RELATIVE edge. The same exemption on NONE -> RELATIVE would not be enough, because the velocity is zeroed on the way out, at RELATIVE -> NONE, which also resets the height to the baro. Restarting the 5 s window on each withheld sample gave identical replay results, but flow rejected while level and withheld while banked, alternating, would then never time out; counting the withheld time does not have that hole.
#### Gaps and edges
A gap between samples of 1 s or more, EKF3's flow valid time, counts as missing flow and credits nothing. The withheld count is zeroed wherever the last fusion time is set. On re-entry to relative aiding it can be ahead of the time since entry by one sample interval at most, since re-entry needs flow within 200 ms, and the timeout's MIN() stops it underflowing. Only a lane whose source set fuses flow builds up credit.
#### What it does when it is wrong
While a tilt lasts, nothing bounds the coast. Before, the lane's velocity was zeroed every 5 s with its variance set to the GPS velocity noise, a confident wrong value; now the variance grows, so when the vehicle levels the innovation gate is wide and flow is accepted rather than rejected. A setup that holds a flow lane past 45 deg for long periods, such as a tailsitter in forward flight, would coast for as long as it does. Whether any setup runs a flow lane there is not established.
#### Replay
Through a port of this change to the 4.7 beta the logs were flown on; master's own EKF was not replayed, as the logs are in the beta's format. Flow lane speed against GPS, and position against the GPS lane, over the whole flight:
| Log | Speed error rms / p95 | Time more than 3 m/s off | Worst position error vs GPS lane | Aiding timeouts |
|---|---|---|---|---|
| flight 1, as flown | 9.5 / 21.8 m/s | 47% | 466 m | 4 |
| flight 1, this change | 4.0 / 8.8 m/s | 33% | 313 m | 0 |
| flight 2, as flown | 9.2 / 19.0 m/s | 45% | 333 m | 6 |
| flight 2, this change | 2.6 / 5.2 m/s | 18% | 95 m | 0 |
At flight 1's Loiter switch the lane reads 10.6 m/s against 13.2 m/s from GPS rather than 1.2; why it is still about 3 m/s low there, at 25 m and above the range finder, is not established, and Replay feeds back the terrain heights the flight looked up at its flown position, which this change would have moved, so that path is only partly tested. On flight 2 the beta's single-axis lockout reset (#33484) fired three times as flown, each repairing a velocity zeroed by a re-entry, and not at all with this change.
Andy : Upon lane switch, OF seemed to have timed-out. As a result, the new lane thought it was not moving, which made it not correct for motion at all.
Randy : When we do a reset we grab the latest sensor value. Resetting a sensor to 0 is not correct.
A : This PR could make things worse by overcorrecting the flow direction, if the reset happens during a turn.Better to use the latest, noisy reading, rather than the old reading.
Andy : Yes, I think you might be right.
Someone said that we should be averaging OF readings, rather than subsampling.
A : That might be correct. But we need to be careful to accumulate in the Earth frame, not in the Body frame, so we need to do a transformation for each sample.
UTC0743
master ← bugobliterator:x20d-daheading
opened 03:14AM - 04 Nov 26 UTC
### Summary
Use UBX-NAV-DAHEADING from the u-blox ZED-X20D as a GPS yaw source,… configured through the CFGv2 driver. The X20D position might be the primary GPS solution, so position updates are not held waiting on heading.
Based on #33311, modified to fit the tested ZED-X20D for now: only the X20D, only through the CFGv2 driver (no legacy CFG-MSG path, no ZED-F9H, no UART2 output).
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [x] Tested on hardware
- [x] Logs available on request
Bench tested on a CubeOrangePlus with a ZED-X20D (HDG 2.0x firmware) on UART1, antennas 0.9 m apart across the vehicle. The module was configured by CFGv2, DAHEADING was received, and GPS yaw was accepted by EKF3 and matched the vehicle heading.
The position-hold change in the second commit has been build tested only so far.
Test parameters: `GPS1_TYPE=2`, `GPS1_MB_TYPE=1`, `GPS1_MB_OFS_Y=-0.9`, `GPS1_POS_Y=-0.45`, `EK3_SRC1_YAW=2`, `COMPASS_ENABLE=0`.
### Description
The ZED-X20D computes heading from its two antennas internally and reports it in UBX-NAV-DAHEADING. The released HDG 2.00/2.01 firmware sends version 2 of this message: 60 bytes, relative position in mm, flags at offset 56 with relPosHeadingValid at bit 6. This differs from NAV-RELPOSNED, so it gets its own struct and parser.
- CFGv2 `_identify_module()` marks an X20D as a dual-antenna heading source and sets `gps_yaw_configured`.
- CFGv2 enables `CFG-MSGOUT-UBX_NAV_DAHEADING_UART1` when the module is connected on UART1 (UART2 on the X20D is input only).
- DAHEADING is accepted when gnssFixOK, relPosValid, relPosHeadingValid and carrSoln=fixed are set, then passed to `calculate_moving_base_yaw()` with the baseline in metres. The antenna geometry comes from `GPSx_MB_TYPE=1` and `GPSx_MB_OFS_*` (position of antenna 1 relative to antenna 2).
- Yaw is dropped if DAHEADING goes stale (>400 ms). Unlike a moving-baseline rover, position updates are not held until a DAHEADING with a matching iTOW arrives: the X20D position might be the primary GPS solution.
Support is only built when `AP_GPS_UBLOX_CFGV2_ENABLED`. Without CFGv2 the X20D provides position only.
Field layout checked against the u-blox X20 HDG 2.00 and 2.01 interface description JSON files.
This change was written with AI assistance (Claude Code): code adapted and reduced from existing work, reviewed against the u-blox spec and bench tested by me.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A : What is 10e-5 about?
Sid : Yes, the number format is very weird.
Do we need to append .f in the float constants?
A : No, with the current compiler settings it does not make a difference.
Can you ask uBlox how we can scan for the features updated by a module?
Scanning strings is a crappy way to go about it.
S : Yes, I can ask.
A : We should probably stop parsing the old message, now that we have new parameters reporting.
S : We can set the message rate to 0.
A : Is it possible to have two X20s, one with a dual antenna and one without? So that we can have GPS for yaw but also GNSS redundancy.
S : I think it should work.
Okay to merge on AI Review.
UTC0753
master ← bugobliterator:baro-prom-backup
opened 03:47AM - 03 Nov 26 UTC
### Summary
Store each MS5611/MS5607 PROM that passes its CRC in parameters and… in a new storage area that survives a parameter wipe. When a later PROM read fails its CRC by a few bits, use the stored copy instead of dropping the sensor.
### Classification & Testing (check all that apply and add your own)
- [ ] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [ ] Automated test(s) verify changes (e.g. unit test, autotest)
- [x] Tested manually, description below (e.g. SITL)
- [x] Tested on hardware
- [ ] Logs attached
- [x] Logs available on request
**SITL:** with `BARO_PROBE_EXT` set to MS5611, the simulated sensor's PROM is recorded into `BAROn_PROM_W0..W7` and matches `SIM_MS5611.h`. No other instance records a PROM. The log contains `Baro3: PROM FFFF 9CBF 903C 5B15 5AF2 82B8 6E98 0008`. The SITL MS5611 can't corrupt its PROM, so the fallback itself was tested on hardware only.
**Hardware:** CubeOrange whose internal MS5611 (SPI1) reads `0000 ACD2 A42F 6E9A 6381 875B 6B31 0008` every boot. The stored CRC is 8 and the computed CRC is 5. Without this change the board fails `CHECK_BARO0_PRESENT` validation and the sensor is not registered.
The chip had already failed, so there was never a healthy read to record. Instead, a PROM 2 bits away (`0x6381` → `0x6F81` in C4) was written to `BARO2_PROM_W0..W7`. That candidate was picked from a 937-sample heater sweep (34–60 °C against a reference baro). It passes the CRC and fits the reference to 0.04 hPa std. On fielded units the PROM is recorded automatically while the sensor is healthy.
With `BRD_OPTIONS` = 1 (board validation enabled):
- Board validation passes and both baros register on every boot.
- Each boot logs `Baro2: PROM 0000 ACD2 A42F 6E9A 6381 875B 6B31 0008`, `Baro2: PROM CRC fail, using stored PROM` and `Baro2: stored 0000 ACD2 A42F 6E9A 6F81 875B 6B31 0008`.
- In a 200 s flight to 75 m, including Loiter, the two baros differed by −2.6 Pa mean (4.8 Pa std) while the internal sensor cooled from 33.6 to 30.8 °C.
**Wipe-proof copy:** an earlier revision kept it in the bootloader-sector persistent parameters. On Cube Orange it was written there, and after a full parameter reset (`MAV_CMD_PREFLIGHT_STORAGE` param1 2) the board recovered from it: validation passed and both baros read 1008.05 and 1008.25 hPa. That path needed a bootloader rewrite, so it was replaced by the `StorageBaroPROM` storage area. The storage-area version has been checked in SITL and builds but not yet on hardware.
**Builds:** SITL, CubeOrange, CubeOrangePlus, CubeBlack and an AP_Periph build complete without new compiler warnings. In SITL the new layout boots and loads parameters, and an external-bus MS5611 is not recorded. `param_parse.py` passes.
### Description
Several CubeOrange units have one MS5611 whose PROM fails its CRC. That makes the board fail validation, or lose a baro, even though the chip still measures correctly once given the right coefficients. The PROM CRC is the driver's only presence check (the part has no WHO_AM_I).
- **AP_Baro:**
- After a PROM passes its CRC, the driver saves it to `BAROn_PROM_W0..W7`. These are internal-use parameters, one 16-bit word each, saved only when they change.
- If a PROM fails its CRC, `AP_Baro::find_stored_prom()` searches the stored slots for one that passes its own CRC and differs from the read PROM by at most 4 bits, then uses it.
- A different chip differs in far more bits, so another sensor's stored PROM can't be picked up by mistake.
- Only sensors on the board itself use the backup: SPI devices, or I2C devices on an internal bus (`get_bus_mask_internal()`). External MS5611s still have their PROM logged but are never recorded or substituted.
- The fallback is logged once and has no other user-visible effect.
- **Storage record (`StorageBaroPROM`):**
- Each recorded PROM is also written to a record in the `StorageBaroPROM` area: magic, version, the sensor's bus ID (device type masked), the 8 PROM words and a CRC32. Up to 4 records fit; records are matched by bus ID, so the order sensors register in doesn't matter.
- `find_stored_prom()` checks the parameters first, then the record with the sensor's bus ID, with the same CRC4 and 4-bit checks.
- The area isn't a parameter, so it can't be set from a GCS, script or defaults file. Unused or invalid records are ignored.
- **StorageManager:** the new `StorageBaroPROM` area uses the reserved 128-byte gap at the end of the first 16k (offsets 16256–16383) on boards with 16 KB or more of storage; existing offsets don't change. A parameter reset (`AP_Param::erase_all()`) doesn't touch it, and `StorageManager::erase()`, used on a firmware format change, keeps its contents. This takes the reserved expansion space, so the layout change needs maintainer agreement.
- **Boot log:** each boot logs the PROM read from the chip in hex. When the stored PROM is used, it also logs that PROM, so a PROM can be recovered from earlier logs.
- **AP_BoardConfig:** `check_ms5611()` uses the same lookup, so board validation passes for a sensor with a stored PROM.
- **Tools:** build option `BARO_PROM_BACKUP` (`AP_BARO_PROM_BACKUP_ENABLED`), on by default where MS5611/MS5607 support is enabled.
New parameters: `BARO1_PROM_W0..W7`, `BARO2_PROM_W0..W7`, `BARO3_PROM_W0..W7` (`AP_Baro` indices 27–29, internal use only). No existing parameters change.
This PR was written with AI assistance (Claude Code): investigation, code, test scripts and this description. I reviewed the changes and did the hardware testing and flights.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
S : We have had cubes with failling baro0 or baro1.
I found that PROM was getting corrupted, with failling CRC.
We get a low frequency of these failures, but they are accumulating.
This results in board validation error and failure to boot.
The manufacturer is aware of this issue.
If you don’t properly power down below 0.1V and then power up again, the PROM can get corrupted.
They recommend to store the PROM elsewhere and use it from there.
A : That’s a pretty crappy recommendation.
Have you found a way to resurrect the baro by writing to the PROM?
S : No, that’s a one-time write.
I recommend that we store the PROM into memory. Bootloader isn’t an option and the parameter space is user-writable, so some other place in FRAM could do.
A : But that would have us keep track of that memory space. I don’t like that.
I would find it acceptable to ignore this baro and use the other.
What type of user would want to continue with a failed baro?
S : I can’t name them, but they need to keep on flying.
A : We can have an option bit that allows you to boot with one bad baro.
Existing users can’t benefit from this PR anyways.
S : We do have that board option in master.
A : There you have it!
S : It would still be nice to be able to keep using that baro.
UTC0829
master ← snktshrma:dev/mag-mask-fix
opened 07:07AM - 29 Oct 26 UTC
### Summary
This fixes the bit check for EK3_MAG_MASK so each bit applies to th… e correct lane
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [ ] Automated test(s) verify changes (e.g. unit test, autotest)
- [x] Tested manually, description below (e.g. SITL)
- [ ] Tested on hardware
- [ ] Logs attached
- [ ] Logs available on request
In sitl(master), set EK3_MAG_MASK=1, EK3_MAG_CAL=4, SIM_MAG_RND=5, LOG_DISARMED=1. Core 0 should go heading only ideally. XKF3[1].IMX stays 0 (as per my understanding this means lane 1 has gone heading only) and XKF3[0].IMX is non-zero, so lane 0, which MAG_MAK should force, is not forced heading only.
### Description
This came up during an Isaac sim test for copters in magnetically noisy environment.
Merged!
A : What effect did this have? Do we need to backport it?
It would break the effect of the *MAG_MASK parameter.
But no-one ever uses this parameter.
P : We’ve had this since 2020.
A : And it’s in EKF2 as well.
P : Yes, I’m opening a PR.
UTC0837
master ← Georacer:pr/last_letter_ci
opened 12:31PM - 11 Aug 26 UTC
### Summary
Adds a CI test for the last_letter simulation backend.
### Cla… ssification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [x] Infrastructure change (e.g. unit tests, helper scripts)
- [x] Automated test(s) verify changes (e.g. unit test, autotest)
- [ ] Tested manually, description below (e.g. SITL)
- [ ] Tested on hardware
- [x] Logs attached
- [ ] Logs available on request
SITL log: https://www.dropbox.com/scl/fi/77cdmqabx0lq48s4qostf/00000003.BIN?rlkey=bos9sbvkrglk9q9n20s2upxda&st=6fkdta46&dl=0
### Description
Adds a new github workflow which:
- Builds plane SITL.
- Pulls a pinned version of the last_letter_ardupilot binary, its dynamic library and the models folder.
- Runs a duplicate of the `LOITER` test.
P : Please refactor our loiter and reuse it.
UTC0840
master ← khancyr:waf_per_lib_flags
opened 09:55AM - 08 Oct 26 UTC
### Summary
When using AP_LIB_EXTRA_CFLAGS, we shouldn't apply it to all lib … but only its target
Bug catched by AIReview (https://github.com/ArduPilot/ardupilot/pull/34648#issuecomment-6050225519)
Issue was unnoticed before since nothing was using it
We need this to fix some issue with lwip C file with recent gcc when compiling with optimisation (https://github.com/ArduPilot/ardupilot/pull/34648)
### Classification & Testing (check all that apply and add your own)
- [ ] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [ ] Automated test(s) verify changes (e.g. unit test, autotest)
- [ ] Tested manually, description below (e.g. SITL)
- [ ] Tested on hardware
- [ ] Logs attached
- [ ] Logs available on request
### Description
A : It’s ugly, but we might need to accept it.
Otherwise we’d need to change the lwip submodule.
P : We should compile regardless of optimization level.
A : But once you go to high optimization levels it’s hard to get no warnings.
Merged!
UTC0845
ArduPilot-4.7 ← ashwanisihag:saam/backport-saampix-4.7
opened 02:15AM - 11 Sep 26 UTC
## Summary
Backports SaamPixV1_1 board support to the `ArduPilot-4.7` release b… ranch.
Board support merged to `master` on 2026-07-22, after the 4.7 branch was cut. As a
result there is no `stable` or `beta` firmware for this board on
firmware.ardupilot.org — only `latest`/dev, which tracks master and moves daily.
Users of this board currently have no released firmware to run.
This is a straight cherry-pick of the original commits, additive only.
## Commits
Cherry-picked from `master` onto `ArduPilot-4.7` at `4776a3fb` (4.7.1 + CAN fix), no conflicts:
| master commit | subject |
| --- | --- |
| `c579aff1` | AP_Bootloader: reserve board ID for SaamPixV1_1 |
| `c88bba83` | bootloaders: add SaamPixV1_1 |
| `4b0c2a22` | AP_HAL_ChibiOS: add SaamPixV1_1 board support |
| `a9bba043` | bootloaders: fix SaamPixV1_1 prebuilt bootloader board ID |
Original PRs: #32582 (board support), #33886 (bootloader board ID fix).
## Change surface
9 files changed, 404 insertions(+), 0 deletions(-).
**New files only, except one line:**
- `libraries/AP_HAL_ChibiOS/hwdef/SaamPixV1_1/` — `hwdef.dat`, `hwdef-bl.dat`,
`README.md`, 3 board images
- `Tools/bootloaders/SaamPixV1_1_bl.{bin,hex}`
- `Tools/AP_Bootloader/board_types.txt` — one appended line,
`AP_HW_SAAMPIXV1_1 1316`
No existing board definition, shared HAL code, or flight code is modified. Board ID
1316 is unique on this branch.
## Testing
- Both `hwdef.dat` and `hwdef-bl.dat` parse with this branch's
`chibios_hwdef.py`, generating the complete artifact set (`hwdef.h`,
`ldscript.ld`, `common.ld`, `hw.dat`, `processed_defaults.parm`).
- `APJ_BOARD_ID` resolves to 1316 from both the firmware and bootloader hwdef,
identical to what master's parser produces from the same files.
- Prebuilt bootloader binaries carry the #33886 board-ID correction; SHA-256 of
`SaamPixV1_1_bl.bin` matches master's current copy.
- Builds clean on this branch: `./waf configure --board SaamPixV1_1 && ./waf copter`
succeeds with the 4.7 toolchain (gcc-arm-none-eabi 10.3.1), producing
`arducopter.apj` with `board_id: 1316`. Flash usage 1,472,051 B of 2,080,768 B
(608,708 B free)
- Tested on hardware: the `arducopter.apj` built from this branch (at its
pre-rebase tip `fd70e2ed`, identical file content) was flashed to a SaamPixV1_1
(STM32F427, bootloader rev 5, `board_type: 1316`) and verified over MAVLink —
boot banner `ArduCopter V4.7.1 (fd70e2ed)` / `SaamPixV1_1`,
heartbeat `MAV_TYPE_QUADROTOR`, `AUTOPILOT_VERSION` fw 4.7.1,
`board_version 0x05240000` (= 1316). The same board also runs the official
dev builds of Copter and Rover from firmware.ardupilot.org.
## Note
I appreciate that adding a new board to an already-released branch is a judgement
call for the release maintainers rather than routine. The change is fully self-contained. 4.7.2-beta1 has since been cut without it,
so a later 4.7.2 beta or 4.7.3 would be fine, whichever suits the release schedule. Happy to close this and wait for 4.8 if you would rather not
carry new boards in a point release.
## AI assistance
This contribution was AI-assisted. Claude Code was used to cherry-pick the four
commits onto `ArduPilot-4.7`, run the builds and the hardware flash/MAVLink check
described above on my board, and draft this description. The board definition
itself is the one already reviewed and merged in #32582 and #33886. I have reviewed
the change and take responsibility for it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A : Okay, let’s approve it.
UTC0851
ArduPilot-4.7 ← dakejahl:backport/4.7-lsm6dsv32x
opened 06:12PM - 23 Sep 26 UTC
### Summary
Backport of #33293 (LSM6DSV32X and LSM6DSK320X support) and #34271 … (ARK_FPV LSM6DSV32X), which were dropped from 4.7.2-beta1 over merge conflicts.
Also picks #34483 (identify the LSM6DSV variant after reset) from master as 0922bcedfe.
### Classification & Testing (check all that apply and add your own)
- [x] Checked by a human programmer
- [ ] Non-functional change
- [ ] No-binary change
- [ ] Infrastructure change (e.g. unit tests, helper scripts)
- [ ] Automated test(s) verify changes (e.g. unit test, autotest)
- [ ] Tested manually, description below (e.g. SITL)
- [x] Tested on hardware
- [ ] Logs attached
- [ ] Logs available on request
Rebased onto ArduPilot-4.7 after the 4.7.2 release. `./waf copter` builds for ARK_FPV and Pixhawk6X (arm-none-eabi-gcc 10.2.1). The generated ARK_FPV hwdef probes `Invensensev3` on `iim42653` and `LSM6DSV` on `lsm6dsv`, both `ROTATION_YAW_270`.
Bench, ARK FPV rev 1: detects the LSM6DSV32X (`INS_GYR_ID` devtype 0x42) and reads 1.00–1.01 g at rest. That covers a warm restart from Betaflight on the pre-rebase branch (identical driver files), and warm restarts from itself on the rebased branch. Flight tested in AltHold and PosHold (comment below). The bench and flight tests ran with #34483 on top.
### Description
Without this on 4.7:
- ARK_FPV rev 1 (LSM6DSV32X in place of the IIM-42653) has no IMU.
- 4.7.2-beta1 (#34288) probes the LSM6DSV family on Pixhawk6X 45686-layout boards, but the 4.7 driver accepts only WHO_AM_I 0x70 and configures every part as a 16X. On a 32X that CTRL8 write clears bit2, which the 32X runs as ±16 g at the 16X scale: accel reads correctly, but the IMU reports as a 16X. An LSM6DSK320X (0x75) passes the board probe but fails the driver probe.
`DEVTYPE_INS_LSM6DSV32X` and `DEVTYPE_INS_LSM6DSK320X` keep master's values (0x42, 0x43) so the INS ID parameters don't change when upgrading to 4.8. 0x41 (SCH16T) isn't on 4.7. The LSM6DSV driver files match master.
A board already running an LSM6DSV32X on 4.7 changes INS ID from 0x3E to 0x42 and needs an accel calibration; worth a line in the 4.7.x release notes.
#34483 matters most on this branch: 4.7.2 clears CTRL8 bit2 on a 32X, so without it a board updated from 4.7.2 without a power cycle comes up as a 16X.
AI-assisted (Claude): cherry-picks, conflict resolution, the variant fix, and a comparison against the PX4 and Betaflight LSM6DSV drivers. I reviewed all of it.
A : This has the potential to break existing boards with another sensor variant.
Upon review, it’s not zero-risk for existing boards, but it’s not high risk.
We do have the space for it.
Approved!
UTC0900
End