Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        public VelocityTimestampData ReturnData()
        {
            VelocityTimestampData temp = new VelocityTimestampData
            {
                Velocity  = (Data as VelocityTimestampData).Velocity,
                TimeStamp = (Data as VelocityTimestampData).TimeStamp
            };

            Data = new VelocityTimestampData()
            {
                TimeStamp = null
            };
            return(temp);
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }