[NV14] Telemetry fixes, use FlySky RX defaults (#856)
* Port from NV14 repository * Fix altimeter * Change AFHDS2A default mode to PWM and iBUS * Fix datacopy.cpp generation for NV14 Windows build * Cleanup * Format * typo fix * Sngl for alarm and temperature sensor * remove temperature sensor
This commit is contained in:
@@ -75,6 +75,13 @@ void processTelemetryData(uint8_t data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS2)
|
||||
if(telemetryProtocol == PROTOCOL_TELEMETRY_FLYSKY_NV14) {
|
||||
processInternalFlySkyTelemetryData(data);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3)
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_AFHDS3) {
|
||||
afhds3::processTelemetryData(EXTERNAL_MODULE, data, telemetryRxBuffer, telemetryRxBufferCount, TELEMETRY_RX_PACKET_SIZE);
|
||||
@@ -151,6 +158,15 @@ void telemetryWakeup()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
if (telemetryGetByte(&data)) {
|
||||
LOG_TELEMETRY_WRITE_START();
|
||||
do {
|
||||
processTelemetryData(data);
|
||||
LOG_TELEMETRY_WRITE_BYTE(data);
|
||||
} while (telemetryGetByte(&data));
|
||||
}
|
||||
|
||||
#if defined(PCBNV14)
|
||||
if (//!moduleUpdateActive(INTERNAL_MODULE) &&
|
||||
moduleState[INTERNAL_MODULE].protocol == PROTOCOL_CHANNELS_AFHDS2A &&
|
||||
@@ -163,15 +179,6 @@ void telemetryWakeup()
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(STM32)
|
||||
if (telemetryGetByte(&data)) {
|
||||
LOG_TELEMETRY_WRITE_START();
|
||||
do {
|
||||
processTelemetryData(data);
|
||||
LOG_TELEMETRY_WRITE_BYTE(data);
|
||||
} while (telemetryGetByte(&data));
|
||||
}
|
||||
|
||||
#if defined(MULTI_PROTOLIST)
|
||||
if (isModuleMultimodule(EXTERNAL_MODULE) &&
|
||||
(moduleState[EXTERNAL_MODULE].protocol ==
|
||||
@@ -369,6 +376,13 @@ void telemetryInit(uint8_t protocol)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS2)
|
||||
else if (protocol == PROTOCOL_TELEMETRY_FLYSKY_NV14) {
|
||||
telemetryPortInit(INTMODULE_USART_AFHDS2_BAUDRATE, TELEMETRY_SERIAL_DEFAULT);
|
||||
telemetryPortSetDirectionInput();
|
||||
}
|
||||
#endif
|
||||
|
||||
else {
|
||||
telemetryPortInit(FRSKY_SPORT_BAUDRATE, TELEMETRY_SERIAL_WITHOUT_DMA);
|
||||
#if defined(LUA)
|
||||
|
||||
Reference in New Issue
Block a user