public static void StartTimer(RCTX _drone) { // Set the Interval to 0.1 seconds. (was 1) s_timer.Interval = 100; s_timer.Enabled = true; drone = _drone; }
public MainWindow() { InitializeComponent(); // drone drone = new RCTX(); // GUI timer StartRefreshTimer(); // Servo timer inertia = new DispatcherTimer(); inertia.Tick += new EventHandler(inertia_Elapsed); inertia.Interval = new TimeSpan(0, 0, 0, 0, 50); //set the timer to call its callback function every 50ms // drone timer VehicleTimer.StartTimer(drone); //initialise the packet sender }