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))
|
.find(|(_, l)| l.starts_with(start))
|
||||||
.map(|(i, _)| i);
|
.map(|(i, _)| i);
|
||||||
|
|
||||||
log::info!("{:?}", self.lines);
|
|
||||||
|
|
||||||
if let Some(start_idx) = start_idx {
|
if let Some(start_idx) = start_idx {
|
||||||
let mut response = Vec::new();
|
let mut response = Vec::new();
|
||||||
|
|
||||||
|
|||||||
@ -79,6 +79,7 @@ pub struct StateManager<'a> {
|
|||||||
|
|
||||||
impl<'a> StateManager<'a> {
|
impl<'a> StateManager<'a> {
|
||||||
pub fn update(&mut self) {
|
pub fn update(&mut self) {
|
||||||
|
critical_section::with(|_| {
|
||||||
match self.curr_state.update(&mut self.data) {
|
match self.curr_state.update(&mut self.data) {
|
||||||
Some(next_state) => {
|
Some(next_state) => {
|
||||||
self.curr_state = next_state;
|
self.curr_state = next_state;
|
||||||
@ -87,6 +88,7 @@ impl<'a> StateManager<'a> {
|
|||||||
None => {}
|
None => {}
|
||||||
}
|
}
|
||||||
self.data.io.keypad.clear();
|
self.data.io.keypad.clear();
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn draw(&mut self) {
|
pub fn draw(&mut self) {
|
||||||
|
|||||||
@ -95,7 +95,7 @@ where
|
|||||||
Some(response) => {
|
Some(response) => {
|
||||||
return Some((self.fun.clone())(response));
|
return Some((self.fun.clone())(response));
|
||||||
}
|
}
|
||||||
None => self.promise = None,
|
None => {}
|
||||||
}
|
}
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user