Crossfire baudrate selection for X7 support ( fixes #4922 ) (#5194)

* Crossfire baudrate selection for X7 support ( fixes #4922 )

* Moved baurate selection to general settings

* renamed mavbaud to telemetryBaudrate for ARM targets
translation added

* typo fixed
This commit is contained in:
sirPerna
2017-09-10 17:10:47 +02:00
committed by Bertrand Songis
parent 653273f82e
commit 390342af78
20 changed files with 55 additions and 5 deletions
+17
View File
@@ -41,4 +41,21 @@ void processCrossfireTelemetryData(uint8_t data);
void crossfireSetDefault(int index, uint8_t id, uint8_t subId);
bool isCrossfireOutputBufferAvailable();
#if defined(PCBX7)
const uint32_t CROSSFIRE_BAUDRATES[] = {
400000,
115200,
};
const uint8_t CROSSFIRE_FRAME_PERIODS[] = {
4,
16,
};
#define CROSSFIRE_BAUDRATE CROSSFIRE_BAUDRATES[g_eeGeneral.telemetryBaudrate]
#define CROSSFIRE_FRAME_PERIOD CROSSFIRE_FRAME_PERIODS[g_eeGeneral.telemetryBaudrate]
#else
#define CROSSFIRE_BAUDRATE 400000
#define CROSSFIRE_FRAME_PERIOD 4 // 4ms
#endif
#endif // _CROSSFIRE_H_