mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Updates pull request from Roman Tsypuk to convert the build system from
ant to gradle. Removes linux and windows application launch scripts and produces an executable jar with all resources included.
This commit is contained in:
33
src/main/java/io/github/dsheirer/bits/SyncDetector.java
Normal file
33
src/main/java/io/github/dsheirer/bits/SyncDetector.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package io.github.dsheirer.bits;
|
||||
|
||||
public class SyncDetector implements ISyncProcessor
|
||||
{
|
||||
private long mPattern;
|
||||
private ISyncDetectListener mListener;
|
||||
|
||||
public SyncDetector( long pattern )
|
||||
{
|
||||
mPattern = pattern;
|
||||
}
|
||||
|
||||
public SyncDetector( long pattern, ISyncDetectListener listener )
|
||||
{
|
||||
this( pattern );
|
||||
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
public void setListener( ISyncDetectListener listener )
|
||||
{
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkSync( long value )
|
||||
{
|
||||
if( value == mPattern && mListener != null )
|
||||
{
|
||||
mListener.syncDetected();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user