Exemple #1
0
 public Xdk()
 {
     AccelerometerSensor      = new Accelerometer();
     GyroSensor               = new GyroSensor();
     LightSensor              = new LightSensor();
     NoiseSensor              = new NoiseSensor();
     MagnetometerSensor       = new Magnetometer();
     Environment              = new EnvironmentSensor();
     DisplayName              = "XDK";
     NotificationSamplingTime = new SensorValue <uint> {
         Value = 100, Min = 20, Max = 1000
     };
     IsSdCardInserted = new SensorValue <byte> {
         Min = 0, Max = 1
     };
     CalculatedAttitude = new Quaternion();
     Orientation        = new Orientation();
     Leds = new Led[LedCount];
     for (int i = 0; i < LedCount; i++)
     {
         Leds[i] = new Led();
     }
     Leds[0].Color = LedColor.Yellow;
     Leds[1].Color = LedColor.Orange;
     Leds[2].Color = LedColor.Red;
 }
Exemple #2
0
 public Magnetometer()
 {
     XAxis      = new SensorValue <Int16>();
     YAxis      = new SensorValue <Int16>();
     ZAxis      = new SensorValue <Int16>();
     Resistance = new SensorValue <Int16> {
         Min = 0, Max = 2000
     };
 }
Exemple #3
0
 public NoiseSensor()
 {
     DbSpl = new SensorValue <byte> {
         Min = 0, Max = 100
     };
 }
Exemple #4
0
 public GyroSensor()
 {
     XAxis = new SensorValue <short>();
     YAxis = new SensorValue <Int16>();
     ZAxis = new SensorValue <Int16>();
 }
Exemple #5
0
 public Accelerometer()
 {
     XAxis = new SensorValue <short>();
     YAxis = new SensorValue <short>();
     ZAxis = new SensorValue <short>();
 }