Exemple #1
0
        void _wip_WalkingInPlaceEvent(object sender, WalkingInPlaceEventArgs e)
        {
            if (WipActive)
            {
                this.stateTextBox.Text       = "  Wip State:   Active";
                this.stateTextBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF42962A"));
            }
            else
            {
                this.stateTextBox.Text       = "  Wip State:   Not Active (do activation gesture)";
                this.stateTextBox.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FFBA3535"));
            }


            if (_udp != null)
            {
                string v       = ("" + e.Velocity).Replace(',', '.');
                string aOffset = ("" + e.AngularOffset).Replace(',', '.');



                if (WipActive)
                {
                    _udp.send("wipevent/" + WipActive + "/velocity=" + v + "/angularoffset=" + aOffset);
                    dashboardVelocityLabel.Text    = "" + Math.Round(e.Velocity, 3) + " m/s";
                    dashboardOrientationLabel.Text = "" + Math.Round((e.AngularOffset * _wip.VeFrameRate), 3);
                }
                else
                {
                    _udp.send("wipevent/" + WipActive + "/velocity=0/angularoffset=0");
                    dashboardVelocityLabel.Text    = "0 m/s";
                    dashboardOrientationLabel.Text = "0";
                }
            }
        }
Exemple #2
0
 protected virtual void OnWalkingInPlaceEvent(WalkingInPlaceEventArgs e)
 {
     if (WalkingInPlaceEvent != null)
     {
         WalkingInPlaceEvent(this, e);
     }
 }