From f22b25428d3559c966728946c79f571edae7c711 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 21 Oct 2020 13:41:26 +0200 Subject: [PATCH] main: allow users board cable to be override --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 72d7338..8d4c61d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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 */