#ifndef LAMP_IR_FILTER_H
#define LAMP_IR_FILTER_H
#include <stdbool.h>
#include <stdint.h>
#define LAMP_IR_ASSERT_MS 10u
#define LAMP_IR_MAX_SAMPLE_GAP_MS 5u
typedef struct {bool high_seen;bool sample_seen;uint32_t high_since_ms;uint32_t last_ms;} lamp_ir_filter;
/* Provisional timing, requires optical and physical response validation.
 * High must persist across timely samples. Low/unavailable/stall resets
 * qualification immediately. Repeated timestamps cannot advance elapsed time. */
bool lamp_ir_filter_update(lamp_ir_filter *f,bool available,bool high,uint32_t now);
#endif
