S.PORT to Lua telemetry passthrough

The Fifo is created with ```telemetryRegister``` and elements (ID + Value) are taken from the Fifo with ```telemetryPop```
Not tested at all. Just for review / discussion
This commit is contained in:
Bertrand Songis
2016-02-28 11:56:54 +01:00
parent 81a7a554c3
commit 75e1bead3f
16 changed files with 119 additions and 69 deletions
+7
View File
@@ -269,6 +269,13 @@ void processSportPacket(uint8_t * packet)
processSportPacket(id, 6, instance, bool(data & 0x2000000));
processSportPacket(id, 7, instance, bool(data & 0x4000000));
}
else if (id >= DIY_FIRST_ID && id <= DIY_LAST_ID) {
#if defined(LUA)
if (luaTelemetryFifo) {
luaTelemetryFifo->push((LuaTelemetryValue){(uint8_t)id, data});
}
#endif
}
else {
processSportPacket(id, 0, instance, data);
}