Blackbox: Use rx getters instead of importing private state directly

This commit is contained in:
Nicholas Sherlock 2015-08-28 21:26:11 +12:00
parent b6a75cb3f1
commit f29b9dd329
2 changed files with 4 additions and 6 deletions

View File

@ -312,8 +312,6 @@ extern uint32_t currentTime;
//From rx.c:
extern uint16_t rssi;
bool rxSignalReceived;
bool rxFlightChannelsValid;
static BlackboxState blackboxState = BLACKBOX_STATE_DISABLED;
@ -712,8 +710,8 @@ static void loadSlowState(blackboxSlowState_t *slow)
slow->flightModeFlags = flightModeFlags;
slow->stateFlags = stateFlags;
slow->failsafePhase = failsafePhase();
slow->rxSignalReceived = rxSignalReceived;
slow->rxFlightChannelsValid = rxFlightChannelsValid;
slow->rxSignalReceived = rxIsReceivingSignal();
slow->rxFlightChannelsValid = rxAreFlightChannelsValid();
}
/**

View File

@ -66,8 +66,8 @@ const char rcChannelLetters[] = "AERT12345678abcdefgh";
uint16_t rssi = 0; // range: [0;1023]
static bool rxDataReceived = false;
bool rxSignalReceived = false;
bool rxFlightChannelsValid = false;
static bool rxSignalReceived = false;
static bool rxFlightChannelsValid = false;
static uint32_t rxUpdateAt = 0;
static uint32_t needRxSignalBefore = 0;