Skip to content

ArduPilot: 4.7.0-beta6 release#33296

Merged
rmackay9 merged 91 commits into
ArduPilot:ArduPilot-4.7from
Georacer:pr/4.7-beta6
Jun 5, 2026
Merged

ArduPilot: 4.7.0-beta6 release#33296
rmackay9 merged 91 commits into
ArduPilot:ArduPilot-4.7from
Georacer:pr/4.7-beta6

Conversation

@Georacer

@Georacer Georacer commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This is the ArduPilot 4.7.0-beta6 release and includes all the PRs in the 4.7 Backports project's "4.7.0-beta6" column

It would be great if the devs involved could check that they are happy with the ReleaseNotes.txt

Testing (more checks increases chance of being merged)

  • Checked by a human programmer

peterbarker and others added 30 commits June 1, 2026 11:08
Once the CAN log buffer gets near to full, the check for remaining space
can pass even though there is insufficient space left in the buffer
for the actual log message after formatting.

The space for the tag is correctly measured, so the `snprintf` will
never perform a short write. However, the `vsnprintf` will. Though it
does not write too much, it pushes `_log_pos` past the end of the buffer
as it returns the amount that would be written, rather than the amount
that actually was written.

In this case, the test on the next call of the function aims to reset
`_log_pos` to the start. Unfortunately, as that variable is unsigned,
the subtraction from `LOG_BUFFER_SIZE` will result in a large positive
number, falsely stating that there is enough space. This will also then
give the `snprintf` and `vsnprintf` a large positive space for them to
write into, so they will write past the end of the buffer and corrupt
the heap and crash the system.

Fix by making the variable and comparison properly signed. This will
give a problem if log messages get into the billions of characters, but
this is unlikely to occur.
The CAN log buffer it read from is being removed in favour of
sending CAN status messages through GCS_SEND_TEXT.
Replace the in-memory _log_buf with GCS_SEND_TEXT, mapping LogLevel
to MAV_SEVERITY. Drop log_retrieve() and the LOG_BUFFER_SIZE buffer
that backed @SYS/can_log.txt.

Statustexts are mirrored to the onboard log by GCS itself, so no
explicit AP_Logger::Write_Message call is needed here.
This functionality was approximately never used when it existed as an
`@SYS` file, so compile it out so it does not suddenly appear.

The parameter must stay to control handling of `LogMessage` from
peripherals, which were always sent to the GCS.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
The infrastructure for these has been continually buggy and rarely used.

Delete calls in preparation for ripping it out entirely.
peterbarker and others added 6 commits June 3, 2026 13:37
  1. GCS sends chan10_raw = 1000. Overrides are currently enabled, so set_override() stores it.
  2. update() sees has_override() is true → radio_in = 1000 (LOW).
  3. Aux function reads LOW → calls set_gcs_overrides_enabled(false).
  4. GCS keeps sending chan10_raw = 1000, but now set_override() returns early — override timer for ch10 is never refreshed.
  5. After 3 sim-seconds the override expires. update() falls back to the TX value (2000 = HIGH).
  6. Aux function reads HIGH → re-enables overrides. Back to step 1.
When _num_harmonics==1, the second-harmonic filter entries do not exist.
The unconditional access to _filters[num_sources*_composite_notches + ...]
reads past the end of the allocated filter array, producing NaN garbage
that triggers SIGFPE in SITL (FPE exceptions are enabled).  Guard the
access so second-harmonic frequencies are only read when they exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Georacer

Georacer commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

I can't wait for the 6 platforms to have a unified ReleaseNotes.txt...

@Georacer

Georacer commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Georacer,

I think we've missed, "AP_Compass: remove LIS2MDL driver, use IIS2MDC" from PR #33140

Fixed, thank you for catching that!

@Georacer

Georacer commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

I just counted the commits again. All accounted for.
We are 1 commit less than the PR total, because I didn't cherry-pick the autotest from #33156.

rmackay9

This comment was marked as outdated.

@rmackay9

rmackay9 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The Copter optical flow test keeps failing which is odd

OpticalFlow (test OpticalFlow in flight) (gps=9.79 vs of=6.7726902503334925 mismatch) (see /tmp/buildlogs/ArduCopter-OpticalFlow.txt) (duration 9.41720175743103 s)

The Plane failure is a commonly flapping test

test.PlaneTests1c:
DeadreckoningNoAirSpeed (Test deadreckoning support with no airspeed sensor) (GLOBAL_POSITION_INT diverged from simstate by 448.814006m (max=300.000000m) (see /tmp/buildlogs/ArduPlane-DeadreckoningNoAirSpeed.txt) (duration 15.311603307723999 s)

@rmackay9

rmackay9 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

@Georacer,

At @peterbarker's suggestion I've added a commit which includes PR #32467 in the hopes that this resolves the CI test failure

@rmackay9 rmackay9 merged commit 72263d5 into ArduPilot:ArduPilot-4.7 Jun 5, 2026
116 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.