app/led_subsystem.h

one object that owns the whole LED highlight stack (L5).

Bundles the framebuffer/driver (LedController + SimLedDriver), the policy (LedAssist), and the engine-backed queries (legal moves + hint), wired together. Callers register listener() with a GameSession and — on hardware — hand scannerObserver() to the board scanner. In pure simulation it’s a harmless no-op observer (nothing is displayed) that still runs the policy.

Driver note: until the L1 SpiLedDriver lands, this holds a SimLedDriver, so the full policy runs and is inspectable via controller(), but no photons hit the board. Swapping the driver is the only change L1 makes here.

namespace kirin
class LedSubsystem
#include <led_subsystem.h>

Public Functions

explicit LedSubsystem(IEngine &engine, const LedAssistConfig &config = configForPreset(AssistPreset::LegalPlusHints))
inline GameSessionListener *listener()
inline ScannerObserver scannerObserver()
inline void setConfig(const LedAssistConfig &c)
inline void setPreset(AssistPreset p)
inline const LedAssistConfig &config() const
inline void setRenderListener(std::function<void()> onRendered)
inline LedController &controller()
inline LedAssist &assist()

Private Members

SimLedDriver driver_
LedController controller_ = {driver_}
EngineLegalMoveSource legal_
EngineHintSource hint_
LedAssist assist_