add eternal-scan feature

this is useful for aligning factory test features
This commit is contained in:
bunnie 2026-04-13 00:03:42 +08:00
parent b1870e51ea
commit 0c23c5e5bc
2 changed files with 7 additions and 0 deletions

View file

@ -55,6 +55,8 @@ hosted-baosec = ["bao1x-emu", "ux-api/hosted-baosec", "no-gam"]
# temporary feature - remove after we have properly created a camera control API
autotest = []
# factory feature - makes it keep on scanning forever - used for calibrating factory test jigs
eternal-scan = []
with-logo = []
bao1x = ["utralib/bao1x", "blitstr2/bao1x"]

View file

@ -613,6 +613,11 @@ pub fn wrapped_main(main_thread_token: MainThreadToken) -> ! {
display
.draw()
.unwrap_or_else(|_| display_timeout_handler(&udma_global, &mut display));
#[cfg(feature = "eternal-scan")]
{
display.clear();
continue;
}
let mut img =
rqrr::PreparedImage::prepare_from_greyscale(IMAGE_WIDTH, IMAGE_HEIGHT, |x, y| {
frame[y * IMAGE_WIDTH + x]