···11+#pragma once
22+33+/*
44+ * Heading-indicator LED (meltybrain "stationary dot").
55+ *
66+ * The LED sits on PIN_HEAD_LED via a PN2222A (drive high = lit). When the
77+ * robot is spinning with a live heading estimate, the LED is pulsed once per
88+ * revolution as the estimated heading sweeps past a fixed reference angle.
99+ * To the eye that paints a single stationary bright dot the driver can use as
1010+ * "front." When idle (not spinning, or no fresh estimate), it slow-blinks as
1111+ * a heartbeat so you can see the firmware is alive.
1212+ *
1313+ * Heading is extrapolated from the last estimate using omega so the dot stays
1414+ * crisp even though estimates arrive slower than the control loop.
1515+ */
1616+1717+#include <stdint.h>
1818+#include "estimation/heading_estimate.h"
1919+2020+void head_led_init(void);
2121+2222+/* Feed a fresh heading estimate (call when a new one is available). */
2323+void head_led_on_estimate(const heading_estimate_t *est, uint32_t now_us);
2424+2525+/* Update the LED output. Call every control-loop iteration. */
2626+void head_led_tick(uint32_t now_us);