French MPT1327 fixes. Discovered that entire bit stream is inverted, and system is using SYNC (0xB433) and SYNT (0x4BCC) sync patterns.

This commit is contained in:
dennis.sheirer
2014-08-06 01:24:26 +00:00
parent 63de9c6d7d
commit 0eddada70e
4 changed files with 86 additions and 13 deletions

View File

@@ -19,6 +19,8 @@ package crc;
import java.util.BitSet;
import log.Log;
/**
* Fleetsync CRC checksum utility
*
@@ -204,4 +206,47 @@ public class CRCFleetsync
return retVal;
}
public static void main( String[] args )
{
BitSet test = new BitSet();
int[] msg = new int[]
{ 1,1,0,1,1,1,0,1,0,1,1,1,0,1,1,0,
0,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,
0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
0,1,0,0,1,0,1,1,1,1,0,0,1,1,0,0 };
for( int x = 0; x < msg.length; x++ )
{
if( msg[ x ] == 0 )
{
test.clear( x );
}
else if( msg[ x ] == 1 )
{
test.set( x );
}
}
CRC result = check( test );
Log.info( "CRC:" + result.toString() );
// for( int y = 0; y < 64; y++ )
// {
// BitSet test2 = test.get( y, y + 63 );
//
// if( test2.get( 63 ) )
// {
// test2.clear( 63 );
// }
// else
// {
// test2.set( 63 );
// }
// CRC result = check( test2 );
//
// Log.info( y + " crc:" + result.toString() );
// }
}
}