-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi, inside the legacy-api how do I specify the gainToUse?
Cause seems to be set by default on UNKNOWN but I need to change the LNA, TIA and PGA gains.
LMS_APIDevice(lime::SDRDevice* device)
: device(device)
, lastSavedStreamConfig()
, lastSavedLPFValue()
, statsDeltas()
, moduleIndex(0)
, deviceInfo(nullptr)
, rxGain(lime::eGainTypes::UNKNOWN)
, txGain(lime::eGainTypes::UNKNOWN)
{
}
API_EXPORT int CALL_CONV LMS_SetGaindB(lms_device_t* device, bool dir_tx, size_t chan, unsigned gain)
{
LMS_APIDevice* apiDevice = CheckDevice(device, chan);
if (apiDevice == nullptr)
{
return -1;
}
const lime::TRXDir direction = DirFromBool(dir_tx);
auto gainToUse = dir_tx ? apiDevice->txGain : apiDevice->rxGain;
const OpStatus status = apiDevice->device->SetGain(apiDevice->moduleIndex, direction, chan, gainToUse, gain);
return OpStatusToReturnCode(status);
}Metadata
Metadata
Assignees
Labels
No labels