Skip to content

Commit

Permalink
AP_InertialSensor: properly initialize error count workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall committed May 6, 2015
1 parent fb17303 commit 785a748
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/AP_InertialSensor/AP_InertialSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ AP_InertialSensor::AP_InertialSensor() :
_board_orientation(ROTATION_NONE),
_hil_mode(false),
_have_3D_calibration(false),
_calibrating(false)
_calibrating(false),
_startup_error_counts_set(false)
{
AP_Param::setup_object_defaults(this, var_info);
for (uint8_t i=0; i<INS_MAX_BACKENDS; i++) {
Expand All @@ -293,6 +294,8 @@ AP_InertialSensor::AP_InertialSensor() :
}
memset(_delta_velocity_valid,0,sizeof(_delta_velocity_valid));
memset(_delta_angle_valid,0,sizeof(_delta_angle_valid));
memset(_accel_startup_error_count,0,sizeof(_accel_startup_error_count));
memset(_gyro_startup_error_count,0,sizeof(_gyro_startup_error_count));
}


Expand Down

0 comments on commit 785a748

Please sign in to comment.