Exemplo n.º 1
0
		private void DroneStatusChanged(object sender, DroneStatusChangedEventArgs e)
		{
			if((int)e.FormerStatus < (int)DroneStatus.Available)
			{
				if ((int)drone.Status >= (int)DroneStatus.Available)
					Initialize();
			}
		}
Exemplo n.º 2
0
		private void DroneStatusChanged(object sender, DroneStatusChangedEventArgs e)
		{
			if((int)e.FormerStatus < (int)DroneStatus.Connected)
			{
				if ((int)drone.Status >= (int)DroneStatus.Connected)
					Initialize();
			}
			if((int)e.FormerStatus < (int)DroneStatus.Ready && (int)this.drone.Status == (int)DroneStatus.Ready)
				SendMessage("AT*CTRL=1,0,0\r");
		}
Exemplo n.º 3
0
		private void DroneStatusChanged(object sender, DroneStatusChangedEventArgs e)
		{
			if((int)e.FormerStatus < (int)DroneStatus.Available)
			{
				if (((int)e.Status) >= ((int)DroneStatus.Available))
				{
					SendInit();
					initTimer.Enabled = true;
				}
			}
			if((int)e.FormerStatus == (int)DroneStatus.Available)
			{
				initTimer.Enabled = false;
			}
		}
Exemplo n.º 4
0
		private void Host_StatusChanged(object sender, DroneStatusChangedEventArgs e)
		{
			if ((int)host.Status == (int)DroneStatus.NotConnected)
				StartPinging();
		}
Exemplo n.º 5
0
		protected virtual void OnStatusChanged(DroneStatusChangedEventArgs e)
		{
			EventHandler<DroneStatusChangedEventArgs> handler = StatusChanged;
			if (handler != null)
            	handler(this, e);
		}