load config from real file

This commit is contained in:
Andy Killorin 2025-03-09 20:08:54 -04:00
commit 9e43e6a943
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

View file

@ -5,13 +5,14 @@ use interface::auto::{AutoInterface, Configurable};
#[unsafe(no_mangle)]
pub fn entry(interface: AutoInterface) -> Pin<Box<dyn Future<Output = ()> + Send>> {
pub fn entry(interface: AutoInterface) -> Pin<Box<dyn Future<Output = ()>>> {
Box::pin(auto(interface))
}
#[unsafe(no_mangle)]
pub static NAME: &'static str = "scanseek v1";
const AUTO_GAP: Configurable = Configurable::new("auto minimum gap").range(0. .. 300.).default(140.)
.description("distance (mm) distance measurements must instantaneously drop to indicate a detection. This should line up with the size of the smallest robot you compete against");
const AUTO_SELF_OCCLUSION: Configurable = Configurable::new("auto self occlusion").range(0. .. 200.).default(143.)
@ -23,7 +24,7 @@ pub static CONFIGS: &[Configurable] = &[
AUTO_SELF_OCCLUSION,
];
async fn auto (interface: AutoInterface) {
async fn auto (mut interface: AutoInterface) {
let mut tof_l = Stats::new();
let mut tof_r = Stats::new();
loop {