public void FromRegistry() { RegistryKey key = Registry.CurrentUser.OpenSubKey(registryPath); if (key != null) { try { this.GoogleMapsCookie = (string)key.GetValue("GoogleMapsCookie"); this.HomeLon = float.Parse(key.GetValue("HomeLon").ToString(),CultureInfo.InvariantCulture); this.HomeLat = float.Parse(key.GetValue("HomeLat").ToString(), CultureInfo.InvariantCulture); this.HomeAlt = float.Parse(key.GetValue("HomeAlt").ToString(), CultureInfo.InvariantCulture); this.videoCaptureStr = (string)key.GetValue("VideoCaptureStr"); this.telemetria = (Telemetria)key.GetValue("Telemetry"); this.videosystem = (VideoSystem)key.GetValue("VideoSystem"); this.commPort = (string)key.GetValue("CommPort"); this.commBps = (int)key.GetValue("CommBauds"); this.CacheMapsPath = (string)key.GetValue("CacheMapsPath"); this.FlightLogPath = (string)key.GetValue("FlightLogPath"); this.cells1 = (int)key.GetValue("CellCount1"); this.cells2 = (int)key.GetValue("CellCount2"); this.moduloTX = (Singleton.ModuloControl)(int)key.GetValue("ModuloTX"); try { for (int i = 0; i < servo_ch.Length; i++) { this.servo_min[i] = (int)key.GetValue("ServoMin" + i); this.servo_center[i] = (int)key.GetValue("ServoCenter" + i); this.servo_max[i] = (int)key.GetValue("ServoMax" + i); this.servo_rev[i] = (int)key.GetValue("ServoRev" + i) == 1; this.servo_ch[i] = (byte)((int)key.GetValue("ServoCh" + i)); } for (int i = 0; i < 16; i++) { this.joy_buttons[i] = (byte)((int)key.GetValue("JoyButtom" + i)); } this.tipo_mezcla = (Mezclas)key.GetValue("TipoMezcla"); // this.tipo_control = (ModoControl)key.GetValue("TipoControl"); this.rev_mix = (int)key.GetValue("rev_mix") == 1; this.rev_flap = (int)key.GetValue("rev_flap") == 1; this.full_flap = float.Parse(key.GetValue("full_flap").ToString()); this.step_flap = float.Parse(key.GetValue("step_flap").ToString()); this.pantilt_speed = float.Parse(key.GetValue("pantilt_speed").ToString()); this.enable_axis = (int)key.GetValue("AXISenable") == 1; this.enable_pan = (int)key.GetValue("PANenable") == 1; this.enable_tilt = (int)key.GetValue("TILTenable") == 1; this.enable_headtrack = (int)key.GetValue("enable_headtrack") == 1; object pepe = key.GetValue("headtrack_panCh"); this.headtrack_panCh = (byte)((int)key.GetValue("headtrack_panCh")); this.headtrack_tiltCh = (byte)((int)key.GetValue("headtrack_tiltCh")); this.uplinkVmax = float.Parse(key.GetValue("uplinkVmax").ToString(), CultureInfo.InvariantCulture); this.uplinkVmin = float.Parse(key.GetValue("uplinkVmin").ToString(), CultureInfo.InvariantCulture); this.uplinkValarm = float.Parse(key.GetValue("uplinkValarm").ToString(), CultureInfo.InvariantCulture); this.uplinkLipo = (int)key.GetValue("uplinkLipo") == 1; this.uplinkNumCells = (int)key.GetValue("uplinkNumCells"); this.useEmisora = (int)key.GetValue("useEmisora") == 1; this.txNumCanales = (byte)((int)key.GetValue("txNumCanales")); ; this.txPeriodo = (int)key.GetValue("txPeriodo"); ; this.txSeparador = (int)key.GetValue("txSeparador"); this.txPolarity = (int)key.GetValue("txPolarity") == 1; } catch (Exception) { }; //Configuracion joystick try { this.Idioma = (int)key.GetValue("Language"); this.SistemaMetrico = (int)key.GetValue("SistemaMetrico"); } catch (Exception) { } this.NombrePiloto = key.GetValue("NombrePiloto").ToString(); this.portUDPinout = (int)key.GetValue("portUDPinout"); this.portWebServer = (int)key.GetValue("portWebServer"); this.enableWebServer = (int)key.GetValue("enableWebServer") == 1; this.enableUDPinout = (int)key.GetValue("enableUDPinout") == 1; try { this.AlarmAltitude_enabled = (int)key.GetValue("AlarmAltitude_enabled") == 1; this.AlarmAltitude = float.Parse(key.GetValue("AlarmAltitude").ToString(), CultureInfo.InvariantCulture); this.AlarmAscenso_enabled = (int)key.GetValue("AlarmAscenso_enabled") == 1; this.AlarmAscenso = float.Parse(key.GetValue("AlarmAscenso").ToString(), CultureInfo.InvariantCulture); this.AlarmCellVoltage_enabled = (int)key.GetValue("AlarmCellVoltage_enabled") == 1; this.AlarmCellVoltage = float.Parse(key.GetValue("AlarmCellVoltage").ToString(), CultureInfo.InvariantCulture); this.AlarmDistance_enabled = (int)key.GetValue("AlarmDistance_enabled") == 1; this.AlarmDistance = float.Parse(key.GetValue("AlarmDistance").ToString(), CultureInfo.InvariantCulture); this.AlarmFastDescentRate_enabled = (int)key.GetValue("AlarmFastDescentRate_enabled") == 1; this.AlarmFastDescentRate = float.Parse(key.GetValue("AlarmFastDescentRate").ToString(), CultureInfo.InvariantCulture); } catch (Exception) { }; try { this.enableAntTrack = (int)key.GetValue("enableAntTrack") == 1; this.enableCasaAntTrack = (int)key.GetValue("enaleCasaAntTrack")==1; } catch (Exception){}; try { for (int i = 0; i < asignaciones.Length; i++) { this.asignaciones[i] = (int)key.GetValue("TeclaAsignada" + i); } } catch (Exception) { }; try { // Uplink debug values this.uplink_pid_ail_P = float.Parse(key.GetValue("uplink_pid_ail_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_I = float.Parse(key.GetValue("uplink_pid_ail_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_D = float.Parse(key.GetValue("uplink_pid_ail_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_IL = float.Parse(key.GetValue("uplink_pid_ail_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_DL = float.Parse(key.GetValue("uplink_pid_ail_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_P = float.Parse(key.GetValue("uplink_pid_ele_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_I = float.Parse(key.GetValue("uplink_pid_ele_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_D = float.Parse(key.GetValue("uplink_pid_ele_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_IL = float.Parse(key.GetValue("uplink_pid_ele_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_DL = float.Parse(key.GetValue("uplink_pid_ele_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_P = float.Parse(key.GetValue("uplink_pid_thr_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_I = float.Parse(key.GetValue("uplink_pid_thr_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_D = float.Parse(key.GetValue("uplink_pid_thr_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_IL = float.Parse(key.GetValue("uplink_pid_thr_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_DL = float.Parse(key.GetValue("uplink_pid_thr_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_P = float.Parse(key.GetValue("uplink_pid_tail_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_I = float.Parse(key.GetValue("uplink_pid_tail_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_D = float.Parse(key.GetValue("uplink_pid_tail_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_IL = float.Parse(key.GetValue("uplink_pid_tail_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_DL = float.Parse(key.GetValue("uplink_pid_tail_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_offX = float.Parse(key.GetValue("uplink_IR_offX").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_offY = float.Parse(key.GetValue("uplink_IR_offY").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_gain = float.Parse(key.GetValue("uplink_IR_gain").ToString(), CultureInfo.InvariantCulture); this.uplink_rumbo_ail = float.Parse(key.GetValue("uplink_rumbo_ail").ToString(), CultureInfo.InvariantCulture); this.uplink_altura_ele = float.Parse(key.GetValue("uplink_altura_ele").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_rev_P = (int)key.GetValue("uplink_IR_rev_P") == 1; this.uplink_IR_rev_R = (int)key.GetValue("uplink_IR_rev_R") == 1; this.uplink_IR_cross = (int)key.GetValue("uplink_IR_cross") == 1; this.uplink_IR_rev_cross = (int)key.GetValue("uplink_IR_rev_cross")==1; } catch (Exception) { }; this.PicturePath = (string)key.GetValue("PicturePath", "C:\\Fotos"); this.VideosPath = (string)key.GetValue("VideosPath", "C:\\Videos"); try { this.trocearVideo = (int)key.GetValue("trocearVideo") == 1; this.trocearTamMB = (int)key.GetValue("trocearTamMB"); this.calidadVideo = (int)key.GetValue("calidadVideo"); this.fpsVideo = (int)key.GetValue("fpsVideo"); } catch (Exception) { }; } catch (Exception) { } } else Registry.CurrentUser.CreateSubKey(registryPath); }
public void FromRegistry() { RegistryKey key = Registry.CurrentUser.OpenSubKey(registryPath); if (key != null) { try { this.GoogleMapsCookie = (string)key.GetValue("GoogleMapsCookie"); this.HomeLon = float.Parse(key.GetValue("HomeLon").ToString(), CultureInfo.InvariantCulture); this.HomeLat = float.Parse(key.GetValue("HomeLat").ToString(), CultureInfo.InvariantCulture); this.HomeAlt = float.Parse(key.GetValue("HomeAlt").ToString(), CultureInfo.InvariantCulture); this.videoCaptureStr = (string)key.GetValue("VideoCaptureStr"); this.telemetria = (Telemetria)key.GetValue("Telemetry"); this.videosystem = (VideoSystem)key.GetValue("VideoSystem"); this.commPort = (string)key.GetValue("CommPort"); this.commBps = (int)key.GetValue("CommBauds"); this.CacheMapsPath = (string)key.GetValue("CacheMapsPath"); this.FlightLogPath = (string)key.GetValue("FlightLogPath"); this.cells1 = (int)key.GetValue("CellCount1"); this.cells2 = (int)key.GetValue("CellCount2"); this.moduloTX = (Singleton.ModuloControl)(int) key.GetValue("ModuloTX"); try { for (int i = 0; i < servo_ch.Length; i++) { this.servo_min[i] = (int)key.GetValue("ServoMin" + i); this.servo_center[i] = (int)key.GetValue("ServoCenter" + i); this.servo_max[i] = (int)key.GetValue("ServoMax" + i); this.servo_rev[i] = (int)key.GetValue("ServoRev" + i) == 1; this.servo_ch[i] = (byte)((int)key.GetValue("ServoCh" + i)); } for (int i = 0; i < 16; i++) { this.joy_buttons[i] = (byte)((int)key.GetValue("JoyButtom" + i)); } this.tipo_mezcla = (Mezclas)key.GetValue("TipoMezcla"); // this.tipo_control = (ModoControl)key.GetValue("TipoControl"); this.rev_mix = (int)key.GetValue("rev_mix") == 1; this.rev_flap = (int)key.GetValue("rev_flap") == 1; this.full_flap = float.Parse(key.GetValue("full_flap").ToString()); this.step_flap = float.Parse(key.GetValue("step_flap").ToString()); this.pantilt_speed = float.Parse(key.GetValue("pantilt_speed").ToString()); this.enable_axis = (int)key.GetValue("AXISenable") == 1; this.enable_pan = (int)key.GetValue("PANenable") == 1; this.enable_tilt = (int)key.GetValue("TILTenable") == 1; this.enable_headtrack = (int)key.GetValue("enable_headtrack") == 1; object pepe = key.GetValue("headtrack_panCh"); this.headtrack_panCh = (byte)((int)key.GetValue("headtrack_panCh")); this.headtrack_tiltCh = (byte)((int)key.GetValue("headtrack_tiltCh")); this.uplinkVmax = float.Parse(key.GetValue("uplinkVmax").ToString(), CultureInfo.InvariantCulture); this.uplinkVmin = float.Parse(key.GetValue("uplinkVmin").ToString(), CultureInfo.InvariantCulture); this.uplinkValarm = float.Parse(key.GetValue("uplinkValarm").ToString(), CultureInfo.InvariantCulture); this.uplinkLipo = (int)key.GetValue("uplinkLipo") == 1; this.uplinkNumCells = (int)key.GetValue("uplinkNumCells"); this.useEmisora = (int)key.GetValue("useEmisora") == 1; this.txNumCanales = (byte)((int)key.GetValue("txNumCanales"));; this.txPeriodo = (int)key.GetValue("txPeriodo");; this.txSeparador = (int)key.GetValue("txSeparador"); this.txPolarity = (int)key.GetValue("txPolarity") == 1; } catch (Exception) { }; //Configuracion joystick try { this.Idioma = (int)key.GetValue("Language"); this.SistemaMetrico = (int)key.GetValue("SistemaMetrico"); } catch (Exception) { } this.NombrePiloto = key.GetValue("NombrePiloto").ToString(); this.portUDPinout = (int)key.GetValue("portUDPinout"); this.portWebServer = (int)key.GetValue("portWebServer"); this.enableWebServer = (int)key.GetValue("enableWebServer") == 1; this.enableUDPinout = (int)key.GetValue("enableUDPinout") == 1; try { this.AlarmAltitude_enabled = (int)key.GetValue("AlarmAltitude_enabled") == 1; this.AlarmAltitude = float.Parse(key.GetValue("AlarmAltitude").ToString(), CultureInfo.InvariantCulture); this.AlarmAscenso_enabled = (int)key.GetValue("AlarmAscenso_enabled") == 1; this.AlarmAscenso = float.Parse(key.GetValue("AlarmAscenso").ToString(), CultureInfo.InvariantCulture); this.AlarmCellVoltage_enabled = (int)key.GetValue("AlarmCellVoltage_enabled") == 1; this.AlarmCellVoltage = float.Parse(key.GetValue("AlarmCellVoltage").ToString(), CultureInfo.InvariantCulture); this.AlarmDistance_enabled = (int)key.GetValue("AlarmDistance_enabled") == 1; this.AlarmDistance = float.Parse(key.GetValue("AlarmDistance").ToString(), CultureInfo.InvariantCulture); this.AlarmFastDescentRate_enabled = (int)key.GetValue("AlarmFastDescentRate_enabled") == 1; this.AlarmFastDescentRate = float.Parse(key.GetValue("AlarmFastDescentRate").ToString(), CultureInfo.InvariantCulture); } catch (Exception) { }; try { this.enableAntTrack = (int)key.GetValue("enableAntTrack") == 1; this.enableCasaAntTrack = (int)key.GetValue("enaleCasaAntTrack") == 1; } catch (Exception) {}; try { for (int i = 0; i < asignaciones.Length; i++) { this.asignaciones[i] = (int)key.GetValue("TeclaAsignada" + i); } } catch (Exception) { }; try { // Uplink debug values this.uplink_pid_ail_P = float.Parse(key.GetValue("uplink_pid_ail_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_I = float.Parse(key.GetValue("uplink_pid_ail_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_D = float.Parse(key.GetValue("uplink_pid_ail_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_IL = float.Parse(key.GetValue("uplink_pid_ail_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ail_DL = float.Parse(key.GetValue("uplink_pid_ail_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_P = float.Parse(key.GetValue("uplink_pid_ele_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_I = float.Parse(key.GetValue("uplink_pid_ele_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_D = float.Parse(key.GetValue("uplink_pid_ele_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_IL = float.Parse(key.GetValue("uplink_pid_ele_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_ele_DL = float.Parse(key.GetValue("uplink_pid_ele_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_P = float.Parse(key.GetValue("uplink_pid_thr_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_I = float.Parse(key.GetValue("uplink_pid_thr_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_D = float.Parse(key.GetValue("uplink_pid_thr_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_IL = float.Parse(key.GetValue("uplink_pid_thr_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_thr_DL = float.Parse(key.GetValue("uplink_pid_thr_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_P = float.Parse(key.GetValue("uplink_pid_tail_P").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_I = float.Parse(key.GetValue("uplink_pid_tail_I").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_D = float.Parse(key.GetValue("uplink_pid_tail_D").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_IL = float.Parse(key.GetValue("uplink_pid_tail_IL").ToString(), CultureInfo.InvariantCulture); this.uplink_pid_tail_DL = float.Parse(key.GetValue("uplink_pid_tail_DL").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_offX = float.Parse(key.GetValue("uplink_IR_offX").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_offY = float.Parse(key.GetValue("uplink_IR_offY").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_gain = float.Parse(key.GetValue("uplink_IR_gain").ToString(), CultureInfo.InvariantCulture); this.uplink_rumbo_ail = float.Parse(key.GetValue("uplink_rumbo_ail").ToString(), CultureInfo.InvariantCulture); this.uplink_altura_ele = float.Parse(key.GetValue("uplink_altura_ele").ToString(), CultureInfo.InvariantCulture); this.uplink_IR_rev_P = (int)key.GetValue("uplink_IR_rev_P") == 1; this.uplink_IR_rev_R = (int)key.GetValue("uplink_IR_rev_R") == 1; this.uplink_IR_cross = (int)key.GetValue("uplink_IR_cross") == 1; this.uplink_IR_rev_cross = (int)key.GetValue("uplink_IR_rev_cross") == 1; } catch (Exception) { }; this.PicturePath = (string)key.GetValue("PicturePath", "C:\\Fotos"); this.VideosPath = (string)key.GetValue("VideosPath", "C:\\Videos"); try { this.trocearVideo = (int)key.GetValue("trocearVideo") == 1; this.trocearTamMB = (int)key.GetValue("trocearTamMB"); this.calidadVideo = (int)key.GetValue("calidadVideo"); this.fpsVideo = (int)key.GetValue("fpsVideo"); } catch (Exception) { }; } catch (Exception) { } } else { Registry.CurrentUser.CreateSubKey(registryPath); } }
protected Singleton() { asignaciones = new int[Enum.GetNames(typeof(EventosJoy)).Length - 1]; Ruta = new List<WayPoint>(); commPort = ""; videoCaptureStr = ""; HomeLon = -6.0345f; HomeLat = 37.2342f; HomeAlt = 100.0f; telemetria = Telemetria.Video; videosystem = VideoSystem.PAL; this.NombrePiloto = "Ikarus"; this.enableUDPinout = false; this.enableWebServer = false; this.portWebServer = 8080; this.portUDPinout = 9500; this.Idioma = 0; // Español this.SistemaMetrico = 0; // Metrico this.servo_ch = new byte[8]; this.servo_min = new int[servo_ch.Length]; this.servo_center = new int[servo_ch.Length]; this.servo_max = new int[servo_ch.Length]; this.servo_rev = new bool[servo_ch.Length]; for (int i = 0; i < servo_ch.Length; i++) { this.servo_min[i] = 1000; this.servo_center[i] = 1500; this.servo_max[i] = 2000; this.servo_rev[i] = false; this.servo_ch[i] = (byte)i; } this.joy_buttons = new byte[16]; for (int i = 0; i < 16; i++) { this.joy_buttons[i] = 0; } this.tipo_mezcla = Mezclas.Normal; // this.tipo_control = ModoControl.MODO_MODEM; this.rev_mix = false; this.rev_flap = false; this.full_flap = 1.0f; this.step_flap = 0.1f; this.pantilt_speed = 1.0f; this.AlarmAltitude_enabled = false; this.AlarmAscenso_enabled = false; this.AlarmCellVoltage_enabled = false; this.AlarmDistance_enabled = false; this.AlarmFastDescentRate_enabled = false; this.AlarmAltitude = 80.0f; this.AlarmAscenso = 5.0f; this.AlarmCellVoltage = 3.5f; this.AlarmDistance = 1000.0f; this.AlarmFastDescentRate = 10.0f; this.enable_headtrack = false; this.headtrack_panCh = 0; this.headtrack_tiltCh = 1; this.uplinkVmax = 12.6f; this.uplinkVmin = 9.6f; this.uplinkValarm = 10.0f; this.uplinkLipo = true; this.uplinkNumCells = 3; this.enableAntTrack = false; this.enableCasaAntTrack = false; this.useEmisora = true; this.txNumCanales = 8; this.txPeriodo = 20000; this.txSeparador = 400; this.txPolarity = false; // Uplink debug values this.uplink_pid_ail_P=0.02f; this.uplink_pid_ail_I=0.0f; this.uplink_pid_ail_D=0.0f; this.uplink_pid_ail_IL=0.0f; this.uplink_pid_ail_DL=1.0f; this.uplink_pid_ele_P=0.02f; this.uplink_pid_ele_I=0.0f; this.uplink_pid_ele_D=0.0f; this.uplink_pid_ele_IL=0.0f; this.uplink_pid_ele_DL=1.0f; this.uplink_pid_thr_P=0.02f; this.uplink_pid_thr_I=0.0f; this.uplink_pid_thr_D=0.0f; this.uplink_pid_thr_IL=0.0f; this.uplink_pid_thr_DL=1.0f; this.uplink_pid_tail_P=0.02f; this.uplink_pid_tail_I=0.0f; this.uplink_pid_tail_D=0.0f; this.uplink_pid_tail_IL=0.0f; this.uplink_pid_tail_DL=1.0f; this.uplink_IR_offX=1.66f; this.uplink_IR_offY = 1.66f; this.uplink_IR_gain = 1.14f; this.uplink_rumbo_ail = 20.0f; this.uplink_altura_ele = 10.0f; this.uplink_IR_rev_P = false; this.uplink_IR_rev_R = false; this.uplink_IR_cross = false; this.uplink_IR_rev_cross = false; this.trocearVideo = false; this.trocearTamMB = 1024; this.calidadVideo = 50; this.fpsVideo = 15; FromRegistry(); }
protected Singleton() { asignaciones = new int[Enum.GetNames(typeof(EventosJoy)).Length - 1]; Ruta = new List <WayPoint>(); commPort = ""; videoCaptureStr = ""; HomeLon = -6.0345f; HomeLat = 37.2342f; HomeAlt = 100.0f; telemetria = Telemetria.Video; videosystem = VideoSystem.PAL; this.NombrePiloto = "Ikarus"; this.enableUDPinout = false; this.enableWebServer = false; this.portWebServer = 8080; this.portUDPinout = 9500; this.Idioma = 0; // Español this.SistemaMetrico = 0; // Metrico this.servo_ch = new byte[8]; this.servo_min = new int[servo_ch.Length]; this.servo_center = new int[servo_ch.Length]; this.servo_max = new int[servo_ch.Length]; this.servo_rev = new bool[servo_ch.Length]; for (int i = 0; i < servo_ch.Length; i++) { this.servo_min[i] = 1000; this.servo_center[i] = 1500; this.servo_max[i] = 2000; this.servo_rev[i] = false; this.servo_ch[i] = (byte)i; } this.joy_buttons = new byte[16]; for (int i = 0; i < 16; i++) { this.joy_buttons[i] = 0; } this.tipo_mezcla = Mezclas.Normal; // this.tipo_control = ModoControl.MODO_MODEM; this.rev_mix = false; this.rev_flap = false; this.full_flap = 1.0f; this.step_flap = 0.1f; this.pantilt_speed = 1.0f; this.AlarmAltitude_enabled = false; this.AlarmAscenso_enabled = false; this.AlarmCellVoltage_enabled = false; this.AlarmDistance_enabled = false; this.AlarmFastDescentRate_enabled = false; this.AlarmAltitude = 80.0f; this.AlarmAscenso = 5.0f; this.AlarmCellVoltage = 3.5f; this.AlarmDistance = 1000.0f; this.AlarmFastDescentRate = 10.0f; this.enable_headtrack = false; this.headtrack_panCh = 0; this.headtrack_tiltCh = 1; this.uplinkVmax = 12.6f; this.uplinkVmin = 9.6f; this.uplinkValarm = 10.0f; this.uplinkLipo = true; this.uplinkNumCells = 3; this.enableAntTrack = false; this.enableCasaAntTrack = false; this.useEmisora = true; this.txNumCanales = 8; this.txPeriodo = 20000; this.txSeparador = 400; this.txPolarity = false; // Uplink debug values this.uplink_pid_ail_P = 0.02f; this.uplink_pid_ail_I = 0.0f; this.uplink_pid_ail_D = 0.0f; this.uplink_pid_ail_IL = 0.0f; this.uplink_pid_ail_DL = 1.0f; this.uplink_pid_ele_P = 0.02f; this.uplink_pid_ele_I = 0.0f; this.uplink_pid_ele_D = 0.0f; this.uplink_pid_ele_IL = 0.0f; this.uplink_pid_ele_DL = 1.0f; this.uplink_pid_thr_P = 0.02f; this.uplink_pid_thr_I = 0.0f; this.uplink_pid_thr_D = 0.0f; this.uplink_pid_thr_IL = 0.0f; this.uplink_pid_thr_DL = 1.0f; this.uplink_pid_tail_P = 0.02f; this.uplink_pid_tail_I = 0.0f; this.uplink_pid_tail_D = 0.0f; this.uplink_pid_tail_IL = 0.0f; this.uplink_pid_tail_DL = 1.0f; this.uplink_IR_offX = 1.66f; this.uplink_IR_offY = 1.66f; this.uplink_IR_gain = 1.14f; this.uplink_rumbo_ail = 20.0f; this.uplink_altura_ele = 10.0f; this.uplink_IR_rev_P = false; this.uplink_IR_rev_R = false; this.uplink_IR_cross = false; this.uplink_IR_rev_cross = false; this.trocearVideo = false; this.trocearTamMB = 1024; this.calidadVideo = 50; this.fpsVideo = 15; FromRegistry(); }