From bb80ba41dec3c5f5337586c1955509e4dd71cbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 26 Aug 2026 23:07:52 +0200 Subject: [PATCH] Remove the docs directory The firmware design docs were published to meshtastic/meshtastic in #11488 and the directory was deleted. bme680_iaq_replay.md re-added it. The replay harness build command moves into the header comment of bin/bme680_iaq_replay.cpp, the only file that referenced the document. --- bin/bme680_iaq_replay.cpp | 3 ++- docs/bme680_iaq_replay.md | 54 --------------------------------------- 2 files changed, 2 insertions(+), 55 deletions(-) delete mode 100644 docs/bme680_iaq_replay.md diff --git a/bin/bme680_iaq_replay.cpp b/bin/bme680_iaq_replay.cpp index 62d0a5286e0..aa65c43c94f 100644 --- a/bin/bme680_iaq_replay.cpp +++ b/bin/bme680_iaq_replay.cpp @@ -1,5 +1,6 @@ // Replays a captured BME680 CSV trace (gas_ohms,rh[,bsec_iaq]) through -// BME680IaqEstimator for offline tuning. See docs/bme680_iaq_replay.md. +// BME680IaqEstimator for offline tuning. Build from the repo root: +// c++ -std=c++17 -O2 -I src -o /tmp/iaq_replay bin/bme680_iaq_replay.cpp src/modules/Telemetry/Sensor/BME680IaqEstimator.cpp #include "modules/Telemetry/Sensor/BME680IaqEstimator.h" diff --git a/docs/bme680_iaq_replay.md b/docs/bme680_iaq_replay.md deleted file mode 100644 index 5fc8d96df33..00000000000 --- a/docs/bme680_iaq_replay.md +++ /dev/null @@ -1,54 +0,0 @@ -# BME680 IAQ replay harness - -`bin/bme680_iaq_replay.cpp` replays a captured sensor trace through the in-tree -`BME680IaqEstimator` on a dev machine, for tuning the estimator's constants -against recorded Bosch BSEC output. The estimator is pure math with no platform -dependencies, so a trace replays in milliseconds - edit the constants in -`src/modules/Telemetry/Sensor/BME680IaqEstimator.h`, recompile, rerun. - -## Build - -From the repo root: - -```bash -c++ -std=c++17 -O2 -I src -o /tmp/iaq_replay \ - bin/bme680_iaq_replay.cpp src/modules/Telemetry/Sensor/BME680IaqEstimator.cpp -``` - -## Input - -CSV on stdin or as a file argument, one sample per line: - -```text -gas_ohms,relative_humidity[,bsec_iaq] -``` - -Lines starting with `#` are ignored; a single non-numeric header row is -tolerated; any other malformed line is reported on stderr and skipped. - -## Capturing a trace - -On a firmware build that still links BSEC (any release tag before the BSEC -removal), add one log line to `BME680Sensor::getMetrics` in the BSEC branch: - -```cpp -LOG_INFO("IAQCSV,%.0f,%.2f,%.0f", bme680.getData(BSEC_OUTPUT_RAW_GAS).signal, - bme680.getData(BSEC_OUTPUT_SENSOR_HEAT_COMPENSATED_HUMIDITY).signal, - bme680.getData(BSEC_OUTPUT_IAQ).signal); -``` - -then extract the columns from the serial log: - -```bash -grep -o 'IAQCSV,.*' serial.log | cut -d, -f2- > trace.csv -``` - -BSEC's `RAW_GAS` and heat-compensated humidity are exactly the estimator's -inputs, so one physical sensor feeds both algorithms identically. - -## Output - -Per-sample CSV `n,gas_ohms,rh,est_iaq,bsec_iaq` on stdout (empty `est_iaq` -during the estimator's warm-up/burn-in window), plus a stderr summary with the -mean absolute error and UI-band agreement against the `bsec_iaq` column, using -the same 0-500 band thresholds the device screen applies.