mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 06:07:48 +00:00
[cli] disallow concurrent commands (#6695)
This commit disallows concurrent commands. With this commit, the CLI only execute a new command after it complete the previous command. CLI can also prompt properly after the command execution is done. Other fixes and enhancements: - Fixes premature command prompt - Add ping async command for ping in async mode: output Done immediately but print ping responses later on. - Fixes networkdiagnostic get outputs multiple Done by always waiting for 5 seconds.
This commit is contained in:
@@ -58,6 +58,7 @@ proc wait_for {command success {failure {[\r\n]FAILURE_NOT_EXPECTED[\r\n]}}} {
|
||||
}
|
||||
|
||||
proc expect_line {line} {
|
||||
set timeout 10
|
||||
expect -re "\[\r\n \]($line)(?=\[\r\n>\])"
|
||||
return $expect_out(1,string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user