private static void SlaveBwResultEvent(Optoel.Optoel.Ble.BleSlave.BwResultArgs e) { switch (e.Sensor) { case Optoel.Optoel.Sensor.Accel: Console.WriteLine("Accel Bw: " + e.Bw.ToString()); bleSlave.GyroSetBw(Optoel.Optoel.GyroBw.GyroBw_100Hz); break; case Optoel.Optoel.Sensor.Gyro: Console.WriteLine("Gyro Bw: " + e.Bw.ToString()); bleSlave.MagnoSetBw(Optoel.Optoel.MagnoBw.MagnoBw_30Hz); break; case Optoel.Optoel.Sensor.Magno: Console.WriteLine("Magno Bw: " + e.Bw.ToString()); bleSlave.AccelSetRange(Optoel.Optoel.AccelRange.AccelRange_4g); break; } }
private static void BwResultEvent(Optoel.Optoel.Ble.BleSlave sender, Optoel.Optoel.Ble.BleSlave.BwResultArgs e) { switch (e.Sensor) { case Optoel.Optoel.Sensor.Accel: Console.WriteLine(sender.SlaveNumber + ". Device Accel Bw: " + e.Bw.ToString()); sender.GyroSetBw(Optoel.Optoel.GyroBw.GyroBw_100Hz); break; case Optoel.Optoel.Sensor.Gyro: Console.WriteLine(sender.SlaveNumber + ". Device Gyro Bw: " + e.Bw.ToString()); sender.MagnoSetBw(Optoel.Optoel.MagnoBw.MagnoBw_30Hz); break; case Optoel.Optoel.Sensor.Magno: Console.WriteLine(sender.SlaveNumber + ". Device Magno Bw: " + e.Bw.ToString()); sender.AccelSetRange(Optoel.Optoel.AccelRange.AccelRange_4g); break; } }