forked from CPL/Simulator
update
This commit is contained in:
@ -38,6 +38,15 @@ namespace DroneSimulator
|
||||
Drone drone = new Drone(data.ID);
|
||||
drone.Create(1.0f, 0.5f, 1.0f);
|
||||
|
||||
//
|
||||
drone.dataBarometer.Pressure = 102258;
|
||||
drone.dataBarometer.Accuracy = (float)numericUpDown_Bar_Accur.Value;
|
||||
drone.dataBarometer.Frequency = (int)numericUpDown_Bar_Freq.Value;
|
||||
try { drone.dataBarometer.Pressure = int.Parse(textBox_Bar_Pressure.Text); }
|
||||
catch { MessageBox.Show("Pressure invalid format", "Barometer error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
|
||||
|
||||
//
|
||||
|
||||
screen2D.CreateDrone(Color.Red, data.ID);
|
||||
|
||||
AllDrones.Add(drone);
|
||||
@ -99,6 +108,7 @@ namespace DroneSimulator
|
||||
{
|
||||
button_Client_Start.Text = "Stop";
|
||||
button_Client_Start.BackColor = Color.LimeGreen;
|
||||
panel_Menu_Model.Enabled = false;
|
||||
break;
|
||||
}
|
||||
case NetServerClients.ServerState.Stop:
|
||||
@ -106,6 +116,7 @@ namespace DroneSimulator
|
||||
label_Clients_Num.Text = "0";
|
||||
button_Client_Start.Text = "Start";
|
||||
button_Client_Start.BackColor = Color.Transparent;
|
||||
panel_Menu_Model.Enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user