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