@@ -494,23 +494,6 @@ public class BTStream {
494494 public static final int MAX_NUMBER_OF_SIGNALS = 77 ;//50; //used to be 11 but now 13 because of the SR30 + 8 for 3d orientation
495495 public static final int MAX_INQUIRY_PACKET_SIZE = 47 ;
496496
497- /**
498- * Maximum allowed gap between consecutive packet timestamps in ticks (10 seconds at 32768 Hz).
499- * Used to detect corrupted packets that pass CRC checks.
500- * <p>
501- * Why 10 seconds: Empirically chosen to balance between catching data corruption and allowing for
502- * occasional transmission delays. This value can be tuned based on expected packet arrival rates.
503- * <p>
504- * Setting to 0 disables this check entirely.
505- * <p>
506- * Relationship to timestamp rollover: This value must be less than half the timestamp rollover period
507- * (i.e., the maximum value before the timestamp counter wraps) to avoid false positives due to rollover.
508- * <p>
509- * Sampling rate: The value is calculated for a 32768 Hz sampling rate. If a different sampling rate is used,
510- * this value should be adjusted accordingly (ticks = seconds * sampling rate).
511- */
512- public static int CONTIGUOUS_TIMESTAMP_TICKS_LIMIT = (10 *32768 );
513-
514497 public enum TEST_MODE {
515498 MAIN_TEST ((byte )0 , "Main Test" ),
516499 LED_TEST ((byte )1 , "LED Test" ),
@@ -802,11 +785,6 @@ public String toString() {
802785 protected boolean mPastGSRFirstTime =true ; // this is to fix a bug with SDLog v0.9
803786
804787 // ---------- GSR end ------------------
805-
806- /**
807- * Stores the last received timestamp in ticks (for detecting corrupted packets).
808- */
809- protected double mLastReceivedTimeStampTicks = 0 ;
810788
811789 public ObjectCluster setLSLTimeIfAvailable (ObjectCluster ojc ) {
812790 return ojc ;
@@ -945,24 +923,6 @@ public ObjectCluster buildMsg(byte[] newPacket, COMMUNICATION_TYPE fwType, boole
945923
946924 if (getHardwareVersion ()==HW_ID .SHIMMER_SR30 || getHardwareVersion ()==HW_ID .SHIMMER_3 || getHardwareVersion ()==HW_ID .SHIMMER_3R
947925 || getHardwareVersion ()==HW_ID .SHIMMER_GQ_802154_LR || getHardwareVersion ()==HW_ID .SHIMMER_GQ_802154_NR || getHardwareVersion ()==HW_ID .SHIMMER_2R_GQ ){
948-
949- /*
950- * Even with checking for start and stop of packets while parsing and performing
951- * CRC checks, some corrupted packets can still slip through. This is a final
952- * check to help make sure the time stamp ticks are contiguous before parsing the
953- * packet.
954- */
955- if (fwType == COMMUNICATION_TYPE .BLUETOOTH && CONTIGUOUS_TIMESTAMP_TICKS_LIMIT != 0 )
956- {
957- double shimmerTimestampTicks = (double )newPacketInt [getSignalIndex (Configuration .Shimmer3 .ObjectClusterSensorName .TIMESTAMP )];
958- if (mLastReceivedTimeStampTicks !=0
959- && Math .abs (shimmerTimestampTicks - mLastReceivedTimeStampTicks ) > CONTIGUOUS_TIMESTAMP_TICKS_LIMIT ) {
960- objectCluster .successfullyParsed = false ;
961- return objectCluster ; //discard packet
962- }
963- mLastReceivedTimeStampTicks = shimmerTimestampTicks ;
964- }
965-
966926 parseTimestampShimmer3 (fwType , objectCluster , uncalibratedData , uncalibratedDataUnits , calibratedData , calibratedDataUnits , sensorNames , newPacketInt );
967927
968928 //OFFSET
0 commit comments