main: allow users board cable to be override

This commit is contained in:
Gwenhael Goavec-Merou 2020-10-21 13:41:26 +02:00
parent 2170a2af86
commit f22b25428d
1 changed files with 7 additions and 2 deletions

View File

@ -103,8 +103,13 @@ int main(int argc, char **argv)
if (t == cable_list.end()) {
args.cable = "-";
cout << "Board " << args.board << " has not default cable" << endl;
} else
args.cable = (*t).first;
} else {
if (args.cable[0] == '-') { // no use selection
args.cable = (*t).first; // use board default cable
} else {
cout << "Board default cable overridden with " << args.cable << endl;
}
}
}
if (args.cable[0] == '-') { /* if no board and no cable */