From 02d3f573cfa8dfe1561fdb9ba555e04ed14366cf Mon Sep 17 00:00:00 2001 From: pgdalmeida Date: Wed, 26 Aug 2026 14:14:49 +0200 Subject: [PATCH] Image rotation is now configurable via Camera.rotation_deg --- config/config.example.ini | 4 ++++ docs/architecture.md | 2 +- docs/configuration.md | 1 + docs/modules-reference.md | 2 +- include/fgc/Config.h | 2 ++ include/fgc/ImagePipeline.h | 11 ++++++----- include/fgc/ui/UiSnapshot.h | 1 + src/camera/ImagePipeline.cpp | 23 +++++++++++++++++++++-- src/core/Application.cpp | 2 ++ src/core/Config.cpp | 4 ++++ src/ui/TuiUi.cpp | 3 +++ tests/test_config.cpp | 5 +++++ 12 files changed, 51 insertions(+), 9 deletions(-) diff --git a/config/config.example.ini b/config/config.example.ini index 28964cb..cb21a61 100644 --- a/config/config.example.ini +++ b/config/config.example.ini @@ -56,6 +56,10 @@ white_balance_auto = true ; JPEG XL encoding. distance: 0 = lossless, ~0.8 = near-lossless (default); effort 1..9. jxl_distance = 0.8 jxl_effort = 4 +; Clockwise rotation applied to saved images: 0, 90, 180 or 270. Depends on how the +; camera is mounted. 0 = store frames exactly as the sensor delivers them. +; (Builds before this key existed always rotated 90 CCW, i.e. 270.) +rotation_deg = 0 [Capture] ; How a frame is acquired at each waypoint, and the quality bar it must clear. diff --git a/docs/architecture.md b/docs/architecture.md index 1bab1db..a0f7629 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -79,7 +79,7 @@ corrupted. seeds exposure/gain from the per-angle store, software-triggers **one** frame, measures it, corrects and re-shoots until it passes or the budget runs out. See *Image capture* below. 6. **Frame handling** — the accepted `Frame` goes to the callback, which `submit()`s it to the - `ImagePipeline`. The worker rotates it 90° CCW, encodes JPEG XL (or copies the demo image), writes + `ImagePipeline`. The worker rotates it by `Camera.rotation_deg`, encodes JPEG XL (or copies the demo image), writes `/