purple: there are no dipswitches on the purple board

This commit is contained in:
Andrew Tridgell 2011-11-15 22:17:01 +11:00 committed by Pat Hickey
parent 5c13aa33be
commit c8b592f8a7
2 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,7 @@ static void reset_control_switch()
static void update_servo_switches()
{
#if CONFIG_APM_HARDWARE != APM_HARDWARE_PURPLE
if (!g.switch_enable) {
// switches are disabled in EEPROM (see SWITCH_ENABLE option)
// this means the EEPROM control of all channel reversal is enabled
@ -57,4 +58,5 @@ static void update_servo_switches()
g.reverse_ch1_elevon = (PINE & 64) ? true : false;
g.reverse_ch2_elevon = (PINL & 64) ? true : false;
}
#endif
}

View File

@ -25,7 +25,9 @@ static int8_t test_xbee(uint8_t argc, const Menu::arg *argv);
static int8_t test_eedump(uint8_t argc, const Menu::arg *argv);
static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv);
static int8_t test_modeswitch(uint8_t argc, const Menu::arg *argv);
#if CONFIG_APM_HARDWARE != APM_HARDWARE_PURPLE
static int8_t test_dipswitches(uint8_t argc, const Menu::arg *argv);
#endif
// Creates a constant array of structs representing menu options
// and stores them in Flash memory, not RAM.
@ -42,7 +44,9 @@ static const struct Menu::command test_menu_commands[] PROGMEM = {
{"xbee", test_xbee},
{"eedump", test_eedump},
{"modeswitch", test_modeswitch},
#if CONFIG_APM_HARDWARE != APM_HARDWARE_PURPLE
{"dipswitches", test_dipswitches},
#endif
// Tests below here are for hardware sensors only present
// when real sensors are attached or they are emulated
@ -406,6 +410,7 @@ test_modeswitch(uint8_t argc, const Menu::arg *argv)
}
}
#if CONFIG_APM_HARDWARE != APM_HARDWARE_PURPLE
static int8_t
test_dipswitches(uint8_t argc, const Menu::arg *argv)
{
@ -436,6 +441,8 @@ test_dipswitches(uint8_t argc, const Menu::arg *argv)
}
}
}
#endif // CONFIG_APM_HARDWARE != APM_HARDWARE_PURPLE
//-------------------------------------------------------------------------------------------
// tests in this section are for real sensors or sensors that have been simulated