Small System Fusion cleanups.
This commit is contained in:
parent
833822d388
commit
151b95e5d3
1 changed files with 14 additions and 13 deletions
|
@ -54,7 +54,7 @@ bool CYSFControl::writeModem(unsigned char *data)
|
||||||
unsigned char fi = data[1U] & YSF_FI_MASK;
|
unsigned char fi = data[1U] & YSF_FI_MASK;
|
||||||
unsigned char dt = data[1U] & YSF_DT_MASK;
|
unsigned char dt = data[1U] & YSF_DT_MASK;
|
||||||
|
|
||||||
if (valid && m_state == RS_LISTENING) {
|
if (type == TAG_DATA && valid && m_state == RS_LISTENING) {
|
||||||
m_frames = 0U;
|
m_frames = 0U;
|
||||||
m_timeoutTimer.start();
|
m_timeoutTimer.start();
|
||||||
m_display->writeFusion("XXXXXX");
|
m_display->writeFusion("XXXXXX");
|
||||||
|
@ -62,23 +62,24 @@ bool CYSFControl::writeModem(unsigned char *data)
|
||||||
LogMessage("YSF, received RF header");
|
LogMessage("YSF, received RF header");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fi == YSF_DT_TERMINATOR_CHANNEL) {
|
if (m_state != RS_RELAYING_RF_AUDIO)
|
||||||
if (m_state == RS_RELAYING_RF_AUDIO) {
|
return false;
|
||||||
CSync::addYSFSync(data + 2U);
|
|
||||||
|
|
||||||
m_frames++;
|
if (type == TAG_EOT) {
|
||||||
|
CSync::addYSFSync(data + 2U);
|
||||||
|
|
||||||
if (m_duplex) {
|
m_frames++;
|
||||||
data[0U] = TAG_DATA;
|
|
||||||
data[1U] = 0x00U;
|
|
||||||
writeQueue(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
LogMessage("YSF, received RF end of transmission, %.1f seconds", float(m_frames) / 10.0F);
|
if (m_duplex) {
|
||||||
|
data[0U] = TAG_EOT;
|
||||||
writeEndOfTransmission();
|
data[1U] = 0x00U;
|
||||||
|
writeQueue(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogMessage("YSF, received RF end of transmission, %.1f seconds", float(m_frames) / 10.0F);
|
||||||
|
|
||||||
|
writeEndOfTransmission();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
CSync::addYSFSync(data + 2U);
|
CSync::addYSFSync(data + 2U);
|
||||||
|
|
Loading…
Reference in a new issue