Skip to content

Commit

Permalink
Fix rssi logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smeat committed Sep 20, 2018
1 parent b057ce5 commit 836417b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/blackbox/blackbox.c
Expand Up @@ -448,7 +448,7 @@ static bool testBlackboxConditionUncached(FlightLogFieldCondition condition)
#endif

case FLIGHT_LOG_FIELD_CONDITION_RSSI:
return rxConfig()->rssi_channel > 0 || featureIsEnabled(FEATURE_RSSI_ADC);
return isRssiConfigured();

case FLIGHT_LOG_FIELD_CONDITION_NOT_LOGGING_EVERY_FRAME:
return blackboxConfig()->p_ratio != 1;
Expand Down
5 changes: 5 additions & 0 deletions src/main/rx/rx.c
Expand Up @@ -697,3 +697,8 @@ uint16_t rxGetRefreshRate(void)
{
return rxRuntimeConfig.rxRefreshRate;
}

bool isRssiConfigured(void)
{
return rssiSource != RSSI_SOURCE_NONE;
}
1 change: 1 addition & 0 deletions src/main/rx/rx.h
Expand Up @@ -166,6 +166,7 @@ void setRssiMsp(uint8_t newMspRssi);
void updateRSSI(timeUs_t currentTimeUs);
uint16_t getRssi(void);
uint8_t getRssiPercent(void);
bool isRssiConfigured(void);

void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRangeConfig);

Expand Down

0 comments on commit 836417b

Please sign in to comment.