mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
make boardtype return the current boardtype when no args given
This commit is contained in:
parent
e6bef77b5f
commit
763c0e8193
1 changed files with 8 additions and 1 deletions
|
|
@ -184,7 +184,14 @@ impl Repl {
|
|||
}
|
||||
"boardtype" => {
|
||||
let one_way = OneWayCounter::new();
|
||||
if args.len() != 1 {
|
||||
if args.len() == 0 {
|
||||
crate::println!(
|
||||
"Board type is set to: {:?}",
|
||||
one_way.get_decoded::<bao1x_api::BoardTypeCoding>().expect("owc coding error")
|
||||
);
|
||||
self.abort_cmd();
|
||||
return Ok(());
|
||||
} else if args.len() != 1 {
|
||||
return Err(Error::help("boardtype [dabao | baosec | oem]"));
|
||||
}
|
||||
let new_type = match args[0].as_str() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue