mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-26 18:34:14 +01:00
Fix SCPI parsing for arguments containing ':'; allow lower case calibration file names
This commit is contained in:
parent
253e2d3517
commit
2fbfb96dda
|
|
@ -281,7 +281,7 @@ Calibration::Calibration()
|
|||
return SCPI::getResultName(SCPI::Result::Error);
|
||||
}
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}, nullptr));
|
||||
}, nullptr, false));
|
||||
add(new SCPICommand("LOAD", nullptr, [=](QStringList params) -> QString {
|
||||
if(params.size() != 1) {
|
||||
// no filename given or no calibration active
|
||||
|
|
@ -292,7 +292,7 @@ Calibration::Calibration()
|
|||
return SCPI::getResultName(SCPI::Result::False);
|
||||
}
|
||||
return SCPI::getResultName(SCPI::Result::True);
|
||||
}));
|
||||
}, false));
|
||||
add(&kit);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -442,7 +442,8 @@ QString SCPINode::parse(QString cmd, SCPINode* &lastNode)
|
|||
if(cmd.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
auto splitPos = cmd.indexOf(':');
|
||||
auto cmdName = cmd.split(" ").front();
|
||||
auto splitPos = cmdName.indexOf(':');
|
||||
if(splitPos > 0) {
|
||||
// have not reached a leaf, find next subnode
|
||||
auto subnode = cmd.left(splitPos);
|
||||
|
|
|
|||
Loading…
Reference in a new issue