Bsongis/crossfire refactoring (#3613)

* Crossfire refactoring

* Crossfire script now displaying fields

* Crossfire script now displaying text selection values
This commit is contained in:
Bertrand Songis
2016-06-18 22:16:50 +02:00
committed by GitHub
parent ab58151f2a
commit 53b51cac94
16 changed files with 288 additions and 177 deletions
+21 -1
View File
@@ -62,7 +62,7 @@ extern uint8_t telemetryState;
#define TELEMETRY_TIMEOUT10ms 100 // 1 second
#if defined(CROSSFIRE)
#define TELEMETRY_RX_PACKET_SIZE 40
#define TELEMETRY_RX_PACKET_SIZE 64
#else
#define TELEMETRY_RX_PACKET_SIZE 19 // 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1)
#endif
@@ -158,4 +158,24 @@ void logTelemetryWriteByte(uint8_t data);
#define LOG_TELEMETRY_WRITE_BYTE(data)
#endif
#define TELEMETRY_OUTPUT_FIFO_SIZE 16
extern uint8_t outputTelemetryBuffer[TELEMETRY_OUTPUT_FIFO_SIZE] __DMA;
extern uint8_t outputTelemetryBufferSize;
extern uint8_t outputTelemetryBufferTrigger;
inline void telemetryOutputPushByte(uint8_t byte)
{
outputTelemetryBuffer[outputTelemetryBufferSize++] = byte;
}
inline void telemetryOutputSetTrigger(uint8_t byte)
{
outputTelemetryBufferTrigger = byte;
}
#if defined(LUA)
#define LUA_TELEMETRY_INPUT_FIFO_SIZE 256
extern Fifo<uint8_t, LUA_TELEMETRY_INPUT_FIFO_SIZE> * luaInputTelemetryFifo;
#endif
#endif // _TELEMETRY_H_