mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Compare commits
14 Commits
v0.6.0-bet
...
v0.6.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16aed8741d | ||
|
|
e878ca0c7f | ||
|
|
ca61dd2543 | ||
|
|
6187253589 | ||
|
|
b51c80742f | ||
|
|
15352b9216 | ||
|
|
a848b21ae8 | ||
|
|
279aca7287 | ||
|
|
88879c956a | ||
|
|
729b7e27a8 | ||
|
|
feaed168ae | ||
|
|
50edb18db3 | ||
|
|
7302e2806d | ||
|
|
8845306b4a |
@@ -22,8 +22,10 @@
|
||||
# Beta: maj.min.patch-beta-build
|
||||
# Release: maj.min.patch
|
||||
#
|
||||
# Example: 0.6.0-beta-5
|
||||
#
|
||||
# Note: this is so that the file names for the resultant release build products match the GitLab release asset
|
||||
# tag name, specifically the dashes inserted before and after the alpha/beta labels.
|
||||
# See: https://github.com/DSheirer/sdrtrunk/issues/1651
|
||||
|
||||
projectVersion=0.6.0-beta-4
|
||||
projectVersion=0.6.0-beta-5
|
||||
@@ -184,6 +184,7 @@ public class AliasFactory
|
||||
copy.setGroup(original.getGroup());
|
||||
copy.setColor(original.getColor());
|
||||
copy.setIconName(original.getIconName());
|
||||
copy.setRecordable(original.isRecordable());
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ public class ChannelProcessingManager implements Listener<ChannelEvent>
|
||||
* @param request containing channel and other details
|
||||
* @throws ChannelException if a source is not available for the channel
|
||||
*/
|
||||
private void startProcessing(ChannelStartProcessingRequest request) throws ChannelException
|
||||
private synchronized void startProcessing(ChannelStartProcessingRequest request) throws ChannelException
|
||||
{
|
||||
Channel channel = request.getChannel();
|
||||
|
||||
|
||||
@@ -164,27 +164,7 @@ public class JavaFxWindowManager extends Application
|
||||
public void shutdown()
|
||||
{
|
||||
MyEventBus.getGlobalEventBus().unregister(this);
|
||||
|
||||
if(mChannelMapStage != null)
|
||||
{
|
||||
mUserPreferences.getJavaFxPreferences().unmonitor(mChannelMapStage);
|
||||
}
|
||||
|
||||
if(mIconManagerStage != null)
|
||||
{
|
||||
mUserPreferences.getJavaFxPreferences().unmonitor(mIconManagerStage);
|
||||
}
|
||||
|
||||
if(mPlaylistStage != null)
|
||||
{
|
||||
mUserPreferences.getJavaFxPreferences().unmonitor(mPlaylistStage);
|
||||
}
|
||||
|
||||
if(mUserPreferencesStage != null)
|
||||
{
|
||||
mUserPreferences.getJavaFxPreferences().unmonitor(mUserPreferencesStage);
|
||||
}
|
||||
|
||||
mUserPreferences.getJavaFxPreferences().clearStageMonitors();
|
||||
Platform.exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2021 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
|
||||
@@ -19,16 +19,12 @@
|
||||
|
||||
package io.github.dsheirer.gui.playlist.alias;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.controlsfx.control.ToggleSwitch;
|
||||
|
||||
import com.google.common.collect.Ordering;
|
||||
|
||||
import io.github.dsheirer.alias.Alias;
|
||||
import io.github.dsheirer.gui.playlist.Editor;
|
||||
import io.github.dsheirer.icon.Icon;
|
||||
import io.github.dsheirer.playlist.PlaylistManager;
|
||||
import java.util.List;
|
||||
import javafx.beans.property.BooleanProperty;
|
||||
import javafx.beans.property.ReadOnlyBooleanProperty;
|
||||
import javafx.beans.property.SimpleBooleanProperty;
|
||||
@@ -49,6 +45,7 @@ import javafx.scene.layout.ColumnConstraints;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.util.Callback;
|
||||
import org.controlsfx.control.ToggleSwitch;
|
||||
|
||||
/**
|
||||
* Editor for multiple selected aliases providing limited options for changing attributes of multiple aliases
|
||||
@@ -65,6 +62,8 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
private ToggleSwitch mMonitorAudioToggleSwitch;
|
||||
private ComboBox<Integer> mMonitorPriorityComboBox;
|
||||
private Button mApplyMonitorButton;
|
||||
private ToggleSwitch mRecordToggleSwitch;
|
||||
private Button mApplyRecordButton;
|
||||
|
||||
private BooleanProperty mChangeInProgressProperty;
|
||||
private ReadOnlyBooleanProperty mChangeInProgressROProperty;
|
||||
@@ -144,6 +143,17 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
GridPane.setConstraints(getApplyMonitorButton(), 4, row);
|
||||
gridPane.getChildren().add(getApplyMonitorButton());
|
||||
|
||||
Label recordLabel = new Label("Record");
|
||||
GridPane.setHalignment(recordLabel, HPos.RIGHT);
|
||||
GridPane.setConstraints(recordLabel, 0, ++row);
|
||||
gridPane.getChildren().add(recordLabel);
|
||||
|
||||
GridPane.setConstraints(getRecordToggleSwitch(), 1, row);
|
||||
gridPane.getChildren().add(getRecordToggleSwitch());
|
||||
|
||||
GridPane.setConstraints(getApplyRecordButton(), 4, row);
|
||||
gridPane.getChildren().add(getApplyRecordButton());
|
||||
|
||||
getChildren().add(gridPane);
|
||||
}
|
||||
|
||||
@@ -326,6 +336,19 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
return mMonitorAudioToggleSwitch;
|
||||
}
|
||||
|
||||
private ToggleSwitch getRecordToggleSwitch()
|
||||
{
|
||||
if(mRecordToggleSwitch == null)
|
||||
{
|
||||
mRecordToggleSwitch = new ToggleSwitch();
|
||||
mRecordToggleSwitch.setSelected(false);
|
||||
mRecordToggleSwitch.selectedProperty()
|
||||
.addListener((observable, oldValue, newValue) -> modifiedProperty().set(true));
|
||||
}
|
||||
|
||||
return mRecordToggleSwitch;
|
||||
}
|
||||
|
||||
private ComboBox<Integer> getMonitorPriorityComboBox()
|
||||
{
|
||||
if(mMonitorPriorityComboBox == null)
|
||||
@@ -346,8 +369,6 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
return mMonitorPriorityComboBox;
|
||||
}
|
||||
|
||||
private static int setCount = 0;
|
||||
|
||||
private Button getApplyMonitorButton()
|
||||
{
|
||||
if(mApplyMonitorButton == null)
|
||||
@@ -378,7 +399,6 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
for(Alias alias : getItem())
|
||||
{
|
||||
alias.setCallPriority(pri);
|
||||
//System.out.println(++setCount);
|
||||
}
|
||||
|
||||
endChange();
|
||||
@@ -389,6 +409,25 @@ public class AliasBulkEditor extends Editor<List<Alias>>
|
||||
return mApplyMonitorButton;
|
||||
}
|
||||
|
||||
private Button getApplyRecordButton()
|
||||
{
|
||||
if(mApplyRecordButton == null)
|
||||
{
|
||||
mApplyRecordButton = new Button("Apply");
|
||||
mApplyRecordButton.setOnAction(event -> {
|
||||
startChange();
|
||||
boolean record = getRecordToggleSwitch().isSelected();
|
||||
for(Alias alias : getItem())
|
||||
{
|
||||
alias.setRecordable(record);
|
||||
}
|
||||
endChange();
|
||||
});
|
||||
}
|
||||
|
||||
return mApplyRecordButton;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cell factory for combo box for dislaying icon name and graphic
|
||||
*/
|
||||
|
||||
@@ -387,7 +387,7 @@ public class AliasConfigurationEditor extends SplitPane
|
||||
idsColumn.setCellValueFactory(new IdentifierCountCell());
|
||||
|
||||
TableColumn<Alias, Boolean> errorsColumn = new TableColumn<>("Error");
|
||||
errorsColumn.setPrefWidth(80);
|
||||
errorsColumn.setPrefWidth(120);
|
||||
errorsColumn.setCellValueFactory(new PropertyValueFactory<>("overlap"));
|
||||
errorsColumn.setCellFactory(param ->
|
||||
{
|
||||
|
||||
@@ -362,7 +362,10 @@ public class AliasItemEditor extends Editor<Alias>
|
||||
for(AliasID aliasID: getIdentifiersList().getItems())
|
||||
{
|
||||
//Create a copy of the identifier so that the alias and the editor don't have the same instance
|
||||
alias.addAliasID(AliasFactory.copyOf(aliasID));
|
||||
//and reset the overlap flag (if set) so that the alias list can reevaluate the overlap state.
|
||||
AliasID copy = AliasFactory.copyOf(aliasID);
|
||||
copy.setOverlap(false);
|
||||
alias.addAliasID(copy);
|
||||
}
|
||||
|
||||
//Remove and replace alias actions
|
||||
|
||||
@@ -1059,6 +1059,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie
|
||||
{
|
||||
if(mCurrentCallEvent != null)
|
||||
{
|
||||
//Refresh the identifier collection before we close out the event
|
||||
mCurrentCallEvent.setIdentifierCollection(getIdentifierCollection().copyOf());
|
||||
mCurrentCallEvent.end(timestamp);
|
||||
broadcast(mCurrentCallEvent);
|
||||
mCurrentCallEvent = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2020 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
|
||||
@@ -20,6 +20,10 @@
|
||||
package io.github.dsheirer.preference.javafx;
|
||||
|
||||
import io.github.dsheirer.preference.decoder.JmbeLibraryPreference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.prefs.Preferences;
|
||||
import javafx.beans.value.ChangeListener;
|
||||
import javafx.beans.value.ObservableValue;
|
||||
import javafx.collections.ObservableList;
|
||||
@@ -28,11 +32,6 @@ import javafx.stage.Stage;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
/**
|
||||
* Manages user preferences for JavaFX elements (e.g. stages).
|
||||
*/
|
||||
@@ -59,7 +58,7 @@ public class JavaFxPreferences
|
||||
*/
|
||||
public void monitor(Stage stage, String key)
|
||||
{
|
||||
mStageMonitors.remove(new StageMonitor(stage, key));
|
||||
mStageMonitors.add(new StageMonitor(stage, key));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,6 +80,21 @@ public class JavaFxPreferences
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all stage monitors and prepares for shutdown.
|
||||
*/
|
||||
public void clearStageMonitors()
|
||||
{
|
||||
Iterator<StageMonitor> it = mStageMonitors.iterator();
|
||||
|
||||
while(it.hasNext())
|
||||
{
|
||||
StageMonitor next = it.next();
|
||||
it.remove();
|
||||
next.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Monitors a stage's coordinates and stores location. On construction, applies stored coordinates to the stage.
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class R8xEmbeddedTuner extends EmbeddedTuner
|
||||
private static final byte VERSION = (byte) 49;
|
||||
protected static final int IF_FREQUENCY = 3570000;
|
||||
private static final Logger mLog = LoggerFactory.getLogger(R8xEmbeddedTuner.class);
|
||||
private static int mVcoPowerRef = 1;
|
||||
private int mVcoPowerRef = 1;
|
||||
|
||||
/**
|
||||
* Shadow register is used to keep a cached (in-memory) copy of all registers, so that we don't have to read a
|
||||
@@ -232,7 +232,7 @@ public abstract class R8xEmbeddedTuner extends EmbeddedTuner
|
||||
FrequencyDivider divider = FrequencyDivider.fromFrequency(frequency);
|
||||
int statusRegister4 = getStatusRegister(4, controlI2C);
|
||||
int vco_fine_tune = (statusRegister4 & 0x30) >> 4;
|
||||
int div_num = divider.getDividerNumber(vco_fine_tune);
|
||||
int div_num = divider.getDividerNumber(vco_fine_tune, mVcoPowerRef);
|
||||
writeRegister(Register.DIVIDER, (byte) (div_num << 5), controlI2C);
|
||||
/* Get the integral number for this divider and frequency */
|
||||
Integral integral = divider.getIntegral(frequency);
|
||||
@@ -984,17 +984,17 @@ public abstract class R8xEmbeddedTuner extends EmbeddedTuner
|
||||
mIntegralValue = integralValue;
|
||||
}
|
||||
|
||||
public int getDividerNumber(int vcoFineTune)
|
||||
public int getDividerNumber(int vcoFineTune, int vcoPowerRef)
|
||||
{
|
||||
if(vcoFineTune == mVcoPowerRef)
|
||||
if(vcoFineTune == vcoPowerRef)
|
||||
{
|
||||
return mDividerNumber;
|
||||
}
|
||||
else if(vcoFineTune < mVcoPowerRef)
|
||||
else if(vcoFineTune < vcoPowerRef)
|
||||
{
|
||||
return mDividerNumber - 1;
|
||||
}
|
||||
else if(vcoFineTune > mVcoPowerRef)
|
||||
else if(vcoFineTune > vcoPowerRef)
|
||||
{
|
||||
return mDividerNumber + 1;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class R828DEmbeddedTuner extends R8xEmbeddedTuner
|
||||
}
|
||||
catch(UsbException e)
|
||||
{
|
||||
throw new SourceException("R820TTunerController - exception while setting frequency [" + frequency + "] - " +
|
||||
throw new SourceException("R828DTunerController - exception while setting frequency [" + frequency + "] - " +
|
||||
e.getLocalizedMessage());
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user