load config from real file
This commit is contained in:
parent
ce223621d1
commit
9e43e6a943
1 changed files with 29 additions and 7 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue