Browse Source

AP_AccelCal: check return of get_calibrator

resolves compiler warning
master
Randy Mackay 9 years ago committed by Tom Pittenger
parent
commit
f70072c54b
  1. 5
      libraries/AP_AccelCal/AP_AccelCal.cpp

5
libraries/AP_AccelCal/AP_AccelCal.cpp

@ -56,7 +56,10 @@ void AP_AccelCal::update() @@ -56,7 +56,10 @@ void AP_AccelCal::update()
case ACCEL_CAL_WAITING_FOR_ORIENTATION: {
// if we're waiting for orientation, first ensure that all calibrators are on the same step
uint8_t step;
cal = get_calibrator(0);
if ((cal = get_calibrator(0)) == NULL) {
fail();
return;
}
step = cal->get_num_samples_collected()+1;
for(uint8_t i=1 ; (cal = get_calibrator(i)) ; i++) {

Loading…
Cancel
Save