Enabled PWM test

This commit is contained in:
Jason Short 2012-02-09 22:21:30 -08:00
parent e5a0959394
commit fb003e9742
1 changed files with 32 additions and 27 deletions

View File

@ -4,7 +4,7 @@
// These are function definitions so the Menu can be constructed before the functions // These are function definitions so the Menu can be constructed before the functions
// are defined below. Order matters to the compiler. // are defined below. Order matters to the compiler.
//static int8_t test_radio_pwm(uint8_t argc, const Menu::arg *argv); static int8_t test_radio_pwm(uint8_t argc, const Menu::arg *argv);
static int8_t test_radio(uint8_t argc, const Menu::arg *argv); static int8_t test_radio(uint8_t argc, const Menu::arg *argv);
//static int8_t test_failsafe(uint8_t argc, const Menu::arg *argv); //static int8_t test_failsafe(uint8_t argc, const Menu::arg *argv);
//static int8_t test_stabilize(uint8_t argc, const Menu::arg *argv); //static int8_t test_stabilize(uint8_t argc, const Menu::arg *argv);
@ -55,7 +55,7 @@ static int8_t test_rawgps(uint8_t argc, const Menu::arg *argv);
// User enters the string in the console to call the functions on the right. // User enters the string in the console to call the functions on the right.
// See class Menu in AP_Coommon for implementation details // See class Menu in AP_Coommon for implementation details
const struct Menu::command test_menu_commands[] PROGMEM = { const struct Menu::command test_menu_commands[] PROGMEM = {
// {"pwm", test_radio_pwm}, {"pwm", test_radio_pwm},
{"radio", test_radio}, {"radio", test_radio},
// {"failsafe", test_failsafe}, // {"failsafe", test_failsafe},
// {"stabilize", test_stabilize}, // {"stabilize", test_stabilize},
@ -112,38 +112,43 @@ test_eedump(uint8_t argc, const Menu::arg *argv)
return(0); return(0);
} }
/*
//static int8_t static int8_t
//test_radio_pwm(uint8_t argc, const Menu::arg *argv) test_radio_pwm(uint8_t argc, const Menu::arg *argv)
{ {
print_hit_enter(); #if defined( __AVR_ATmega1280__ ) // determines if optical flow code is included
delay(1000); print_test_disabled();
return (0);
#else
print_hit_enter();
delay(1000);
while(1){ while(1){
delay(20); delay(20);
// Filters radio input - adjust filters in the radio.pde file // Filters radio input - adjust filters in the radio.pde file
// ---------------------------------------------------------- // ----------------------------------------------------------
read_radio(); read_radio();
// servo Yaw // servo Yaw
//APM_RC.OutputCh(CH_7, g.rc_4.radio_out); //APM_RC.OutputCh(CH_7, g.rc_4.radio_out);
Serial.printf_P(PSTR("IN: 1: %d\t2: %d\t3: %d\t4: %d\t5: %d\t6: %d\t7: %d\t8: %d\n"), Serial.printf_P(PSTR("IN: 1: %d\t2: %d\t3: %d\t4: %d\t5: %d\t6: %d\t7: %d\t8: %d\n"),
g.rc_1.radio_in, g.rc_1.radio_in,
g.rc_2.radio_in, g.rc_2.radio_in,
g.rc_3.radio_in, g.rc_3.radio_in,
g.rc_4.radio_in, g.rc_4.radio_in,
g.rc_5.radio_in, g.rc_5.radio_in,
g.rc_6.radio_in, g.rc_6.radio_in,
g.rc_7.radio_in, g.rc_7.radio_in,
g.rc_8.radio_in); g.rc_8.radio_in);
if(Serial.available() > 0){ if(Serial.available() > 0){
return (0); return (0);
}
} }
} #endif
}*/ }
/* /*
//static int8_t //static int8_t