public DrivePage() { InitializeComponent(); if (App.CurrentConnection != null) { MessageBox.Show(string.Format("Connected to {0}", App.CurrentConnection.BluetoothName)); _spheroDevice = new SpheroDevice(App.CurrentConnection); _spheroDevice.SetBackLED(1.0f); spheroJoystick.Start(); } else NavigationService.GoBack(); }
public GamePlayPage() { this.InitializeComponent(); this.navigationHelper = new NavigationHelper(this); this.navigationHelper.LoadState += navigationHelper_LoadState; this.navigationHelper.SaveState += navigationHelper_SaveState; //Initizlizes Bluetooth connection if (App.CurrentConnection != null) { _spheroDevice = new SpheroDevice(App.CurrentConnection); _spheroDevice.SetBackLED(1.0f); spheroJoystick.Start(); } }
public CalibrationPage() { InitializeComponent(); if (App.CurrentConnection != null) { _spheroDevice = new SpheroDevice(App.CurrentConnection); // OFF Stabilization et set LEDs _spheroDevice.StabilizationOFF(); _spheroDevice.SetRGBLED(0.5f, 0, 0); _spheroDevice.SetBackLED(1.0f); } else NavigationService.GoBack(); }
public DrivePage() { InitializeComponent(); if (App.CurrentConnection != null) { MessageBox.Show(string.Format("Connected to {0}", App.CurrentConnection.BluetoothName)); _spheroDevice = new SpheroDevice(App.CurrentConnection); _spheroDevice.SetBackLED(1.0f); // Configure collision detection and subscribe to detection event _spheroDevice.ConfigureCollisionDetection(CollisionMethod.Enable, 125, 125, 125, 125, 50); _spheroDevice.CollisionDetected += _spheroDevice_CollisionDetected; spheroJoystick.Start(); } else NavigationService.GoBack(); }