ArduCopter CLI: Add imu.init before imu.init_accel for "level"

* Depending on when you entered the CLI, the imu might not be
  initialized yet, and init_accel would hang.
This commit is contained in:
Pat Hickey 2011-12-11 15:19:46 -08:00
parent 2e200834e1
commit 8d878a2cae
1 changed files with 1 additions and 0 deletions

View File

@ -245,6 +245,7 @@ setup_motors(uint8_t argc, const Menu::arg *argv)
static int8_t static int8_t
setup_accel(uint8_t argc, const Menu::arg *argv) setup_accel(uint8_t argc, const Menu::arg *argv)
{ {
imu.init(IMU::COLD_START, delay, &timer_scheduler);
imu.init_accel(); imu.init_accel();
print_accel_offsets(); print_accel_offsets();
report_imu(); report_imu();