#ifndef HYPERDRM_LAYOUT_REFRESH_H #define HYPERDRM_LAYOUT_REFRESH_H #define LAYOUT_REFRESH_MS 5000 static ReceiverProbe layout_probe={.fd=-1}; static uint64_t next_layout_check,last_layout_check; static unsigned layout_updates,layout_probe_generation; static char layout_error[128]; static void layout_refresh_reset(uint64_t due){ probe_close(&layout_probe);layout_probe.stage=TEST_IDLE;next_layout_check=due; } static bool layout_mapping_changed(const LedBlend *next,unsigned count){ if(count!=led_count || !led_blends)return true; for(unsigned i=0;i=next_layout_check){ layout_probe_generation=calibration_generation;probe_begin(&layout_probe,&target,now);next_layout_check=now+LAYOUT_REFRESH_MS; } } #endif