mirror of https://github.com/ArduPilot/ardupilot
AP_AccelCal: check return of get_calibrator
resolves compiler warning
This commit is contained in:
parent
39560f9af8
commit
f70072c54b
|
@ -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…
Reference in New Issue