mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Ensure that telemetry state is always updated after initialising
telemetry so that providers can configure the telemetry port as applicable.
This commit is contained in:
parent
8138bc8cf3
commit
6b1a6332b9
2 changed files with 8 additions and 3 deletions
|
@ -26,6 +26,8 @@ void initTelemetry(void)
|
|||
core.telemport = &(softSerialPorts[1].port);
|
||||
else
|
||||
core.telemport = core.mainport;
|
||||
|
||||
checkTelemetryState();
|
||||
}
|
||||
|
||||
static bool telemetryEnabled = false;
|
||||
|
@ -71,6 +73,10 @@ void freeTelemetryPort(void) {
|
|||
|
||||
void checkTelemetryState(void)
|
||||
{
|
||||
if (!feature(FEATURE_TELEMETRY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool telemetryCurrentlyEnabled = isTelemetryEnabled();
|
||||
|
||||
if (!shouldChangeTelemetryStateNow(telemetryCurrentlyEnabled)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue