Make the modem speed dynamic with a default of 115200.

This commit is contained in:
Jonathan Naylor
2020-05-23 13:03:55 +01:00
parent 9d08f1605c
commit 303a0163d3
13 changed files with 746 additions and 746 deletions

View File

@@ -221,13 +221,13 @@ CModem::~CModem()
delete[] m_buffer;
}
void CModem::setSerialParams(const std::string& protocol, unsigned int address)
void CModem::setSerialParams(const std::string& protocol, unsigned int address, unsigned int speed)
{
// Create the serial controller instance according the protocol specified in conf.
if (protocol == "i2c")
m_serial = new CI2CController(m_port, SERIAL_115200, address, true);
m_serial = new CI2CController(m_port, speed, address, true);
else
m_serial = new CSerialController(m_port, SERIAL_115200, true);
m_serial = new CSerialController(m_port, speed, true);
}
void CModem::setRFParams(unsigned int rxFrequency, int rxOffset, unsigned int txFrequency, int txOffset, int txDCOffset, int rxDCOffset, float rfLevel, unsigned int pocsagFrequency)