Add TX Delay buffer protection.

This commit is contained in:
Jonathan Naylor
2017-04-02 13:48:40 +01:00
parent e93b264d9c
commit c0941c4856
5 changed files with 14 additions and 2 deletions
+3
View File
@@ -166,6 +166,9 @@ void CP25TX::writeByte(uint8_t c)
void CP25TX::setTXDelay(uint8_t delay)
{
m_txDelay = 600U + uint16_t(delay) * 12U; // 500ms + tx delay
if (m_txDelay > 1200U)
m_txDelay = 1200U;
}
uint8_t CP25TX::getSpace() const