Browse Source

AHRS: fix example sketch to use roll/pitch trim

mission-4.1.18
Randy Mackay 12 years ago
parent
commit
963231a19b
  1. 3
      libraries/AP_InertialSensor/examples/MPU6000/MPU6000.pde

3
libraries/AP_InertialSensor/examples/MPU6000/MPU6000.pde

@ -102,6 +102,7 @@ void loop(void) @@ -102,6 +102,7 @@ void loop(void)
void run_calibration()
{
float roll_trim, pitch_trim;
// clear off any other characters (like line feeds,etc)
while( hal.console->available() ) {
hal.console->read();
@ -110,7 +111,7 @@ void run_calibration() @@ -110,7 +111,7 @@ void run_calibration()
#if !defined( __AVR_ATmega1280__ )
AP_InertialSensor_UserInteractStream interact(hal.console);
ins.calibrate_accel(NULL, &interact);
ins.calibrate_accel(NULL, &interact, roll_trim, pitch_trim);
#else
hal.console->println_P(PSTR("calibrate_accel not available on 1280"));
#endif

Loading…
Cancel
Save