mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-13 09:07:27 -05:00
Converted frequency to long primitive type (from integer) in anticipation of HackRF support which requires frequencies greater than 2.147 GHz, which is the max hertz value that can be represented by an integer primitive.
This commit is contained in:
@@ -25,14 +25,14 @@ import decode.DecoderType;
|
||||
public class PassportCallEvent extends CallEvent
|
||||
{
|
||||
private int mChannel;
|
||||
private int mFrequency;
|
||||
private long mFrequency;
|
||||
|
||||
public PassportCallEvent( CallEventType callEventType,
|
||||
AliasList aliasList,
|
||||
String fromID,
|
||||
String toID,
|
||||
int channel,
|
||||
int frequency,
|
||||
long frequency,
|
||||
String details )
|
||||
{
|
||||
super( DecoderType.PASSPORT, callEventType,
|
||||
@@ -81,7 +81,7 @@ public class PassportCallEvent extends CallEvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFrequency()
|
||||
public long getFrequency()
|
||||
{
|
||||
return mFrequency;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class PassportCallEvent extends CallEvent
|
||||
private String mToID;
|
||||
private String mDetails;
|
||||
private int mChannel;
|
||||
private int mFrequency;
|
||||
private long mFrequency;
|
||||
|
||||
public Builder( CallEventType callEventType )
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public class PassportCallEvent extends CallEvent
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder frequency( int frequency )
|
||||
public Builder frequency( long frequency )
|
||||
{
|
||||
mFrequency = frequency;
|
||||
return this;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PassportChannelState extends ChannelState
|
||||
private String mMobileID;
|
||||
private Alias mMobileIDAlias;
|
||||
private int mChannelNumber;
|
||||
private int mFrequency;
|
||||
private long mFrequency;
|
||||
private PassportCallEvent mCurrentCallEvent;
|
||||
private PassportActivitySummary mActivitySummary;
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@ import decode.DecoderType;
|
||||
public class PassportMessage extends Message
|
||||
{
|
||||
private static final String sUNKNOWN = "**UNKNOWN**";
|
||||
private static final int sINT_NULL_VALUE = -1;
|
||||
private static final double sDOUBLE_NULL_VALUE = -1.0D;
|
||||
private SimpleDateFormat mSDF = new SimpleDateFormat( "yyyyMMdd HHmmss" );
|
||||
private DecimalFormat mDecimalFormatter = new DecimalFormat("0.00000");
|
||||
|
||||
@@ -189,7 +187,7 @@ public class PassportMessage extends Message
|
||||
return getInt( sLCN );
|
||||
}
|
||||
|
||||
public int getLCNFrequency()
|
||||
public long getLCNFrequency()
|
||||
{
|
||||
return getSiteFrequency( getLCN() );
|
||||
}
|
||||
@@ -209,7 +207,7 @@ public class PassportMessage extends Message
|
||||
return PassportBand.lookup( getInt( sNEIGHBOR_BAND ) );
|
||||
}
|
||||
|
||||
public int getFrequency( int base, int channel )
|
||||
public long getFrequency( int base, int channel )
|
||||
{
|
||||
return ( base + ( channel * 12500 ) );
|
||||
}
|
||||
@@ -219,7 +217,7 @@ public class PassportMessage extends Message
|
||||
return getInt( sFREE );
|
||||
}
|
||||
|
||||
public int getFreeFrequency()
|
||||
public long getFreeFrequency()
|
||||
{
|
||||
return getSiteFrequency( getFree() );
|
||||
}
|
||||
@@ -229,18 +227,16 @@ public class PassportMessage extends Message
|
||||
return mDecimalFormatter.format( (double)getFreeFrequency() / 1000000.0d );
|
||||
}
|
||||
|
||||
public int getNeighborFrequency()
|
||||
public long getNeighborFrequency()
|
||||
{
|
||||
int retVal = 0;
|
||||
|
||||
if( getMessageType() == MessageType.SY_IDLE )
|
||||
{
|
||||
PassportBand band = getNeighborBand();
|
||||
|
||||
retVal = getFrequency( band.getBase(), getFree() );
|
||||
return getFrequency( band.getBase(), getFree() );
|
||||
}
|
||||
|
||||
return retVal;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -392,10 +388,8 @@ public class PassportMessage extends Message
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getSiteFrequency( int channel )
|
||||
public long getSiteFrequency( int channel )
|
||||
{
|
||||
int freq = 0;
|
||||
|
||||
if( mIdleMessage != null && 0 < channel && channel < 1792 )
|
||||
{
|
||||
PassportBand band = mIdleMessage.getSiteBand();
|
||||
@@ -404,11 +398,11 @@ public class PassportMessage extends Message
|
||||
{
|
||||
int base = band.getBase();
|
||||
|
||||
freq = getFrequency( base, channel );
|
||||
return getFrequency( base, channel );
|
||||
}
|
||||
}
|
||||
|
||||
return freq;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user