Files
PX4-Autopilot/docs/en/releases/main.md
Julian Oes f9fdda1a29 feat(logger): rework log rotation and cleanup
Make the logger practical on small flash storage (e.g. 128 MB W25N
NAND) while keeping the existing SD-card behaviour sensible.

- Move cleanup from boot to log start so logs can be downloaded via
  MAVLink FTP before deletion.
- Delete individual .ulg files (oldest first) instead of whole
  directories, prioritising the naming scheme not currently in use
  (session dirs vs date dirs).
- Add SDLOG_MAX_SIZE (new, default 1024 MB): maximum size of a single
  log file. When reached, the log rotates to a new file. The value is
  also reserved as headroom in the cleanup threshold.
- Add SDLOG_ROTATE (new, default 90): maximum disk usage percentage.
  Cleanup guarantees (100 - SDLOG_ROTATE)% free at all times, even
  during writing of a new log file. 0 disables space-based cleanup,
  100 allows filling the disk.
- Repurpose SDLOG_DIRS_MAX as an orthogonal directory-count cap
  (default 0 = disabled). Useful for capping log usage by count
  independent of disk size, e.g. in SITL.
- Drop the implicit ~300 MB free-space floor that used to fire even
  with SDLOG_DIRS_MAX=0; space is now governed entirely by
  SDLOG_ROTATE + SDLOG_MAX_SIZE.
- Split pure parsing helpers into util_parse.{h,cpp} and add unit
  tests (loggerUtilTest.cpp).
- Simplify get_log_time to rely on clock_gettime (set by the GPS
  driver); safer string handling in directory parsing.
- Reset _total_written in LogFileBuffer::reset() so callers reading
  get_total_written() between stop and start don't see stale counts.

Sponsored by CubePilot.
2026-04-23 10:30:14 +12:00

8.3 KiB

PX4-Autopilot Main Release Notes

<script setup> import { useData } from 'vitepress' const { site } = useData(); </script>

This page is on a release branch, and hence probably out of date. See the latest version.

This contains changes to PX4 main branch since the last major release (PX v1.16).

::: warning PX4 v1.17 is in alpha/beta testing. Update these notes with features that are going to be in main (PX4 v1.18 or later) but not the PX4 v1.17 release. :::

Read Before Upgrading

  • Log rotation is now enabled by default. Previously, a single log file grew for the entire flight and old logs were only deleted at boot once free space fell below a fixed 300 MB floor. The logger now caps each log file at SDLOG_MAX_SIZE (new parameter, default 1024 MB) and keeps a configurable percentage of the disk free via SDLOG_ROTATE (new parameter, default 90, so at least 10% free). Cleanup runs at log start rather than boot, so logs can still be downloaded via FTP before they are deleted. See Log Cleanup for details.
  • SDLOG_DIRS_MAX behaviour changed: it is now an orthogonal directory-count cap that runs on top of the new space-based cleanup, and the default is 0 (disabled). Previously it enforced a fixed ~300 MB free-space floor even when set to 0. If you relied on that implicit floor, set SDLOG_ROTATE instead.

Please continue reading for upgrade instructions.

Major Changes

  • TBD

Upgrade Guide

Other changes

Hardware Support

  • TBD

Common

Control

Estimation

  • Added EKF2_POS_LOCK to force constant position fusion while landed, useful for vehicles relying on dead-reckoning sensors (airspeed, optical flow) that provide no aiding on the ground.

Sensors

Simulation

Debug & Logging

  • Asset Tracking: Automatic tracking and logging of external device information including vendor name, firmware and hardware version, serial numbers. Currently supports DroneCAN devices. (PX4-Autopilot#25617)
  • Logger: support for small flash storage (e.g. 128 MB W25N NAND on kakuteh7mini, kakuteh7v2, airbrainh743). Logs can now be written directly to an internal littlefs volume instead of requiring an SD card.
  • Logger: reworked log rotation and cleanup. Log rotation is now on by default, and cleanup runs at log start rather than boot so logs can be downloaded via FTP before being deleted.
    • New SDLOG_MAX_SIZE (default 1024 MB) caps the size of a single log file; once reached, the logger closes the current file and starts a new one.
    • New SDLOG_ROTATE (default 90) sets the maximum disk usage percentage. Cleanup guarantees (100 - SDLOG_ROTATE)% of the disk stays free at all times, even while writing a new log file. Set 0 to disable space-based cleanup, 100 to allow filling the disk completely.
    • SDLOG_DIRS_MAX is now an orthogonal cap on the number of log directories (default 0 = disabled), on top of the space-based cleanup driven by SDLOG_ROTATE and SDLOG_MAX_SIZE. SITL defaults to 7.

Ethernet

  • TBD

uXRCE-DDS / Zenoh / ROS2

  • TBD
  • TBD

RC

  • Parse ELRS Status and Link Statistics TX messages in the CRSF parser.

Multi-Rotor

VTOL

  • TBD

Fixed-wing

  • TBD

Rover

  • TBD

ROS 2

  • TBD