[Taranis] Crossfire period now 4ms. S.PORT TX didn't wait end of serial transfer before going to RX mode

This commit is contained in:
Bertrand Songis
2016-04-10 10:34:04 +02:00
parent 834092879c
commit 5d171b3761
5 changed files with 225 additions and 213 deletions
+1 -1
View File
@@ -42,5 +42,5 @@ void createCrossfireFrame(uint8_t * frame, int16_t * pulses)
bitsavailable -= 8;
}
}
*buf = crc8(&frame[2], 24);
*buf = crc8(&frame[2], 23);
}
+1 -1
View File
@@ -196,7 +196,7 @@ void setupPulses(unsigned int port)
uint8_t * crossfire = modulePulsesData[port].crossfire.pulses;
createCrossfireFrame(crossfire, &channelOutputs[g_model.moduleData[port].channelsStart]);
sportSendBuffer(crossfire, CROSSFIRE_FRAME_LEN);
// TODO scheduleNextMixerCalculation()
scheduleNextMixerCalculation(port, CROSSFIRE_FRAME_PERIOD);
}
break;
}
+1
View File
@@ -69,6 +69,7 @@ PACK(struct Dsm2PulsesData {
#endif
#define CROSSFIRE_BAUDRATE 400000
#define CROSSFIRE_FRAME_PERIOD 4 // 4ms
#define CROSSFIRE_FRAME_LEN (3+22+1)
#define CROSSFIRE_CHANNELS_COUNT 16
PACK(struct CrossfirePulsesData {