Add extra debughing of the output queues.

This commit is contained in:
Jonathan Naylor
2016-03-07 18:08:50 +00:00
parent 7e31a226de
commit bfb74d3155
5 changed files with 91 additions and 28 deletions

View File

@@ -271,6 +271,13 @@ void CYSFControl::writeQueue(const unsigned char *data)
return;
unsigned char len = YSF_FRAME_LENGTH_BYTES + 2U;
unsigned int space = m_queue.freeSpace();
if (space < (len + 1U)) {
LogError("YSF, overflow in the System Fusion RF queue");
return;
}
m_queue.addData(&len, 1U);
m_queue.addData(data, len);