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:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user