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
+12 -1
View File
@@ -139,6 +139,8 @@
#define POWERBOX_STATE_LAST_ID 0x0b2f
#define POWERBOX_CNSP_FIRST_ID 0x0b30
#define POWERBOX_CNSP_LAST_ID 0x0b3f
#define DIY_FIRST_ID 0x5000
#define DIY_LAST_ID 0x50ff
#define RSSI_ID 0xf101
#define ADC1_ID 0xf102
#define ADC2_ID 0xf103
@@ -344,7 +346,6 @@ struct FrskyData {
};
#endif
#if defined(PCBTARANIS) && defined(REVPLUS)
#define IS_VALID_XJT_VERSION() (frskyData.xjtVersion != 0 && frskyData.xjtVersion != 0xff)
#else
@@ -553,4 +554,14 @@ void processSerialData(uint8_t data);
#define MODEL_TELEMETRY_PROTOCOL() g_model.telemetryProtocol
#endif
#if defined(LUA)
struct LuaTelemetryValue
{
uint8_t id;
uint32_t value;
};
extern Fifo<LuaTelemetryValue, 16> * luaTelemetryFifo;
#endif
#endif // _FRSKY_H_