main: deduplicate messages about board's default cable/user's selection, display warn always instead of when verbose mode is set.
This commit is contained in:
parent
4161c79920
commit
6161e550c1
|
|
@ -161,10 +161,8 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
/* search for cable */
|
/* search for cable */
|
||||||
auto t = cable_list.find(board->cable_name);
|
auto t = cable_list.find(board->cable_name);
|
||||||
if (t == cable_list.end()) {
|
if (t != cable_list.end()) {
|
||||||
cout << "Board " << args.board << " has not default cable" << endl;
|
if (args.cable[0] == '-') { // no user selection
|
||||||
} else {
|
|
||||||
if (args.cable[0] == '-') { // no use selection
|
|
||||||
args.cable = (*t).first; // use board default cable
|
args.cable = (*t).first; // use board default cable
|
||||||
} else {
|
} else {
|
||||||
cout << "Board default cable overridden with " << args.cable << endl;
|
cout << "Board default cable overridden with " << args.cable << endl;
|
||||||
|
|
@ -187,8 +185,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.cable[0] == '-') { /* if no board and no cable */
|
if (args.cable[0] == '-') { /* if no board and no cable */
|
||||||
if (args.verbose > 0)
|
printWarn("No cable or board specified: using direct ft2232 interface");
|
||||||
cout << "No cable or board specified: using direct ft2232 interface" << endl;
|
|
||||||
args.cable = "ft2232";
|
args.cable = "ft2232";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue