Fix bug with input handling
This commit is contained in:
parent
3ad6892578
commit
9c582a4de1
@ -141,8 +141,6 @@ impl<'a, 'd> ATCommands<'a, 'd> {
|
||||
.find(|(_, l)| l.starts_with(start))
|
||||
.map(|(i, _)| i);
|
||||
|
||||
log::info!("{:?}", self.lines);
|
||||
|
||||
if let Some(start_idx) = start_idx {
|
||||
let mut response = Vec::new();
|
||||
|
||||
|
||||
16
src/state.rs
16
src/state.rs
@ -79,14 +79,16 @@ pub struct StateManager<'a> {
|
||||
|
||||
impl<'a> StateManager<'a> {
|
||||
pub fn update(&mut self) {
|
||||
match self.curr_state.update(&mut self.data) {
|
||||
Some(next_state) => {
|
||||
self.curr_state = next_state;
|
||||
self.curr_state.init(&mut self.data);
|
||||
critical_section::with(|_| {
|
||||
match self.curr_state.update(&mut self.data) {
|
||||
Some(next_state) => {
|
||||
self.curr_state = next_state;
|
||||
self.curr_state.init(&mut self.data);
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
None => {}
|
||||
}
|
||||
self.data.io.keypad.clear();
|
||||
self.data.io.keypad.clear();
|
||||
})
|
||||
}
|
||||
|
||||
pub fn draw(&mut self) {
|
||||
|
||||
@ -95,7 +95,7 @@ where
|
||||
Some(response) => {
|
||||
return Some((self.fun.clone())(response));
|
||||
}
|
||||
None => self.promise = None,
|
||||
None => {}
|
||||
}
|
||||
return None;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user