mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 23:43:42 +00:00
add SCPI API for dwell time
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_15 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
Some checks failed
Build / PC_Application_Ubuntu (push) Has been cancelled
Build / PC_Application_RPi5 (push) Has been cancelled
Build / PC_Application_Windows (push) Has been cancelled
Build / PC_Application_OSX (push) Has been cancelled
Build / PC_Application_OSX_15 (push) Has been cancelled
Build / Embedded_Firmware (push) Has been cancelled
HIL_Tests / Get_Repository (push) Has been cancelled
Unit_Tests / Tests (push) Has been cancelled
HIL_Tests / PC_Application_RPi5 (push) Has been cancelled
HIL_Tests / Embedded_Firmware (push) Has been cancelled
HIL_Tests / HIL (push) Has been cancelled
This commit is contained in:
parent
5cb28b0122
commit
bf028e2d21
3 changed files with 17 additions and 0 deletions
|
|
@ -884,6 +884,7 @@ nlohmann::json VNA::toJSON()
|
|||
sweep["power"] = power;
|
||||
sweep["points"] = settings.npoints;
|
||||
sweep["IFBW"] = settings.bandwidth;
|
||||
sweep["dwellTime"] = settings.dwellTime;
|
||||
sweep["averages"] = averages;
|
||||
j["sweep"] = sweep;
|
||||
|
||||
|
|
@ -922,6 +923,7 @@ void VNA::fromJSON(nlohmann::json j)
|
|||
// restore sweep settings, keep current value as default in case of missing entry
|
||||
SetPoints(sweep.value("points", settings.npoints));
|
||||
SetIFBandwidth(sweep.value("IFBW", settings.bandwidth));
|
||||
SetDwellTime(sweep.value("dwellTime", settings.dwellTime));
|
||||
SetAveraging(sweep.value("averages", averages));
|
||||
if(sweep.contains("frequency")) {
|
||||
auto freq = sweep["frequency"];
|
||||
|
|
@ -1561,6 +1563,17 @@ void VNA::SetupSCPI()
|
|||
}, [=](QStringList) -> QString {
|
||||
return QString::number(settings.bandwidth);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("DWELLtime", [=](QStringList params) -> QString {
|
||||
double newval;
|
||||
if(!SCPI::paramToDouble(params, 0, newval)) {
|
||||
return SCPI::getResultName(SCPI::Result::Error);
|
||||
} else {
|
||||
SetDwellTime(newval);
|
||||
return SCPI::getResultName(SCPI::Result::Empty);
|
||||
}
|
||||
}, [=](QStringList) -> QString {
|
||||
return QString::number(settings.dwellTime);
|
||||
}));
|
||||
scpi_acq->add(new SCPICommand("POINTS", [=](QStringList params) -> QString {
|
||||
unsigned long long newval;
|
||||
if(!SCPI::paramToULongLong(params, 0, newval)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue