public DataLogger(Vector2 startingpos, bool dragging = true) { Position = startingpos; Dragging = dragging; ImageSrc = "/DataLogger.png"; Size = new Vector2(320, 160); CalculationData = new AccelerationCalculationData(); PortData = new VelocityTimestampData[2]; SetStyle(); }
public VelocityTimestampData ReturnData() { VelocityTimestampData temp = new VelocityTimestampData { Velocity = (Data as VelocityTimestampData).Velocity, TimeStamp = (Data as VelocityTimestampData).TimeStamp }; Data = new VelocityTimestampData() { TimeStamp = null }; return(temp); }
public LightGate(Vector2 startingpos, bool dragging = true) { Data = new VelocityTimestampData(); ImageSrc = "/media/LightGate.png"; Position = startingpos; Size = new Vector2(41, 41); BoundingBox = new Rectangle() { Size = Size }; Dragging = dragging; SetBoundingBox(); SetStyle(); }
public void ReceiveData(int portNumber, VelocityTimestampData data) { if (portNumber < 0 || portNumber >= _numPorts) { return; } if (portNumber == 0) { ResetData(); } else if (portNumber > 0) { if (PortData[0] == null || PortData[portNumber] != null) { return; } } PortData[portNumber] = data; EvaulateData(); }