Skip to content

Commit

Permalink
libbladeRF: fix calibration load check for get_gain_calibration
Browse files Browse the repository at this point in the history
Fixes #981
  • Loading branch information
rthomp10 committed Aug 11, 2024
1 parent d746811 commit e1a5c92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/libraries/libbladeRF/src/bladerf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,8 +2334,8 @@ int bladerf_get_gain_calibration(struct bladerf *dev, bladerf_channel ch, const
CHECK_NULL(dev);
MUTEX_LOCK(&dev->lock);

if (dev->gain_tbls == NULL) {
log_error("Gain calibration not loaded\n");
if (dev->gain_tbls[ch].state != BLADERF_GAIN_CAL_LOADED) {
log_error("%s: Gain calibration not loaded\n", __FUNCTION__);
MUTEX_UNLOCK(&dev->lock);
return BLADERF_ERR_UNEXPECTED;
}
Expand Down

0 comments on commit e1a5c92

Please sign in to comment.