Ejemplo n.º 1
0
 public bool Equals(CscMeasurement measurement)
 {
     return(WheelRevolutions == measurement.WheelRevolutions &&
            WheelEventTimestamp == measurement.WheelEventTimestamp &&
            CrankRevolutions == measurement.CrankRevolutions &&
            CrankEventTimestamp == measurement.CrankEventTimestamp);
 }
Ejemplo n.º 2
0
        public CscMeasurement GetDifference(CscMeasurement previous)
        {
            var diff = new CscMeasurement
            {
                WheelRevolutions    = WheelRevolutions - previous.WheelRevolutions,
                WheelEventTimestamp = (ushort)(WheelEventTimestamp - previous.WheelEventTimestamp),
                CrankRevolutions    = (ushort)(CrankRevolutions - previous.CrankRevolutions),
                CrankEventTimestamp = (ushort)(CrankEventTimestamp - previous.CrankEventTimestamp)
            };

            return(diff);
        }