mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-05 14:35:23 +00:00
Save/load trace and graph setup
This commit is contained in:
parent
b91f431473
commit
9ad8def2ea
33 changed files with 605 additions and 28 deletions
|
|
@ -293,6 +293,24 @@ void SpectrumAnalyzer::initializeDevice()
|
|||
window->getDevice()->Configure(settings);
|
||||
}
|
||||
|
||||
nlohmann::json SpectrumAnalyzer::toJSON()
|
||||
{
|
||||
nlohmann::json j;
|
||||
j["traces"] = traceModel.toJSON();
|
||||
j["tiles"] = central->toJSON();
|
||||
return j;
|
||||
}
|
||||
|
||||
void SpectrumAnalyzer::fromJSON(nlohmann::json j)
|
||||
{
|
||||
if(j.contains("traces")) {
|
||||
traceModel.fromJSON(j["traces"]);
|
||||
}
|
||||
if(j.contains("tiles")) {
|
||||
central->fromJSON(j["tiles"]);
|
||||
}
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
void SpectrumAnalyzer::NewDatapoint(Protocol::SpectrumAnalyzerResult d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue