DSD demod: use more detailed frame status instead of just synchronization indicator

This commit is contained in:
f4exb 2016-08-11 01:09:17 +02:00
parent a1b045b1db
commit 2d48800d90
2 changed files with 14 additions and 6 deletions

View File

@ -40,6 +40,15 @@ unsigned int DSDDemodBaudRates::m_rates[] = {2400, 4800};
unsigned int DSDDemodBaudRates::m_nb_rates = 2;
unsigned int DSDDemodBaudRates::m_defaultRateIndex = 1; // 4800 bauds
char DSDDemodGUI::m_frameTypes[][3] = {
"--", // no frame sync
"HD", // header frame
"PY", // payload super frame not categorized yet
"VO", // voice super frame
"D1", // data type 1 super frame
"D2", // data type 2 super frame
"EN", // end frame
};
DSDDemodGUI* DSDDemodGUI::create(PluginAPI* pluginAPI, DeviceAPI *deviceAPI)
{
@ -440,12 +449,9 @@ void DSDDemodGUI::formatStatusText()
m_signalFormat = signalFormatDStar;
break;
case DSDcc::DSDDecoder::DSDSyncDPMR:
if (m_signalFormat != signalFormatDPMR)
{
memcpy(&m_formatStatusText, " CC: ", 6);
}
sprintf(&m_formatStatusText[6], "%04d", m_dsdDemod->getDecoder().getDPMRDecoder().getColorCode());
m_formatStatusText[0] = (m_dsdDemod->getDecoder().getDPMRDecoder().hasSync() ? 'S' : '-');
sprintf(m_formatStatusText, "%s CC: %04d",
m_frameTypes[(int) m_dsdDemod->getDecoder().getDPMRDecoder().getFrameType()],
m_dsdDemod->getDecoder().getDPMRDecoder().getColorCode());
m_signalFormat = signalFormatDPMR;
break;
default:

View File

@ -101,6 +101,8 @@ private:
MovingAverage<Real> m_channelPowerDbAvg;
int m_tickCount;
static char m_frameTypes[7][3];
explicit DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* parent = NULL);
virtual ~DSDDemodGUI();