mirror of https://github.com/g4klx/MMDVM.git
Add the FM controller status to the FM Status message.
This commit is contained in:
parent
df0a9ebe72
commit
7dc420c8ff
7
FM.cpp
7
FM.cpp
|
@ -328,7 +328,7 @@ void CFM::clock(uint8_t length)
|
|||
m_statusTimer.clock(length);
|
||||
|
||||
if (m_statusTimer.isRunning() && m_statusTimer.hasExpired()) {
|
||||
serial.writeFMStatus();
|
||||
serial.writeFMStatus(m_state);
|
||||
m_statusTimer.start();
|
||||
}
|
||||
}
|
||||
|
@ -356,7 +356,7 @@ void CFM::listeningState(bool validRFSignal, bool validExtSignal)
|
|||
m_callsignTimer.start();
|
||||
|
||||
m_statusTimer.start();
|
||||
serial.writeFMStatus();
|
||||
serial.writeFMStatus(m_state);
|
||||
} else if (validExtSignal) {
|
||||
if (m_kerchunkTimer.getTimeout() > 0U) {
|
||||
DEBUG1("State to KERCHUNK_EXT");
|
||||
|
@ -378,7 +378,7 @@ void CFM::listeningState(bool validRFSignal, bool validExtSignal)
|
|||
m_callsignTimer.start();
|
||||
|
||||
m_statusTimer.start();
|
||||
serial.writeFMStatus();
|
||||
serial.writeFMStatus(m_state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -731,4 +731,3 @@ void CFM::insertSilence(uint16_t ms)
|
|||
for (uint32_t i = 0U; i < nSamples; i++)
|
||||
m_outputRFRB.put(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -1263,7 +1263,7 @@ void CSerialPort::writeFMData(const uint8_t* data, uint8_t length)
|
|||
writeInt(1U, reply, count);
|
||||
}
|
||||
|
||||
void CSerialPort::writeFMStatus()
|
||||
void CSerialPort::writeFMStatus(uint8_t status)
|
||||
{
|
||||
if (m_modemState != STATE_FM && m_modemState != STATE_IDLE)
|
||||
return;
|
||||
|
@ -1274,10 +1274,11 @@ void CSerialPort::writeFMStatus()
|
|||
uint8_t reply[10U];
|
||||
|
||||
reply[0U] = MMDVM_FRAME_START;
|
||||
reply[1U] = 3U;
|
||||
reply[1U] = 4U;
|
||||
reply[2U] = MMDVM_FM_STATUS;
|
||||
reply[3U] = status;
|
||||
|
||||
writeInt(1U, reply, 3);
|
||||
writeInt(1U, reply, 4);
|
||||
}
|
||||
|
||||
void CSerialPort::writeCalData(const uint8_t* data, uint8_t length)
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
void writeNXDNLost();
|
||||
|
||||
void writeFMData(const uint8_t* data, uint8_t length);
|
||||
void writeFMStatus();
|
||||
void writeFMStatus(uint8_t status);
|
||||
|
||||
void writeCalData(const uint8_t* data, uint8_t length);
|
||||
void writeRSSIData(const uint8_t* data, uint8_t length);
|
||||
|
|
Loading…
Reference in New Issue