mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Make the modem speed dynamic with a default of 115200.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user