From 2937acc2a2a3673f5d884b653a8e854dc1c71469 Mon Sep 17 00:00:00 2001 From: "tridge60@gmail.com" Date: Mon, 21 Mar 2011 07:30:45 +0000 Subject: [PATCH] added ALWAYS_RESET_SETTINGS git-svn-id: https://arducopter.googlecode.com/svn/trunk@1803 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/system.pde | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ArduCopterMega/system.pde b/ArduCopterMega/system.pde index 60fee7f8ef..c773ea07f1 100644 --- a/ArduCopterMega/system.pde +++ b/ArduCopterMega/system.pde @@ -123,6 +123,20 @@ void init_ardupilot() init_rc_in(); // sets up rc channels from radio init_rc_out(); // sets up the timer libs + +#ifdef ALWAYS_RESET_SETTINGS + { + RC_Channel *rcp = &g.rc_1; + for (unsigned char i=0; i<8; i++) { + rcp[i].radio_min = 1000; + rcp[i].radio_max = 2000; + rcp[i].save_eeprom(); + } + } + + default_flight_modes(); +#endif + init_camera(); #if HIL_MODE != HIL_MODE_ATTITUDE adc.Init(); // APM ADC library initialization