mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
LP-518 Only disable link for OPlink protocols, not OpenLRS.
This commit is contained in:
parent
36f361d6a1
commit
7a97907504
@ -131,6 +131,7 @@ static uint8_t i2c_error_activity[PIOS_I2C_ERROR_COUNT_NUMELEM];
|
|||||||
|
|
||||||
#ifdef PIOS_INCLUDE_RFM22B
|
#ifdef PIOS_INCLUDE_RFM22B
|
||||||
static uint8_t previousRFXtalCap;
|
static uint8_t previousRFXtalCap;
|
||||||
|
static uint8_t protocol;
|
||||||
static void oplinkSettingsUpdatedCb(UAVObjEvent *ev);
|
static void oplinkSettingsUpdatedCb(UAVObjEvent *ev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -239,6 +240,8 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
|||||||
// Initialize previousRFXtalCap used by callback
|
// Initialize previousRFXtalCap used by callback
|
||||||
OPLinkSettingsRFXtalCapGet(&previousRFXtalCap);
|
OPLinkSettingsRFXtalCapGet(&previousRFXtalCap);
|
||||||
OPLinkSettingsConnectCallback(oplinkSettingsUpdatedCb);
|
OPLinkSettingsConnectCallback(oplinkSettingsUpdatedCb);
|
||||||
|
// Get protocol
|
||||||
|
OPLinkSettingsProtocolGet(&protocol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DIAG_TASKS
|
#ifdef DIAG_TASKS
|
||||||
@ -332,7 +335,7 @@ static void systemTask(__attribute__((unused)) void *parameters)
|
|||||||
oplinkStatus.RXSeq = radio_stats.rx_seq;
|
oplinkStatus.RXSeq = radio_stats.rx_seq;
|
||||||
|
|
||||||
oplinkStatus.LinkState = radio_stats.link_state;
|
oplinkStatus.LinkState = radio_stats.link_state;
|
||||||
} else {
|
} else if (protocol != OPLINKSETTINGS_PROTOCOL_OPENLRS) {
|
||||||
oplinkStatus.LinkState = OPLINKSTATUS_LINKSTATE_DISABLED;
|
oplinkStatus.LinkState = OPLINKSTATUS_LINKSTATE_DISABLED;
|
||||||
}
|
}
|
||||||
OPLinkStatusSet(&oplinkStatus);
|
OPLinkStatusSet(&oplinkStatus);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user