Blackbox: Use rx getters instead of importing private state directly
This commit is contained in:
parent
b6a75cb3f1
commit
f29b9dd329
|
@ -312,8 +312,6 @@ extern uint32_t currentTime;
|
||||||
|
|
||||||
//From rx.c:
|
//From rx.c:
|
||||||
extern uint16_t rssi;
|
extern uint16_t rssi;
|
||||||
bool rxSignalReceived;
|
|
||||||
bool rxFlightChannelsValid;
|
|
||||||
|
|
||||||
static BlackboxState blackboxState = BLACKBOX_STATE_DISABLED;
|
static BlackboxState blackboxState = BLACKBOX_STATE_DISABLED;
|
||||||
|
|
||||||
|
@ -712,8 +710,8 @@ static void loadSlowState(blackboxSlowState_t *slow)
|
||||||
slow->flightModeFlags = flightModeFlags;
|
slow->flightModeFlags = flightModeFlags;
|
||||||
slow->stateFlags = stateFlags;
|
slow->stateFlags = stateFlags;
|
||||||
slow->failsafePhase = failsafePhase();
|
slow->failsafePhase = failsafePhase();
|
||||||
slow->rxSignalReceived = rxSignalReceived;
|
slow->rxSignalReceived = rxIsReceivingSignal();
|
||||||
slow->rxFlightChannelsValid = rxFlightChannelsValid;
|
slow->rxFlightChannelsValid = rxAreFlightChannelsValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -66,8 +66,8 @@ const char rcChannelLetters[] = "AERT12345678abcdefgh";
|
||||||
uint16_t rssi = 0; // range: [0;1023]
|
uint16_t rssi = 0; // range: [0;1023]
|
||||||
|
|
||||||
static bool rxDataReceived = false;
|
static bool rxDataReceived = false;
|
||||||
bool rxSignalReceived = false;
|
static bool rxSignalReceived = false;
|
||||||
bool rxFlightChannelsValid = false;
|
static bool rxFlightChannelsValid = false;
|
||||||
|
|
||||||
static uint32_t rxUpdateAt = 0;
|
static uint32_t rxUpdateAt = 0;
|
||||||
static uint32_t needRxSignalBefore = 0;
|
static uint32_t needRxSignalBefore = 0;
|
||||||
|
|
Loading…
Reference in New Issue