Mute unexpected response for DebugInit and empty
This commit is contained in:
parent
35d9c7b6fb
commit
8fb05a3010
1 changed files with 8 additions and 4 deletions
|
@ -186,7 +186,8 @@ impl Device{
|
||||||
self.usb_tty.write_to_device(Command::Login);
|
self.usb_tty.write_to_device(Command::Login);
|
||||||
loop {
|
loop {
|
||||||
match self.usb_tty.read_from_device(None){
|
match self.usb_tty.read_from_device(None){
|
||||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {},
|
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||||
|
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||||
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
||||||
Response::ShellPrompt => break,
|
Response::ShellPrompt => break,
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -201,7 +202,8 @@ impl Device{
|
||||||
self.usb_tty.write_to_device(Command::DebugMenu);
|
self.usb_tty.write_to_device(Command::DebugMenu);
|
||||||
loop {
|
loop {
|
||||||
match self.usb_tty.read_from_device(None) {
|
match self.usb_tty.read_from_device(None) {
|
||||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {},
|
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||||
|
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||||
Response::LoginPrompt => {
|
Response::LoginPrompt => {
|
||||||
self.usb_tty.write_to_device(Command::Login);
|
self.usb_tty.write_to_device(Command::Login);
|
||||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
||||||
|
@ -255,7 +257,8 @@ impl Device{
|
||||||
self.usb_tty.write_to_device(Command::Login);
|
self.usb_tty.write_to_device(Command::Login);
|
||||||
loop {
|
loop {
|
||||||
match self.usb_tty.read_from_device(None){
|
match self.usb_tty.read_from_device(None){
|
||||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {},
|
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||||
|
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||||
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
Response::PasswordPrompt => {self.usb_tty.write_to_device(Command::Newline);},
|
||||||
Response::ShellPrompt => break,
|
Response::ShellPrompt => break,
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -270,7 +273,8 @@ impl Device{
|
||||||
loop {
|
loop {
|
||||||
let read_in = self.usb_tty.read_from_device(None);
|
let read_in = self.usb_tty.read_from_device(None);
|
||||||
match read_in {
|
match read_in {
|
||||||
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown | Response::Rebooting => {},
|
Response::PreShellPrompt | Response::Empty | Response::ShuttingDown |
|
||||||
|
Response::DebugInit | Response::EmptyNewline | Response::Rebooting => {},
|
||||||
Response::LoginPrompt => {
|
Response::LoginPrompt => {
|
||||||
self.usb_tty.write_to_device(Command::Login);
|
self.usb_tty.write_to_device(Command::Login);
|
||||||
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
while self.usb_tty.read_from_device(None) != Response::ShellPrompt {};
|
||||||
|
|
Loading…
Add table
Reference in a new issue