mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Sending test bcd message after every page command - need this for testing
This commit is contained in:
@@ -2639,6 +2639,7 @@ void CMMDVMHost::remoteControl()
|
|||||||
text += m_remoteControl->getArgString(i);
|
text += m_remoteControl->getArgString(i);
|
||||||
}
|
}
|
||||||
m_pocsag->sendPage(ric, text);
|
m_pocsag->sendPage(ric, text);
|
||||||
|
m_pocsag->sendBCDPage(ric, "01234");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RCD_CW:
|
case RCD_CW:
|
||||||
|
|||||||
@@ -123,6 +123,31 @@ void CPOCSAGControl::sendPage(unsigned int ric, const std::string& text)
|
|||||||
m_data.push_back(output);
|
m_data.push_back(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CPOCSAGControl::sendBCDPage(unsigned int ric, const std::string& text)
|
||||||
|
{
|
||||||
|
if (!m_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
POCSAGData* output = new POCSAGData;
|
||||||
|
|
||||||
|
output->m_ric = ric;
|
||||||
|
output->m_text = text;
|
||||||
|
|
||||||
|
addAddress(FUNCTIONAL_NUMERIC, ric, output->m_buffer);
|
||||||
|
|
||||||
|
LogDebug("Local message to %07u, func NUMERIC: \"%s\"", ric, text.c_str());
|
||||||
|
|
||||||
|
packNumeric(text, output->m_buffer);
|
||||||
|
|
||||||
|
// Ensure data is an even number of words
|
||||||
|
if ((output->m_buffer.size() % 2U) == 1U)
|
||||||
|
output->m_buffer.push_back(POCSAG_IDLE_WORD);
|
||||||
|
|
||||||
|
m_data.push_back(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CPOCSAGControl::readNetwork()
|
bool CPOCSAGControl::readNetwork()
|
||||||
{
|
{
|
||||||
if (m_network == NULL)
|
if (m_network == NULL)
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public:
|
|||||||
~CPOCSAGControl();
|
~CPOCSAGControl();
|
||||||
|
|
||||||
void sendPage(unsigned int ric, const std::string& text);
|
void sendPage(unsigned int ric, const std::string& text);
|
||||||
|
void sendBCDPage(unsigned int ric, const std::string& text);
|
||||||
|
|
||||||
unsigned int readModem(unsigned char* data);
|
unsigned int readModem(unsigned char* data);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user