Bsongis/crossfire refactoring (#3613)
* Crossfire refactoring * Crossfire script now displaying fields * Crossfire script now displaying text selection values
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
@@ -46,19 +46,3 @@ uint8_t createCrossfireChannelsFrame(uint8_t * frame, int16_t * pulses)
|
||||
*buf++ = crc8(crc_start, 23);
|
||||
return buf - frame;
|
||||
}
|
||||
|
||||
#if defined(LUA)
|
||||
uint8_t createCrossfireRequestFrame(uint8_t * frame, LuaTelemetryPacket * telemetryPacket)
|
||||
{
|
||||
uint8_t * buf = frame;
|
||||
*buf++ = MODULE_ADDRESS;
|
||||
*buf++ = 2 + telemetryPacket->crossfire.length; // 1(ID) + telemetryPacket->crossfire.length + 1(CRC)
|
||||
uint8_t * crc_start = buf;
|
||||
*buf++ = telemetryPacket->crossfire.command;
|
||||
for (int i=0; i<telemetryPacket->crossfire.length; i++) {
|
||||
*buf++ = telemetryPacket->crossfire.data[i];
|
||||
}
|
||||
*buf++ = crc8(crc_start, telemetryPacket->crossfire.length + 1);
|
||||
return buf - frame;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user