mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 14:35:23 +00:00
options to load calibration/setup files via command line
This commit is contained in:
parent
855d67d028
commit
6e07be0af5
3 changed files with 25 additions and 7 deletions
|
|
@ -86,6 +86,8 @@ AppWindow::AppWindow(QWidget *parent)
|
|||
parser.addOption(QCommandLineOption({"p","port"}, "Specify port to listen for SCPI commands", "port"));
|
||||
parser.addOption(QCommandLineOption({"d","device"}, "Only allow connections to the specified device", "device"));
|
||||
parser.addOption(QCommandLineOption("no-gui", "Disables the graphical interface"));
|
||||
parser.addOption(QCommandLineOption("cal", "Calibration file to load on startup", "cal"));
|
||||
parser.addOption(QCommandLineOption("setup", "Setup file to load on startup", "setup"));
|
||||
|
||||
parser.process(QCoreApplication::arguments());
|
||||
|
||||
|
|
@ -245,6 +247,12 @@ AppWindow::AppWindow(QWidget *parent)
|
|||
// at least one device available
|
||||
ConnectToDevice();
|
||||
}
|
||||
if(parser.isSet("setup")) {
|
||||
LoadSetup(parser.value("setup"));
|
||||
}
|
||||
if(parser.isSet("cal")) {
|
||||
vna->LoadCalibration(parser.value("cal"));
|
||||
}
|
||||
if(!parser.isSet("no-gui")) {
|
||||
InformationBox::setGUI(true);
|
||||
resize(1280, 800);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue