Handle the new larger frame type.

This commit is contained in:
Jonathan Naylor
2020-06-19 15:09:21 +01:00
parent d9e2940f08
commit e0f800ba98
3 changed files with 89 additions and 73 deletions

10
Modem.h
View File

@@ -32,6 +32,14 @@ enum RESP_TYPE_MMDVM {
RTM_ERROR
};
enum SERIAL_STATE {
SS_START,
SS_LENGTH1,
SS_LENGTH2,
SS_TYPE,
SS_DATA
};
class CModem {
public:
CModem(const std::string& port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, unsigned int txDelay, unsigned int dmrDelay, bool trace, bool debug);
@@ -158,6 +166,8 @@ private:
unsigned char* m_buffer;
unsigned int m_length;
unsigned int m_offset;
SERIAL_STATE m_state;
unsigned char m_type;
CRingBuffer<unsigned char> m_rxDStarData;
CRingBuffer<unsigned char> m_txDStarData;
CRingBuffer<unsigned char> m_rxDMRData1;