dmitryelj / SoapyICR8600

Icom ICR8600 SoapySDR driver
MIT License
4 stars 3 forks source link

Corrects RF gain dB <-> setpoint calculations #4

Closed robojay closed 3 years ago

robojay commented 3 years ago

Corrects RF gain dB <-> setpoint calculations

The RF gain on the R8600 takes a value between 0 and 255. After some searching through the manual, the exact meaning of this value has not been found. It is referred to as both RF Gain and Sensitivity.

Rough measurements were performed to determine how this value might relate to radio gain in dB. A reasonable "guess" is max gain = 0dB (setpoint of 255), and min gain (setpoint of 0) is -63.75dB

These conversions are now implemented in the driver.

This commit also tweaks some of the INFO, DEBUG, and TRACE messages.

~~NOTE: The driver currently does not work properly with Quisk. Once actual gain settings were able to be set (via one of the earlier commits), Quisk stopped working. It appears that Quisk is not handling the multiple gain options properly, and/or this driver needs to implement its own function to handle a "global" gain setting. This is a heads up for anyone trying to use Quisk or other programs that don't allow individual setting of gain parameters.~~

Implements preferred method of global gain setting

The strategy for a single global gain value is:

If the desired gain > 0, turn on the pre-amp (+14dB), otherwise, turn it off (+0dB)

Then, check to see if any of the attenuator values make sense (-30dB, -20dB, -10dB, or -0dB)

Finally, make up any remaining difference using the RF Gain (-63.75dB to 0dB)

getGainRange for overall gain is now valid.

NOTE: This commit partially corrects the issue with Quisk. Quisk is still not using the correct gain range (it seems to insist on 0dB to 32dB). At least now if gain is set in the 0dB to 14dB range, this driver will work.