add USB check for powerup
This commit is contained in:
parent
c43cc5599e
commit
2f92805c1a
2 changed files with 13 additions and 2 deletions
|
|
@ -648,6 +648,16 @@ impl App {
|
|||
pub fn get_state(&self) -> State {
|
||||
self.state
|
||||
}
|
||||
pub fn should_wake(&self) -> bool {
|
||||
if self.interfaces.usb.powered() {
|
||||
return true;
|
||||
} else {
|
||||
if self.interfaces.adc_core.get_average() > 421 {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO LIST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue