mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
minor tweaks to SSID scan and FCC infra
-fix help string in FCC -try resetting SSID scan state machine after sleep cycle & timeout
This commit is contained in:
parent
53f3ca20f0
commit
b85650f5a6
2 changed files with 9 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ impl<'a> ShellCmdApi<'a> for Fcc {
|
|||
|
||||
fn process(&mut self, args: String::<1024>, env: &mut CommonEnv) -> Result<Option<String::<1024>>, xous::Error> {
|
||||
let mut ret = String::<1024>::new();
|
||||
let helpstring = "fcc [ch 1-14] [rate <code>] [go] [stop] [rev] [res]\nrate code: b[1,2,5.5,11], g[6,9,12,18,24,36,48,54], mcs[0-7]";
|
||||
let helpstring = "fcc [ch 1-11] [euch 1-13] [rate <code>] [go] [stop] [rev] [res]\nrate code: b[1,2,5.5,11], g[6,9,12,18,24,36,48,54], mcs[0-7]";
|
||||
|
||||
// no matter what, we want SSID scanning to be off
|
||||
env.com.set_ssid_scanning(false).expect("couldn't turn off SSID scanning");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ pub fn callback_thread() {
|
|||
let callback_conn = xns.request_connection_blocking(crate::SERVER_NAME_SHELLCHAT).unwrap();
|
||||
let com = Com::new(&xns).unwrap();
|
||||
|
||||
let mut iters = 0; // count how long we've been waiting
|
||||
loop {
|
||||
if CB_RUN.load(Ordering::Relaxed) {
|
||||
log::trace!("checking ssid status");
|
||||
|
|
@ -24,10 +25,17 @@ pub fn callback_thread() {
|
|||
id: 0xdeadbeef, arg1: 0, arg2: 0, arg3: 0, arg4: 0,
|
||||
})).unwrap();
|
||||
CB_RUN.store(false, Ordering::Relaxed);
|
||||
} else {
|
||||
iters += 1;
|
||||
if iters > 11 { // should have gotten a result within 20 seconds...
|
||||
// there may have been stale data in the scan cache, clear it
|
||||
let _ = com.ssid_fetch_as_string().unwrap();
|
||||
}
|
||||
}
|
||||
ticktimer.sleep_ms(2_000).unwrap();
|
||||
} else {
|
||||
ticktimer.sleep_ms(1_000).unwrap();
|
||||
iters = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue