Merge branch 'M17_AX25_FM' into I2C

This commit is contained in:
Jonathan Naylor 2020-12-15 16:21:51 +00:00
commit 4d08e23127
12 changed files with 3294 additions and 3289 deletions

View file

@ -147,23 +147,28 @@ bool CPOCSAGControl::readNetwork()
addAddress(functional, output->m_ric, output->m_buffer);
char rubric[20U];
std::string out;
switch (functional) {
case FUNCTIONAL_ALPHANUMERIC:
output->m_text = std::string((char*)(data + 4U), length - 4U);
switch (output->m_ric) {
case 4512U:
decodeROT1(output->m_text, 3U, output->m_display);
LogDebug("Message to %07u, func Alphanumeric: (%u) \"%s\"", output->m_ric, output->m_text.at(1U) - 0x1FU, output->m_display.c_str());
::sprintf(rubric, "(%u) \"", output->m_text.at(1U) - 0x1FU);
decodeROT1(output->m_text, 3U, out);
output->m_display = rubric + out + "\"";
break;
case 4520U:
decodeROT1(output->m_text, 2U, output->m_display);
LogDebug("Message to %07u, func Alphanumeric: (%u-%u) \"%s\"", output->m_ric, output->m_text.at(0U) - 0x1FU, output->m_text.at(1U) - 0x20U, output->m_display.c_str());
::sprintf(rubric, "(%u-%u) \"", output->m_text.at(0U) - 0x1FU, output->m_text.at(1U) - 0x20U);
decodeROT1(output->m_text, 2U, out);
output->m_display = rubric + out + "\"";
break;
default:
output->m_display = output->m_text;
LogDebug("Message to %07u, func Alphanumeric: \"%s\"", output->m_ric, output->m_display.c_str());
output->m_display = "\"" + output->m_text + "\"";
break;
}
LogDebug("Message to %07u, func Alphanumeric: %s", output->m_ric, output->m_display.c_str());
packASCII(output->m_text, output->m_buffer);
break;
case FUNCTIONAL_NUMERIC: