Fixes #3964: Added free space check before putting new data into Lua … (#3968)

* Fixes #3964: Added free space check before putting new data into Lua Telemetry Fifo

* Copy-paste error

* Compilation fix

* Another compilation fix
This commit is contained in:
Damjan Adamic
2016-11-02 12:56:43 +01:00
committed by Bertrand Songis
parent 450430f22e
commit a332f7a872
3 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ void processCrossfireTelemetryFrame()
#if defined(LUA)
default:
if (luaInputTelemetryFifo) {
if (luaInputTelemetryFifo && luaInputTelemetryFifo->hasSpace(telemetryRxBufferCount-2) ) {
for (uint8_t i=1; i<telemetryRxBufferCount-1; i++) {
// destination address and CRC are skipped
luaInputTelemetryFifo->push(telemetryRxBuffer[i]);