mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-15 10:07:26 -05:00
Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
@@ -73,6 +73,7 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
private EventLogConfigurationEditor mEventLogConfigurationEditor;
|
||||
private RecordConfigurationEditor mRecordConfigurationEditor;
|
||||
private ToggleSwitch mIgnoreDataCallsButton;
|
||||
private ToggleSwitch mIgnoreEncryptedCallsButton;
|
||||
private Spinner<Integer> mTrafficChannelPoolSizeSpinner;
|
||||
private SegmentedButton mModulationSegmentedButton;
|
||||
private ToggleButton mC4FMToggleButton;
|
||||
@@ -157,6 +158,15 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
GridPane.setConstraints(directionLabel, 5, row);
|
||||
gridPane.getChildren().add(directionLabel);
|
||||
|
||||
GridPane.setConstraints(getIgnoreEncryptedCallsButton(), 6, row);
|
||||
gridPane.getChildren().add(getIgnoreEncryptedCallsButton());
|
||||
|
||||
Label ignoreEncryptedLabel = new Label("Ignore Encrypted Calls");
|
||||
ignoreEncryptedLabel.setLabelFor(getIgnoreEncryptedCallsButton());
|
||||
GridPane.setHalignment(ignoreEncryptedLabel, HPos.LEFT);
|
||||
GridPane.setConstraints(ignoreEncryptedLabel, 7, row);
|
||||
gridPane.getChildren().add(ignoreEncryptedLabel);
|
||||
|
||||
row++;
|
||||
|
||||
Label modulationHelpLabel = new Label("C4FM: repeaters and non-simulcast trunked systems. LSM: simulcast trunked systems.");
|
||||
@@ -343,6 +353,21 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
return mLSMToggleButton;
|
||||
}
|
||||
|
||||
private ToggleSwitch getIgnoreEncryptedCallsButton()
|
||||
{
|
||||
if(mIgnoreEncryptedCallsButton == null)
|
||||
{
|
||||
mIgnoreEncryptedCallsButton = new AccessibleToggleSwitch();
|
||||
mIgnoreEncryptedCallsButton.setDisable(true);
|
||||
mIgnoreEncryptedCallsButton.setTooltip(new Tooltip("Don't tune a traffic channel when the channel grant indicates the call is encrypted. " +
|
||||
"Phase 2: the channel is still tuned when the other timeslot has a clear call."));
|
||||
mIgnoreEncryptedCallsButton.selectedProperty()
|
||||
.addListener((observable, oldValue, newValue) -> modifiedProperty().set(true));
|
||||
}
|
||||
|
||||
return mIgnoreEncryptedCallsButton;
|
||||
}
|
||||
|
||||
private ToggleSwitch getIgnoreDataCallsButton()
|
||||
{
|
||||
if(mIgnoreDataCallsButton == null)
|
||||
@@ -398,11 +423,13 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
protected void setDecoderConfiguration(DecodeConfiguration config)
|
||||
{
|
||||
getIgnoreDataCallsButton().setDisable(config == null);
|
||||
getIgnoreEncryptedCallsButton().setDisable(config == null);
|
||||
getTrafficChannelPoolSizeSpinner().setDisable(config == null);
|
||||
|
||||
if(config instanceof DecodeConfigP25Phase1 decodeConfig)
|
||||
{
|
||||
getIgnoreDataCallsButton().setSelected(decodeConfig.getIgnoreDataCalls());
|
||||
getIgnoreEncryptedCallsButton().setSelected(decodeConfig.getIgnoreEncryptedCalls());
|
||||
getTrafficChannelPoolSizeSpinner().getValueFactory().setValue(decodeConfig.getTrafficChannelPoolSize());
|
||||
if(decodeConfig.getModulation() == Modulation.C4FM)
|
||||
{
|
||||
@@ -427,6 +454,7 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
else
|
||||
{
|
||||
getIgnoreDataCallsButton().setSelected(false);
|
||||
getIgnoreEncryptedCallsButton().setSelected(false);
|
||||
getTrafficChannelPoolSizeSpinner().getValueFactory().setValue(0);
|
||||
getJmbeAGCButton().setDisable(true);
|
||||
getJmbeNoiseGainSlider().setDisable(true);
|
||||
@@ -454,6 +482,7 @@ public class P25P1ConfigurationEditor extends ChannelConfigurationEditor
|
||||
}
|
||||
|
||||
config.setIgnoreDataCalls(getIgnoreDataCallsButton().isSelected());
|
||||
config.setIgnoreEncryptedCalls(getIgnoreEncryptedCallsButton().isSelected());
|
||||
config.setTrafficChannelPoolSize(getTrafficChannelPoolSizeSpinner().getValue());
|
||||
config.setModulation(getC4FMToggleButton().isSelected() ? Modulation.C4FM : Modulation.CQPSK);
|
||||
config.setAGC(getJmbeAGCButton().selectedProperty().getValue());
|
||||
|
||||
@@ -71,6 +71,7 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
private IntegerTextField mSystemTextField;
|
||||
private IntegerTextField mNacTextField;
|
||||
private ToggleSwitch mIgnoreDataCallsButton;
|
||||
private ToggleSwitch mIgnoreEncryptedCallsButton;
|
||||
private Spinner<Integer> mTrafficChannelPoolSizeSpinner;
|
||||
private ToggleSwitch mJmbeAGCButton;
|
||||
private Slider mJmbeToneGainSlider;
|
||||
@@ -142,6 +143,15 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
GridPane.setConstraints(directionLabel, 3, row);
|
||||
gridPane.getChildren().add(directionLabel);
|
||||
|
||||
GridPane.setConstraints(getIgnoreEncryptedCallsButton(), 4, row);
|
||||
gridPane.getChildren().add(getIgnoreEncryptedCallsButton());
|
||||
|
||||
Label ignoreEncryptedLabel = new Label("Ignore Encrypted Calls");
|
||||
ignoreEncryptedLabel.setLabelFor(getIgnoreEncryptedCallsButton());
|
||||
GridPane.setHalignment(ignoreEncryptedLabel, HPos.LEFT);
|
||||
GridPane.setConstraints(ignoreEncryptedLabel, 5, row);
|
||||
gridPane.getChildren().add(ignoreEncryptedLabel);
|
||||
|
||||
Label wacnLabel = new Label("WACN");
|
||||
wacnLabel.setLabelFor(getWacnTextField());
|
||||
GridPane.setHalignment(wacnLabel, HPos.RIGHT);
|
||||
@@ -300,6 +310,21 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
return mEventLogConfigurationEditor;
|
||||
}
|
||||
|
||||
private ToggleSwitch getIgnoreEncryptedCallsButton()
|
||||
{
|
||||
if(mIgnoreEncryptedCallsButton == null)
|
||||
{
|
||||
mIgnoreEncryptedCallsButton = new AccessibleToggleSwitch();
|
||||
mIgnoreEncryptedCallsButton.setDisable(true);
|
||||
mIgnoreEncryptedCallsButton.setTooltip(new Tooltip("Don't tune a traffic channel when the channel grant indicates the call is encrypted. " +
|
||||
"Phase 2: the channel is still tuned when the other timeslot has a clear call."));
|
||||
mIgnoreEncryptedCallsButton.selectedProperty()
|
||||
.addListener((observable, oldValue, newValue) -> modifiedProperty().set(true));
|
||||
}
|
||||
|
||||
return mIgnoreEncryptedCallsButton;
|
||||
}
|
||||
|
||||
private ToggleSwitch getIgnoreDataCallsButton()
|
||||
{
|
||||
if(mIgnoreDataCallsButton == null)
|
||||
@@ -417,6 +442,8 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
|
||||
getIgnoreDataCallsButton().setDisable(false);
|
||||
getIgnoreDataCallsButton().setSelected(decodeConfig.getIgnoreDataCalls());
|
||||
getIgnoreEncryptedCallsButton().setDisable(false);
|
||||
getIgnoreEncryptedCallsButton().setSelected(decodeConfig.getIgnoreEncryptedCalls());
|
||||
getTrafficChannelPoolSizeSpinner().setDisable(false);
|
||||
getTrafficChannelPoolSizeSpinner().getValueFactory().setValue(decodeConfig.getTrafficChannelPoolSize());
|
||||
getJmbeAGCButton().setSelected(decodeConfig.isAGC());
|
||||
@@ -433,6 +460,8 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
getSystemTextField().setDisable(true);
|
||||
getNacTextField().setDisable(true);
|
||||
getIgnoreDataCallsButton().setDisable(true);
|
||||
getIgnoreEncryptedCallsButton().setDisable(true);
|
||||
getIgnoreEncryptedCallsButton().setSelected(false);
|
||||
getTrafficChannelPoolSizeSpinner().setDisable(true);
|
||||
getJmbeAGCButton().setDisable(true);
|
||||
getJmbeNoiseGainSlider().setDisable(true);
|
||||
@@ -465,6 +494,7 @@ public class P25P2ConfigurationEditor extends ChannelConfigurationEditor
|
||||
int nac = getNacTextField().get();
|
||||
config.setScrambleParameters(new ScrambleParameters(wacn, system, nac));
|
||||
config.setIgnoreDataCalls(getIgnoreDataCallsButton().isSelected());
|
||||
config.setIgnoreEncryptedCalls(getIgnoreEncryptedCallsButton().isSelected());
|
||||
config.setTrafficChannelPoolSize(getTrafficChannelPoolSizeSpinner().getValue());
|
||||
config.setAGC(getJmbeAGCButton().selectedProperty().getValue());
|
||||
config.setComfortNoiseGain((float)getJmbeNoiseGainSlider().getValue());
|
||||
|
||||
Reference in New Issue
Block a user