Skip to content
Snippets Groups Projects
Commit 4c2d0204 authored by fxk8y's avatar fxk8y :spider:
Browse files

ST: Exporting FxCyanF's startIdx to JSON

parent 95659650
No related branches found
No related tags found
No related merge requests found
......@@ -49,16 +49,22 @@ namespace SiliconTorch {
fxCyan = new SiliconTorch::FxCyanF::FxCyanF();
u32 frq = SiliconTorch::FxCyanF::DefaultFrequency;
u8 res = SiliconTorch::FxCyanF::DefaultResolution;
u32 frq = SiliconTorch::FxCyanF::DefaultFrequency;
u8 res = SiliconTorch::FxCyanF::DefaultResolution;
u16 startIdx = 0;
NVSExplorer::NVSExplorer& nvs = NVSExplorer::NVSExplorer::instance();
frq = nvs.getUnsignedInt(getNameSpace(), "frequency", frq);
res = nvs.getUnsignedInt(getNameSpace(), "resolution", res);
frq = nvs.getUnsignedInt(getNameSpace(), "frequency", frq);
res = nvs.getUnsignedInt(getNameSpace(), "resolution", res);
startIdx = nvs.getUnsignedInt(getNameSpace(), "startIdx", startIdx);
fxCyan->setFrqRes(frq, res);
fxCyan->setBaseChannel(startIdx);
savedCfg["startIdx"] = startIdx;
// re-getting it here because the setter my fail on unsupported values
savedCfg["frequency"] = fxCyan->getFrequency();
savedCfg["resolution"] = fxCyan->getResolution();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment