TwoNeedles is the prototype dual fuel-gauge instrument that became the foundation of MainCompass. Two independent analogue needles are rendered on a 240×320 TFT touchscreen via LVGL on an ESP32.
The core challenge — and the reason it exists as a separate project — is the needle geometry math. Each needle has a configurable pivot point, arm length, full-scale angle, empty-scale angle, and rotation direction (clockwise or counter-clockwise). Getting that right in LVGL line-drawing coordinates took iteration.
NeedleConfig structs: each defines pivot point, length, full/empty angles, and sweep direction