Skip to content

Commit

Permalink
#52 Update to create a new API instance each time a discovered tuner …
Browse files Browse the repository at this point in the history
…instance is started or restarted. Removes DeviceDescriptor as superceded. Resolves issue of tuners being unusable following a disable and then reenable. General cleanup of the RSP classes.
  • Loading branch information
Dennis Sheirer committed Jan 1, 2023
1 parent 4df376a commit 19dd42a
Show file tree
Hide file tree
Showing 33 changed files with 1,138 additions and 1,966 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2022 Dennis Sheirer
* Copyright (C) 2014-2023 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -19,7 +19,6 @@

package com.github.dsheirer.sdrplay;


import com.github.dsheirer.sdrplay.device.RspDuoMode;
import com.github.dsheirer.sdrplay.device.TunerSelect;
import java.util.EnumSet;
Expand All @@ -32,15 +31,7 @@ public enum DeviceSelectionMode
//All RSP devices
SINGLE_TUNER_1("Single Tuner 1", RspDuoMode.SINGLE_TUNER, TunerSelect.TUNER_1),
SINGLE_TUNER_2("Single Tuner 2", RspDuoMode.SINGLE_TUNER, TunerSelect.TUNER_2),

//RSPduo devices only
//Note: dual independent tuners - the device is first claimed as master/tuner1, then a second api instance is
//created and the second tuner is claimed as slave/tuner2
DUAL_INDEPENDENT_TUNERS("Dual Independent Tuners", RspDuoMode.MASTER, TunerSelect.TUNER_1),
DUAL_SYNCHRONIZED_TUNERS("Dual Synchronized Tuners", RspDuoMode.DUAL_TUNER, TunerSelect.TUNER_BOTH),
MASTER_TUNER_1("Master - Tuner 1", RspDuoMode.MASTER, TunerSelect.TUNER_1),
MASTER_TUNER_2("Master - Tuner 2", RspDuoMode.MASTER, TunerSelect.TUNER_2),
SLAVE_TUNER_1("Slave - Tuner 1", RspDuoMode.SLAVE, TunerSelect.TUNER_1),
SLAVE_TUNER_2("Slave - Tuner 2", RspDuoMode.SLAVE, TunerSelect.TUNER_2);

private String mDescription;
Expand All @@ -63,9 +54,8 @@ public enum DeviceSelectionMode
/**
* Set of all selection modes available for the RSPduo
*/
public static final EnumSet<DeviceSelectionMode> ALL_DUO_SELECTION_MODES = EnumSet.range(DUAL_INDEPENDENT_TUNERS, SLAVE_TUNER_2);
public static final EnumSet<DeviceSelectionMode> MASTER_MODES = EnumSet.of(MASTER_TUNER_1, MASTER_TUNER_2);
public static final EnumSet<DeviceSelectionMode> SLAVE_MODES = EnumSet.of(SLAVE_TUNER_1, SLAVE_TUNER_2);
public static final EnumSet<DeviceSelectionMode> MASTER_MODES = EnumSet.of(MASTER_TUNER_1);
public static final EnumSet<DeviceSelectionMode> SLAVE_MODES = EnumSet.of(SLAVE_TUNER_2);
public static final EnumSet<DeviceSelectionMode> SINGLE_TUNER_MODES = EnumSet.of(SINGLE_TUNER_1, SINGLE_TUNER_2);

/**
Expand Down
Loading

0 comments on commit 19dd42a

Please sign in to comment.