mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Merges from master branch.
This commit is contained in:
@@ -1,26 +1,23 @@
|
||||
/*******************************************************************************
|
||||
* SDR Trunk
|
||||
* Copyright (C) 2014 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* sdr-trunk
|
||||
* Copyright (C) 2014-2017 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 the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program.
|
||||
* If not, see <http://www.gnu.org/licenses/>
|
||||
*
|
||||
******************************************************************************/
|
||||
package io.github.dsheirer.source.config;
|
||||
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.source.SourceType;
|
||||
import io.github.dsheirer.source.tuner.TunerChannel;
|
||||
import io.github.dsheirer.source.tuner.TunerChannel.Type;
|
||||
import io.github.dsheirer.source.tuner.channel.TunerChannel;
|
||||
|
||||
public class SourceConfigRecording extends SourceConfiguration
|
||||
{
|
||||
@@ -59,11 +56,11 @@ public class SourceConfigRecording extends SourceConfiguration
|
||||
{
|
||||
return getRecordingAlias();
|
||||
}
|
||||
|
||||
public TunerChannel getTunerChannel()
|
||||
{
|
||||
/* Create a tuner channel with a default bandwidth of 15 kHz */
|
||||
return new TunerChannel( Type.LOCKED, mFrequency, 15000 );
|
||||
}
|
||||
|
||||
|
||||
public TunerChannel getTunerChannel()
|
||||
{
|
||||
/* Create a tuner channel with a default bandwidth of 12.5 kHz */
|
||||
return new TunerChannel(mFrequency, 12500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,15 +21,14 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import io.github.dsheirer.source.SourceType;
|
||||
import io.github.dsheirer.source.tuner.TunerChannel;
|
||||
import io.github.dsheirer.source.tuner.TunerChannel.Type;
|
||||
import io.github.dsheirer.source.tuner.channel.TunerChannel;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
@JsonSubTypes.Type(value = SourceConfigTuner.class, name = "sourceConfigTuner")
|
||||
public class SourceConfigTuner extends SourceConfiguration
|
||||
{
|
||||
private static DecimalFormat sFORMAT = new DecimalFormat("0.00000");
|
||||
private static DecimalFormat FREQUENCY_FORMAT = new DecimalFormat("0.00000");
|
||||
|
||||
private long mFrequency = 0;
|
||||
private int mBandwidth = 12500;
|
||||
@@ -62,12 +61,12 @@ public class SourceConfigTuner extends SourceConfiguration
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return sFORMAT.format((double)mFrequency / 1000000.0d) + " MHz";
|
||||
return FREQUENCY_FORMAT.format((double)mFrequency / 1000000.0d) + " MHz";
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public TunerChannel getTunerChannel()
|
||||
{
|
||||
return new TunerChannel(Type.LOCKED, mFrequency, mBandwidth);
|
||||
return new TunerChannel(mFrequency, mBandwidth);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user