DSD demod plugin: DMR refactoring: added embedded signalling processing and corresponfing addresses display in slot text

This commit is contained in:
f4exb 2016-09-06 23:35:41 +02:00
parent 627b084682
commit 87bb930a13
3 changed files with 44 additions and 44 deletions

View File

@ -439,7 +439,7 @@ void DSDDemodGUI::formatStatusText()
case DSDcc::DSDDecoder::DSDSyncDMRVoiceP: case DSDcc::DSDDecoder::DSDSyncDMRVoiceP:
if (m_signalFormat != signalFormatDMR) if (m_signalFormat != signalFormatDMR)
{ {
strcpy(m_formatStatusText, "Sta: __ S1: _______ S2: _______"); strcpy(m_formatStatusText, "Sta: __ S1: __________________________ S2: __________________________");
} }
switch (m_dsdDemod->getDecoder().getStationType()) switch (m_dsdDemod->getDecoder().getStationType())
@ -455,8 +455,8 @@ void DSDDemodGUI::formatStatusText()
break; break;
} }
memcpy(&m_formatStatusText[12], m_dsdDemod->getDecoder().getSlot0Text(), 7); memcpy(&m_formatStatusText[12], m_dsdDemod->getDecoder().getSlot0Text(), 26);
memcpy(&m_formatStatusText[24], m_dsdDemod->getDecoder().getSlot1Text(), 7); memcpy(&m_formatStatusText[43], m_dsdDemod->getDecoder().getSlot1Text(), 26);
m_signalFormat = signalFormatDMR; m_signalFormat = signalFormatDMR;
break; break;
case DSDcc::DSDDecoder::DSDSyncDStarHeaderN: case DSDcc::DSDDecoder::DSDSyncDStarHeaderN:
@ -488,7 +488,7 @@ void DSDDemodGUI::formatStatusText()
} }
} }
m_formatStatusText[62] = '\0'; m_formatStatusText[72] = '\0';
m_signalFormat = signalFormatDStar; m_signalFormat = signalFormatDStar;
break; break;
case DSDcc::DSDDecoder::DSDSyncDPMR: case DSDcc::DSDDecoder::DSDSyncDPMR:
@ -505,7 +505,7 @@ void DSDDemodGUI::formatStatusText()
break; break;
} }
m_formatStatusText[64] = '\0'; // guard m_formatStatusText[72] = '\0'; // guard
} }
void DSDDemodGUI::tick() void DSDDemodGUI::tick()

View File

@ -92,7 +92,7 @@ private:
ChannelMarker m_channelMarker; ChannelMarker m_channelMarker;
bool m_basicSettingsShown; bool m_basicSettingsShown;
bool m_doApplySettings; bool m_doApplySettings;
char m_formatStatusText[64+1]; //!< Fixed signal format dependent status text char m_formatStatusText[72+1]; //!< Fixed signal format dependent status text
SignalFormat m_signalFormat; SignalFormat m_signalFormat;
ThreadedSampleSink* m_threadedChannelizer; ThreadedSampleSink* m_threadedChannelizer;

View File

@ -602,6 +602,42 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QToolButton" name="slot1On">
<property name="toolTip">
<string>TDMA slot1 or FDMA unique slot voice on/off</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/slot1_off.png</normaloff>
<normalon>:/slot1_on.png</normalon>:/slot1_off.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="slot2On">
<property name="toolTip">
<string>TDMA slot2 voice on/off</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/slot2_off.png</normaloff>
<normalon>:/slot2_on.png</normalon>:/slot2_off.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="squelchLabel"> <widget class="QLabel" name="squelchLabel">
<property name="text"> <property name="text">
@ -744,7 +780,7 @@
<widget class="QLabel" name="formatStatusText"> <widget class="QLabel" name="formatStatusText">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>470</width> <width>535</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -764,7 +800,7 @@
<number>2</number> <number>2</number>
</property> </property>
<property name="text"> <property name="text">
<string>A123456789B123456789C123456789D123456789E123456789F123456789G123</string> <string>A123456789B123456789C123456789D123456789E123456789F123456789G123456789H1</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -781,42 +817,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QToolButton" name="slot1On">
<property name="toolTip">
<string>TDMA slot1 or FDMA unique slot voice on/off</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/slot1_off.png</normaloff>
<normalon>:/slot1_on.png</normalon>:/slot1_off.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="slot2On">
<property name="toolTip">
<string>TDMA slot2 voice on/off</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrbase/resources/res.qrc">
<normaloff>:/slot2_off.png</normaloff>
<normalon>:/slot2_on.png</normalon>:/slot2_off.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>