示例#1
0
 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;
 }
示例#2
0
 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
 }