ArduPilot: 4.7.0-beta6 release#33296
Conversation
(cherry picked from commit 35ba428)
(cherry picked from commit f85f2a2)
(cherry picked from commit e8cedb4)
(cherry picked from commit 47a77d4)
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.
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>
|
I can't wait for the 6 platforms to have a unified ReleaseNotes.txt... |
|
I just counted the commits again. All accounted for. |
|
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: |
too much noise for the amount of signal we are getting.
|
At @peterbarker's suggestion I've added a commit which includes PR #32467 in the hopes that this resolves the CI test failure |
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)