mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 09:37:36 -05:00
Closes #71 - frequency controller throws exception when exceeding min/max tuning limits of a tuner.
Updated code to show dialog to user whenever the tuning limit has been exceeded. Added new InvalidFrequencyException that includes the requested invalid frequency and the valid frequency limit that was exceeded
This commit is contained in:
@@ -405,7 +405,7 @@ public class AirspyTunerController extends TunerController
|
||||
* Sets the sample rate to the rate specified by the index value in the
|
||||
* available sample rates map
|
||||
*
|
||||
* @param index to a sample rate in the available samples rates map.
|
||||
* @param rate to a sample rate in the available samples rates map.
|
||||
*
|
||||
* @throws IllegalArgumentException if index is not a valid rate index
|
||||
* @throws LibUsbException if there was a read error or if this operation
|
||||
@@ -414,7 +414,7 @@ public class AirspyTunerController extends TunerController
|
||||
* @throws UsbException if there was a USB error
|
||||
*/
|
||||
public void setSampleRate( AirspySampleRate rate ) throws
|
||||
LibUsbException, UsbException
|
||||
LibUsbException, UsbException, SourceException
|
||||
{
|
||||
if( rate.getRate() != mSampleRate )
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ public class AirspyTunerEditor extends TunerConfigurationEditor
|
||||
mController.setSampleRate( rate );
|
||||
save();
|
||||
}
|
||||
catch ( LibUsbException | UsbException e1 )
|
||||
catch ( LibUsbException | UsbException | SourceException e1 )
|
||||
{
|
||||
JOptionPane.showMessageDialog( AirspyTunerEditor.this,
|
||||
"Couldn't set sample rate to " + rate.getLabel() );
|
||||
|
||||
Reference in New Issue
Block a user