void myTimer_Tick(object sender, EventArgs e) { ShakeDetection.GVector gv = new ShakeDetection.GVector(mySensor.Acceleration.GForceX, mySensor.Acceleration.GForceY, mySensor.Acceleration.GForceZ); processData(gv); }
void mySensor_AccelerationEvent(object sender, Sensor.AccelerationArgs AccelerationArgs) { ShakeDetection.GVector gv = new ShakeDetection.GVector(AccelerationArgs.GForceX, AccelerationArgs.GForceY, AccelerationArgs.GForceZ); processData(gv); }
private void processData(ShakeDetection.GVector gv) { if (starting) { return; } labelGFX.Text = gv.X.ToString("0.00000"); labelGFY.Text = gv.Y.ToString("0.00000"); labelGFZ.Text = gv.Z.ToString("0.00000"); lblOrientation.Text = gv.ToScreenOrientation().ToString(); lblDirection.Text = gv.direction.ToString(); lblTilt.Text = gv.Tilt.ToString("0"); lblRoll.Text = gv.Roll.ToString("0"); lblPitch.Text = gv.Pitch.ToString("0"); lblAcceleration.Text = gv.Length.ToString("0.0"); addLog(gv.ToString()); shaker1.addValues(gv); shaker2.addValues(gv); shaker3.addValues(gv); shaker4.addValues(gv); shaker5.addValues(gv); shaker6.addValues(gv); shaker7.addValues(gv); shaker8.addValues(gv); shaker9.addValues(gv); Movedetection.GMVector gmv = new Movedetection.GMVector(gv.X, gv.Y, gv.Z); move1.addValues(gmv); perfChart1._AddValue((decimal)gv.X); perfChart2._AddValue((decimal)gv.Y); perfChart3._AddValue((decimal)gv.Z); }
void myTimer_Tick(object sender, EventArgs e) { ShakeDetection.GVector gv = new ShakeDetection.GVector(mySensor.Acceleration.GForceX, mySensor.Acceleration.GForceY, mySensor.Acceleration.GForceZ); processData(gv); }
void mySensor_AccelerationEvent(object sender, Sensor.AccelerationArgs AccelerationArgs) { ShakeDetection.GVector gv = new ShakeDetection.GVector(AccelerationArgs.GForceX, AccelerationArgs.GForceY, AccelerationArgs.GForceZ); processData(gv); }