private void timer1_Tick(object sender, EventArgs e) { if (antenaTracker.IsOpen()) { if (firstTime) { firstTime = false; antTrackConfig = antenaTracker.ReadConfig(); UpdateControles(); panel1.Enabled = true; control_pan = (short)(int)numericUpDownServoPANcenter.Value; control_tilt = (short)(int)numericUpDownServoTILTcenter.Value; } labelStatus.Text = "Connected!"; labelStatus.ForeColor = Color.Green; // Aqui se envia realmente el comando.... mover de sitio? AntTrackerDebug dbg = new AntTrackerDebug(); dbg.pan = control_pan; dbg.tilt = control_tilt; dbg.EnableDebug = 0x05; antenaTracker.WriteDebugInfo(dbg); } else { labelStatus.Text = "Not connected."; labelStatus.ForeColor = Color.Red; } }
private void timer1_Tick(object sender, EventArgs e) { AntenaTracker antenaTracker = new AntenaTracker(); if (antenaTracker.IsOpen()) { if (firstTime) { antTrackConfig = antenaTracker.ReadConfig(); UpdateControles(); panel1.Enabled = true; firstTime = false; control_pan = numericUpDownServoPANcenter; control_tilt = numericUpDownServoTILTcenter; } labelStatus.Text = "Connected!"; labelStatus.ForeColor = Color.Green; AntTrackerDebug dbg = new AntTrackerDebug(); dbg.pan = (short)control_pan.Value; dbg.tilt = (short)control_tilt.Value; dbg.EnableDebug = 0x05; antenaTracker.WriteDebugInfo(dbg); antenaTracker.Close(); } else { labelStatus.Text = "Not connected."; labelStatus.ForeColor = Color.Red; } }
private void button3_Click(object sender, EventArgs e) { AntenaTracker antenaTracker = new AntenaTracker(); antTrackConfig = antenaTracker.ReadConfig(); antenaTracker.Close(); UpdateControles(); }