Fixed iBus telemetry handling (cherry-pick from @marcroe 's work in #2170.
This commit is contained in:
parent
f32580601a
commit
94993e55c0
|
@ -407,6 +407,9 @@ void resetTelemetryConfig(telemetryConfig_t *telemetryConfig)
|
||||||
telemetryConfig->frsky_vfas_cell_voltage = 0;
|
telemetryConfig->frsky_vfas_cell_voltage = 0;
|
||||||
telemetryConfig->hottAlarmSoundInterval = 5;
|
telemetryConfig->hottAlarmSoundInterval = 5;
|
||||||
telemetryConfig->pidValuesAsTelemetry = 0;
|
telemetryConfig->pidValuesAsTelemetry = 0;
|
||||||
|
#ifdef TELEMETRY_IBUS
|
||||||
|
telemetryConfig->report_cell_voltage = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#define STM_FAST_TARGET
|
#define STM_FAST_TARGET
|
||||||
#define I2C3_OVERCLOCK true
|
#define I2C3_OVERCLOCK true
|
||||||
#define I2C4_OVERCLOCK true
|
#define I2C4_OVERCLOCK true
|
||||||
|
#define TELEMETRY_IBUS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
|
@ -43,6 +44,7 @@
|
||||||
#define STM_FAST_TARGET
|
#define STM_FAST_TARGET
|
||||||
#define USE_DSHOT
|
#define USE_DSHOT
|
||||||
#define I2C3_OVERCLOCK true
|
#define I2C3_OVERCLOCK true
|
||||||
|
#define TELEMETRY_IBUS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef STM32F3
|
#ifdef STM32F3
|
||||||
|
@ -85,7 +87,6 @@
|
||||||
#define TELEMETRY
|
#define TELEMETRY
|
||||||
#define TELEMETRY_FRSKY
|
#define TELEMETRY_FRSKY
|
||||||
#define TELEMETRY_HOTT
|
#define TELEMETRY_HOTT
|
||||||
#define TELEMETRY_IBUS
|
|
||||||
#define TELEMETRY_LTM
|
#define TELEMETRY_LTM
|
||||||
#define TELEMETRY_SMARTPORT
|
#define TELEMETRY_SMARTPORT
|
||||||
#define USE_SERVOS
|
#define USE_SERVOS
|
||||||
|
@ -100,7 +101,6 @@
|
||||||
#define TELEMETRY_SRXL
|
#define TELEMETRY_SRXL
|
||||||
#define TELEMETRY_JETIEXBUS
|
#define TELEMETRY_JETIEXBUS
|
||||||
#define TELEMETRY_MAVLINK
|
#define TELEMETRY_MAVLINK
|
||||||
#define TELEMETRY_IBUS
|
|
||||||
#define USE_RX_MSP
|
#define USE_RX_MSP
|
||||||
#define USE_SERIALRX_JETIEXBUS
|
#define USE_SERIALRX_JETIEXBUS
|
||||||
#define VTX_COMMON
|
#define VTX_COMMON
|
||||||
|
|
|
@ -167,7 +167,7 @@ PG_RESET_TEMPLATE(ibusTelemetryConfig_t, ibusTelemetryConfig,
|
||||||
);
|
);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define IBUS_TASK_PERIOD_US (500)
|
#define IBUS_TASK_PERIOD_US (1000)
|
||||||
|
|
||||||
#define IBUS_UART_MODE (MODE_RXTX)
|
#define IBUS_UART_MODE (MODE_RXTX)
|
||||||
#define IBUS_BAUDRATE (115200)
|
#define IBUS_BAUDRATE (115200)
|
||||||
|
|
|
@ -137,6 +137,9 @@ void telemetryCheckState(void)
|
||||||
#ifdef TELEMETRY_SRXL
|
#ifdef TELEMETRY_SRXL
|
||||||
checkSrxlTelemetryState();
|
checkSrxlTelemetryState();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TELEMETRY_IBUS
|
||||||
|
checkIbusTelemetryState();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void telemetryProcess(uint32_t currentTime, rxConfig_t *rxConfig, uint16_t deadband3d_throttle)
|
void telemetryProcess(uint32_t currentTime, rxConfig_t *rxConfig, uint16_t deadband3d_throttle)
|
||||||
|
@ -170,6 +173,9 @@ void telemetryProcess(uint32_t currentTime, rxConfig_t *rxConfig, uint16_t deadb
|
||||||
#ifdef TELEMETRY_SRXL
|
#ifdef TELEMETRY_SRXL
|
||||||
handleSrxlTelemetry(currentTime);
|
handleSrxlTelemetry(currentTime);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TELEMETRY_IBUS
|
||||||
|
handleIbusTelemetry();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_SMARTPORT)
|
#define TELEMETRY_FUNCTION_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_LTM | FUNCTION_TELEMETRY_SMARTPORT)
|
||||||
|
|
Loading…
Reference in New Issue