purple: added new parameters to Init() functions

this adapts the test code for the purple API changes
This commit is contained in:
Pat Hickey 2011-11-13 15:13:11 +11:00
parent ed74d1c987
commit c93d7a9560

View File

@ -441,7 +441,9 @@ static int8_t
test_adc(uint8_t argc, const Menu::arg *argv) test_adc(uint8_t argc, const Menu::arg *argv)
{ {
print_hit_enter(); print_hit_enter();
adc.Init(); isr_registry.init();
timer_scheduler.init( &isr_registry );
adc.Init(&timer_scheduler);
delay(1000); delay(1000);
Serial.printf_P(PSTR("ADC\n")); Serial.printf_P(PSTR("ADC\n"));
delay(1000); delay(1000);
@ -490,8 +492,9 @@ static int8_t
test_imu(uint8_t argc, const Menu::arg *argv) test_imu(uint8_t argc, const Menu::arg *argv)
{ {
//Serial.printf_P(PSTR("Calibrating.")); //Serial.printf_P(PSTR("Calibrating."));
isr_registry.init();
imu.init(IMU::COLD_START); timer_scheduler.init( &isr_registry );
imu.init(IMU::COLD_START, delay, &timer_scheduler);
print_hit_enter(); print_hit_enter();
delay(1000); delay(1000);
@ -534,7 +537,9 @@ static int8_t
test_gyro(uint8_t argc, const Menu::arg *argv) test_gyro(uint8_t argc, const Menu::arg *argv)
{ {
print_hit_enter(); print_hit_enter();
adc.Init(); isr_registry.init();
timer_scheduler.init(&isr_registry);
adc.Init(&timer_scheduler);
delay(1000); delay(1000);
Serial.printf_P(PSTR("Gyro | Accel\n")); Serial.printf_P(PSTR("Gyro | Accel\n"));
delay(1000); delay(1000);
@ -576,7 +581,9 @@ test_mag(uint8_t argc, const Menu::arg *argv)
report_compass(); report_compass();
// we need the DCM initialised for this test // we need the DCM initialised for this test
imu.init(IMU::COLD_START); isr_registry.init();
timer_scheduler.init( &isr_registry );
imu.init(IMU::COLD_START, delay, &timer_scheduler);
int counter = 0; int counter = 0;
//Serial.printf_P(PSTR("MAG_ORIENTATION: %d\n"), MAG_ORIENTATION); //Serial.printf_P(PSTR("MAG_ORIENTATION: %d\n"), MAG_ORIENTATION);