1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-18 07:35:47 -05:00

Scope GUI: refactor amp offset

This commit is contained in:
f4exb 2021-06-27 10:10:28 +02:00
parent 70167c0ed8
commit f886f7d400
17 changed files with 159 additions and 252 deletions

View File

@ -73,8 +73,6 @@ void InterferometerWebAPIAdapter::webapiFormatChannelSettings(
swgScope->getTracesData()->back()->setHasTextOverlay(traceIt->m_hasTextOverlay ? 1 : 0);
swgScope->getTracesData()->back()->setStreamIndex(traceIt->m_streamIndex);
swgScope->getTracesData()->back()->setOfs(traceIt->m_ofs);
swgScope->getTracesData()->back()->setOfsCoarse(traceIt->m_ofsCoarse);
swgScope->getTracesData()->back()->setOfsFine(traceIt->m_ofsFine);
swgScope->getTracesData()->back()->setProjectionType((int) traceIt->m_projectionType);
swgScope->getTracesData()->back()->setTextOverlay(new QString(traceIt->m_textOverlay));
swgScope->getTracesData()->back()->setTraceColor(qColorToInt(traceIt->m_traceColor));
@ -214,12 +212,6 @@ void InterferometerWebAPIAdapter::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofs").arg(i))) {
scopeSettings.m_tracesData.back().m_ofs = traceData->getOfs();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofsCoarse").arg(i))) {
scopeSettings.m_tracesData.back().m_ofsCoarse = traceData->getOfsCoarse();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofsFine").arg(i))) {
scopeSettings.m_tracesData.back().m_ofsFine = traceData->getOfsFine();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].projectionType").arg(i))) {
scopeSettings.m_tracesData.back().m_projectionType = (Projector::ProjectionType) traceData->getProjectionType();
}

View File

@ -90,8 +90,6 @@ void ChannelAnalyzerWebAPIAdapter::webapiFormatChannelSettings(
swgScope->getTracesData()->back()->setHasTextOverlay(traceIt->m_hasTextOverlay ? 1 : 0);
swgScope->getTracesData()->back()->setStreamIndex(traceIt->m_streamIndex);
swgScope->getTracesData()->back()->setOfs(traceIt->m_ofs);
swgScope->getTracesData()->back()->setOfsCoarse(traceIt->m_ofsCoarse);
swgScope->getTracesData()->back()->setOfsFine(traceIt->m_ofsFine);
swgScope->getTracesData()->back()->setProjectionType((int) traceIt->m_projectionType);
swgScope->getTracesData()->back()->setTextOverlay(new QString(traceIt->m_textOverlay));
swgScope->getTracesData()->back()->setTraceColor(qColorToInt(traceIt->m_traceColor));
@ -280,12 +278,6 @@ void ChannelAnalyzerWebAPIAdapter::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofs").arg(i))) {
scopeSettings.m_tracesData.back().m_ofs = traceData->getOfs();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofsCoarse").arg(i))) {
scopeSettings.m_tracesData.back().m_ofsCoarse = traceData->getOfsCoarse();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].ofsFine").arg(i))) {
scopeSettings.m_tracesData.back().m_ofsFine = traceData->getOfsFine();
}
if (channelSettingsKeys.contains(QString("scopeConfig.tracesData[%1].projectionType").arg(i))) {
scopeSettings.m_tracesData.back().m_projectionType = (Projector::ProjectionType) traceData->getProjectionType();
}

View File

@ -426,11 +426,9 @@ AISDemodGUI::AISDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
traceDataI.m_projectionType = Projector::ProjectionReal;
traceDataI.m_amp = 1.0; // for -1 to +1
traceDataI.m_ofs = 0.0; // vertical offset
traceDataI.m_ofsCoarse = 0;
traceDataQ.m_projectionType = Projector::ProjectionImag;
traceDataQ.m_amp = 1.0;
traceDataQ.m_ofs = 0.0;
traceDataQ.m_ofsCoarse = 0;
ui->scopeGUI->changeTrace(0, traceDataI);
ui->scopeGUI->addTrace(traceDataQ);
ui->scopeGUI->setDisplayMode(GLScopeSettings::DisplayXYV);

View File

@ -255,7 +255,6 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
GLScopeSettings::TraceData traceData;
traceData.m_amp = 2.0; // amplification factor
traceData.m_ofs = 0.5; // direct offset
traceData.m_ofsCoarse = 50; // this is 50 coarse steps
ui->scopeGUI->changeTrace(0, traceData);
ui->scopeGUI->focusOnTrace(0); // re-focus to take changes into account in the GUI
GLScopeSettings::TriggerData triggerData;

View File

@ -371,11 +371,9 @@ IEEE_802_15_4_ModGUI::IEEE_802_15_4_ModGUI(PluginAPI* pluginAPI, DeviceUISet *de
traceDataI.m_projectionType = Projector::ProjectionReal;
traceDataI.m_amp = 1.0; // for -1 to +1
traceDataI.m_ofs = 0.0; // vertical offset
traceDataI.m_ofsCoarse = 0;
traceDataQ.m_projectionType = Projector::ProjectionImag;
traceDataQ.m_amp = 1.0;
traceDataQ.m_ofs = 0.0;
traceDataQ.m_ofsCoarse = 0;
ui->scopeGUI->changeTrace(0, traceDataI);
ui->scopeGUI->addTrace(traceDataQ);
ui->scopeGUI->setDisplayMode(GLScopeSettings::DisplayPol);

View File

@ -501,11 +501,9 @@ AISModGUI::AISModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
traceDataI.m_projectionType = Projector::ProjectionReal;
traceDataI.m_amp = 1.0; // for -1 to +1
traceDataI.m_ofs = 0.0; // vertical offset
traceDataI.m_ofsCoarse = 0;
traceDataQ.m_projectionType = Projector::ProjectionImag;
traceDataQ.m_amp = 1.0;
traceDataQ.m_ofs = 0.0;
traceDataQ.m_ofsCoarse = 0;
ui->scopeGUI->changeTrace(0, traceDataI);
ui->scopeGUI->addTrace(traceDataQ);
ui->scopeGUI->setDisplayMode(GLScopeSettings::DisplayPol);

View File

@ -93,8 +93,6 @@ QByteArray GLScopeSettings::serialize() const
s.writeS32(20 + 16*i, (int) traceDataIt->m_projectionType);
s.writeFloat(21 + 16*i, traceDataIt->m_amp);
s.writeS32(22 + 16*i, traceDataIt->m_ofsCoarse);
s.writeS32(23 + 16*i, traceDataIt->m_ofsFine);
s.writeS32(24 + 16*i, traceDataIt->m_traceDelayCoarse);
s.writeS32(25 + 16*i, traceDataIt->m_traceDelayFine);
s.writeFloat(26 + 16*i, traceDataIt->m_traceColorR);
@ -169,10 +167,6 @@ bool GLScopeSettings::deserialize(const QByteArray& data)
d.readS32(20 + 16*iTrace, &intValue, 0);
m_tracesData.back().m_projectionType = (Projector::ProjectionType) intValue;
d.readFloat(21 + 16*iTrace, &m_tracesData.back().m_amp, 1.0f);
d.readS32(22 + 16*iTrace, &intValue, 0);
m_tracesData.back().m_ofsCoarse = intValue;
d.readS32(23 + 16*iTrace, &intValue, 0);
m_tracesData.back().m_ofsFine = intValue;
d.readS32(24 + 16*iTrace, &intValue, 0);
m_tracesData.back().m_traceDelayCoarse = intValue;
d.readS32(25 + 16*iTrace, &intValue, 0);

View File

@ -46,8 +46,6 @@ public:
Projector::ProjectionType m_projectionType; //!< Complex to real projection type
float m_amp; //!< Amplification factor
float m_ofs; //!< Offset factor
int m_ofsCoarse; //!< Coarse offset slider value
int m_ofsFine; //!< Fine offset slider value
int m_traceDelay; //!< Trace delay in number of samples
int m_traceDelayCoarse; //!< Coarse delay slider value
int m_traceDelayFine; //!< Fine delay slider value
@ -81,8 +79,6 @@ public:
m_projectionType = Projector::ProjectionReal;
m_amp = 1.0f;
m_ofs = 0.0f;
m_ofsCoarse = 0;
m_ofsFine = 0;
m_traceDelay = 0;
m_traceDelayCoarse = 0;
m_traceDelayFine = 0;

View File

@ -10891,14 +10891,6 @@ margin-bottom: 20px;
"format" : "float",
"description" : "Offset factor"
},
"ofsCoarse" : {
"type" : "integer",
"description" : "Coarse offset slider value"
},
"ofsFine" : {
"type" : "integer",
"description" : "Fine offset slider value"
},
"traceDelay" : {
"type" : "integer",
"description" : "Trace delay in number of samples"
@ -46850,7 +46842,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-06-26T10:56:36.867+02:00
Generated 2021-06-27T09:52:10.238+02:00
</div>
</div>
</div>

View File

@ -18,12 +18,6 @@ TraceData:
description: Offset factor
type: number
format: float
ofsCoarse:
description: Coarse offset slider value
type: integer
ofsFine:
description: Fine offset slider value
type: integer
traceDelay:
description: Trace delay in number of samples
type: integer

View File

@ -188,8 +188,7 @@ QByteArray GLScopeGUI::serialize() const
{
s.writeS32(20 + 16*i, (int) traceDataIt->m_projectionType);
s.writeFloat(21 + 16*i, traceDataIt->m_amp);
s.writeS32(22 + 16*i, traceDataIt->m_ofsCoarse);
s.writeS32(23 + 16*i, traceDataIt->m_ofsFine);
s.writeFloat(22 + 16*i, traceDataIt->m_ofs);
s.writeS32(24 + 16*i, traceDataIt->m_traceDelayCoarse);
s.writeS32(25 + 16*i, traceDataIt->m_traceDelayFine);
s.writeFloat(26 + 16*i, traceDataIt->m_traceColorR);
@ -278,10 +277,7 @@ bool GLScopeGUI::deserialize(const QByteArray& data)
d.readS32(20 + 16*iTrace, &intValue, 0);
traceData.m_projectionType = (Projector::ProjectionType) intValue;
d.readFloat(21 + 16*iTrace, &traceData.m_amp, 1.0f);
d.readS32(22 + 16*iTrace, &intValue, 0);
traceData.m_ofsCoarse = intValue;
d.readS32(23 + 16*iTrace, &intValue, 0);
traceData.m_ofsFine = intValue;
d.readFloat(22 + 16*iTrace, &traceData.m_ofs, 0.0f);
d.readS32(24 + 16*iTrace, &intValue, 0);
traceData.m_traceDelayCoarse = intValue;
d.readS32(25 + 16*iTrace, &intValue, 0);
@ -893,6 +889,13 @@ void GLScopeGUI::on_ofsFine_valueChanged(int value)
changeCurrentTrace();
}
void GLScopeGUI::on_ofsExp_valueChanged(int value)
{
(void) value;
setAmpOfsDisplay();
changeCurrentTrace();
}
void GLScopeGUI::on_traceDelayCoarse_valueChanged(int value)
{
(void) value;
@ -1268,35 +1271,14 @@ void GLScopeGUI::setAmpScaleDisplay()
void GLScopeGUI::setAmpOfsDisplay()
{
Projector::ProjectionType projectionType = (Projector::ProjectionType) ui->traceMode->currentIndex();
double o = (ui->ofsCoarse->value() * 10.0f) + (ui->ofsFine->value() / 20.0f);
double ofs = (ui->ofsFine->value() / 1000.0) + ui->ofsCoarse->value();
int ofsExp = ui->ofsExp->value();
ui->ofsText->setText(tr("%1").arg(ofs, 0, 'f', 3));
if (projectionType == Projector::ProjectionMagDB)
{
ui->ofsText->setText(tr("%1\ndB").arg(o/10.0f - 100.0f, 0, 'f', 1));
}
else
{
double a;
if ((projectionType == Projector::ProjectionMagLin) || (projectionType == Projector::ProjectionMagSq))
{
a = o/2000.0f;
}
else
{
a = o/1000.0f;
}
if(fabs(a) < 1e-9)
ui->ofsText->setText(tr("%1\np").arg(a * 1e12));
else if(fabs(a) < 1e-6)
ui->ofsText->setText(tr("%1\nn").arg(a * 1e9));
else if(fabs(a) < 1e-3)
ui->ofsText->setText(tr("%1\nµ").arg(a * 1e6));
else if(fabs(a) < 1.0f)
ui->ofsText->setText(tr("%1\nm").arg(a * 1e3));
else
ui->ofsText->setText(tr("%1").arg(a * 1.0));
if (projectionType == Projector::ProjectionMagDB) {
ui->ofsExpText->setText(tr("e%1%2").arg(ofsExp+2 < 0 ? "" : "+").arg(ofsExp+2));
} else {
ui->ofsExpText->setText(tr("e%1%2").arg(ofsExp < 0 ? "" : "+").arg(ofsExp));
}
}
@ -1494,17 +1476,12 @@ void GLScopeGUI::fillTraceData(GLScopeSettings::TraceData& traceData)
traceData.m_hasTextOverlay = (traceData.m_projectionType == Projector::ProjectionMagDB)
|| (traceData.m_projectionType == Projector::ProjectionMagSq);
traceData.m_textOverlay.clear();
double ampValue = ((ui->amp->value() / 1000.0) + ui->ampCoarse->value()) * pow(10.0, ui->ampExp->value());
traceData.m_amp = 1.0 / ampValue;
traceData.m_ofsCoarse = ui->ofsCoarse->value();
traceData.m_ofsFine = ui->ofsFine->value();
if ((traceData.m_projectionType == Projector::ProjectionMagLin) || (traceData.m_projectionType == Projector::ProjectionMagSq)) {
traceData.m_ofs = ((10.0 * ui->ofsCoarse->value()) + (ui->ofsFine->value() / 20.0)) / 2000.0f;
} else {
traceData.m_ofs = ((10.0 * ui->ofsCoarse->value()) + (ui->ofsFine->value() / 20.0)) / 1000.0f;
}
double ofsValue = ((ui->ofsFine->value() / 1000.0) + ui->ofsCoarse->value()) * pow(10.0, ui->ofsExp->value());
traceData.m_ofs = ofsValue;
traceData.m_traceDelayCoarse = ui->traceDelayCoarse->value();
traceData.m_traceDelayFine = ui->traceDelayFine->value();
@ -1537,6 +1514,7 @@ void GLScopeGUI::setTraceUI(const GLScopeSettings::TraceData& traceData)
ui->traceStream->setCurrentIndex(traceData.m_streamIndex);
ui->traceMode->setCurrentIndex((int) traceData.m_projectionType);
double ampValue = 1.0 / traceData.m_amp;
int ampExp;
double ampMant = CalcDb::frexp10(ampValue, &ampExp) * 10.0;
@ -1548,8 +1526,15 @@ void GLScopeGUI::setTraceUI(const GLScopeSettings::TraceData& traceData)
ui->ampExp->setValue(ampExp);
setAmpScaleDisplay();
ui->ofsCoarse->setValue(traceData.m_ofsCoarse);
ui->ofsFine->setValue(traceData.m_ofsFine);
double ofsValue = traceData.m_amp;
int ofsExp;
double ofsMant = CalcDb::frexp10(ofsValue, &ofsExp) * 10.0;
int ofsCoarse = (int) ofsMant;
int ofsFine = round((ofsMant - ofsCoarse) * 1000.0);
ofsExp -= 1;
ui->ofsFine->setValue(ofsFine);
ui->ofsCoarse->setValue(ofsCoarse);
ui->ofsExp->setValue(ofsExp);
setAmpOfsDisplay();
ui->traceDelayCoarse->setValue(traceData.m_traceDelayCoarse);

View File

@ -224,6 +224,7 @@ private slots:
void on_ampExp_valueChanged(int value);
void on_ofsCoarse_valueChanged(int value);
void on_ofsFine_valueChanged(int value);
void on_ofsExp_valueChanged(int value);
void on_traceDelayCoarse_valueChanged(int value);
void on_traceDelayFine_valueChanged(int value);
void on_traceView_toggled(bool checked);

View File

@ -836,26 +836,11 @@ kS/s</string>
</item>
<item>
<layout class="QVBoxLayout" name="ampLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
<property name="spacing">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="ampMantissaLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="ampText">
<property name="minimumSize">
@ -889,9 +874,6 @@ kS/s</string>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -923,18 +905,6 @@ kS/s</string>
</item>
<item>
<layout class="QHBoxLayout" name="ampExponentLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="ampExpText">
<property name="minimumSize">
@ -1013,73 +983,143 @@ kS/s</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="ofsText">
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset value</string>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="ofsLayout">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QSlider" name="ofsCoarse">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>14</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset coarse</string>
</property>
<property name="minimum">
<number>-100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<layout class="QHBoxLayout" name="ofsMantissaLayout">
<item>
<widget class="QLabel" name="ofsText">
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset value</string>
</property>
<property name="text">
<string>0.000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="ofsFine">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>14</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset (fine)</string>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QDial" name="ofsCoarse">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset (coarse)</string>
</property>
<property name="minimum">
<number>-5</number>
</property>
<property name="maximum">
<number>4</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QSlider" name="ofsFine">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>14</height>
</size>
<layout class="QHBoxLayout" name="ofsExponentLayout">
<property name="leftMargin">
<number>6</number>
</property>
<property name="toolTip">
<string>Vertical offset fine</string>
<property name="topMargin">
<number>6</number>
</property>
<property name="maximum">
<number>200</number>
<property name="rightMargin">
<number>6</number>
</property>
<property name="pageStep">
<number>1</number>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
<item>
<widget class="QLabel" name="ofsExpText">
<property name="minimumSize">
<size>
<width>36</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Vertical range value</string>
</property>
<property name="text">
<string>e+0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="ofsExp">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>14</height>
</size>
</property>
<property name="toolTip">
<string>Vertical offset fine</string>
</property>
<property name="minimum">
<number>-10</number>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>

View File

@ -18,12 +18,6 @@ TraceData:
description: Offset factor
type: number
format: float
ofsCoarse:
description: Coarse offset slider value
type: integer
ofsFine:
description: Fine offset slider value
type: integer
traceDelay:
description: Trace delay in number of samples
type: integer

View File

@ -10891,14 +10891,6 @@ margin-bottom: 20px;
"format" : "float",
"description" : "Offset factor"
},
"ofsCoarse" : {
"type" : "integer",
"description" : "Coarse offset slider value"
},
"ofsFine" : {
"type" : "integer",
"description" : "Fine offset slider value"
},
"traceDelay" : {
"type" : "integer",
"description" : "Trace delay in number of samples"
@ -46850,7 +46842,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-06-26T10:56:36.867+02:00
Generated 2021-06-27T09:52:10.238+02:00
</div>
</div>
</div>

View File

@ -38,10 +38,6 @@ SWGTraceData::SWGTraceData() {
m_amp_isSet = false;
ofs = 0.0f;
m_ofs_isSet = false;
ofs_coarse = 0;
m_ofs_coarse_isSet = false;
ofs_fine = 0;
m_ofs_fine_isSet = false;
trace_delay = 0;
m_trace_delay_isSet = false;
trace_delay_coarse = 0;
@ -82,10 +78,6 @@ SWGTraceData::init() {
m_amp_isSet = false;
ofs = 0.0f;
m_ofs_isSet = false;
ofs_coarse = 0;
m_ofs_coarse_isSet = false;
ofs_fine = 0;
m_ofs_fine_isSet = false;
trace_delay = 0;
m_trace_delay_isSet = false;
trace_delay_coarse = 0;
@ -126,8 +118,6 @@ SWGTraceData::cleanup() {
if(text_overlay != nullptr) {
delete text_overlay;
}
@ -155,10 +145,6 @@ SWGTraceData::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&ofs, pJson["ofs"], "float", "");
::SWGSDRangel::setValue(&ofs_coarse, pJson["ofsCoarse"], "qint32", "");
::SWGSDRangel::setValue(&ofs_fine, pJson["ofsFine"], "qint32", "");
::SWGSDRangel::setValue(&trace_delay, pJson["traceDelay"], "qint32", "");
::SWGSDRangel::setValue(&trace_delay_coarse, pJson["traceDelayCoarse"], "qint32", "");
@ -212,12 +198,6 @@ SWGTraceData::asJsonObject() {
if(m_ofs_isSet){
obj->insert("ofs", QJsonValue(ofs));
}
if(m_ofs_coarse_isSet){
obj->insert("ofsCoarse", QJsonValue(ofs_coarse));
}
if(m_ofs_fine_isSet){
obj->insert("ofsFine", QJsonValue(ofs_fine));
}
if(m_trace_delay_isSet){
obj->insert("traceDelay", QJsonValue(trace_delay));
}
@ -305,26 +285,6 @@ SWGTraceData::setOfs(float ofs) {
this->m_ofs_isSet = true;
}
qint32
SWGTraceData::getOfsCoarse() {
return ofs_coarse;
}
void
SWGTraceData::setOfsCoarse(qint32 ofs_coarse) {
this->ofs_coarse = ofs_coarse;
this->m_ofs_coarse_isSet = true;
}
qint32
SWGTraceData::getOfsFine() {
return ofs_fine;
}
void
SWGTraceData::setOfsFine(qint32 ofs_fine) {
this->ofs_fine = ofs_fine;
this->m_ofs_fine_isSet = true;
}
qint32
SWGTraceData::getTraceDelay() {
return trace_delay;
@ -455,12 +415,6 @@ SWGTraceData::isSet(){
if(m_ofs_isSet){
isObjectUpdated = true; break;
}
if(m_ofs_coarse_isSet){
isObjectUpdated = true; break;
}
if(m_ofs_fine_isSet){
isObjectUpdated = true; break;
}
if(m_trace_delay_isSet){
isObjectUpdated = true; break;
}

View File

@ -57,12 +57,6 @@ public:
float getOfs();
void setOfs(float ofs);
qint32 getOfsCoarse();
void setOfsCoarse(qint32 ofs_coarse);
qint32 getOfsFine();
void setOfsFine(qint32 ofs_fine);
qint32 getTraceDelay();
void setTraceDelay(qint32 trace_delay);
@ -115,12 +109,6 @@ private:
float ofs;
bool m_ofs_isSet;
qint32 ofs_coarse;
bool m_ofs_coarse_isSet;
qint32 ofs_fine;
bool m_ofs_fine_isSet;
qint32 trace_delay;
bool m_trace_delay_isSet;