All notable changes to this project will be documented in this file.
examples/manual_samplingshows manualsampleNow()usage without the esp_timer while keeping calibration/history stable.examples/json_exportstreams newline-delimited JSON viatoJson()+ ArduinoJson for telemetry pipelines.- Optional average smoothing in
CpuUsageSampleviasmoothedAverage, with configurablesmoothingMode(None,RollingMean,Ewma), rolling window size, and EWMA alpha. getLastSmoothedAverage()helper for quickly reading the latest trend/baseline value when smoothing is enabled.CpuMonitorConfig::usePSRAMBufferstoggle to prefer PSRAM-backed internal history and callback container/snapshot storage throughESPBufferManager, with automatic fallback to normal heap.- Token-based measurement API via
startMeasure()/stopMeasure(token)with precise timing fields (durationUs,durationMs,durationSec) and optional per-window CPU usage inCpuMeasure.
- Removed the library-provided global
cpuMonitor; create and manage your ownESPCpuMonitorinstance (only one active monitor at a time) and updated examples/docs accordingly. - Made
ESPCpuMonitornon-copyable/movable to prevent accidental double-free of FreeRTOS handles. toJson()now exportsavgSmoothedwhen smoothing is enabled and a smoothed sample is available.- Baseline calibration now tracks idle rates per microsecond so code-path measurements can estimate CPU usage across arbitrary measurement durations.
- CI now pins PIOArduino Core to
v6.1.19and installs the ESP32 platform viapio pkg install, restoring PlatformIO compatibility with the currentplatform-espressif32package.
- Idle hook registration now handles the newer IDF/Arduino APIs that return
esp_err_t, preventing false failures on startup.
- Default to the modern
driver/temperature_sensor.hwhen available, with an opt-in legacy path to avoid deprecated driver warnings. - README clarifies that CPU usage is reported as floating-point percentages so sub-1% load is visible.
- CI updated for ESP32-P4: correct board id (
esp32-p4-evboard) and exclusion of unsupported P4 module configs.
- Initial ESPCpuMonitor release: FreeRTOS idle-hook based CPU usage sampling with calibration, periodic timer or manual
sampleNow, per-core and average reporting, ring-buffered history, and per-sample callbacks. - Optional CPU temperature sampling (current and running average) exposed in
CpuUsageSample, ArduinoJson export helper, andgetLastTemperature. - Basic Arduino example sketch.