Skip to content

Commit

Permalink
Merge pull request #475 from Stifael/hitl_sensor_cal
Browse files Browse the repository at this point in the history
hitl: assume sensor calibration ok if hitl is set
  • Loading branch information
julianoes authored Jul 30, 2018
2 parents 165e63c + 2ce5aef commit c055ced
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/telemetry/telemetry_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,9 +618,13 @@ void TelemetryImpl::receive_param_hitl(bool success, int value)
}

_hitl_enabled = (value == 1);
set_health_accelerometer_calibration(_hitl_enabled);
set_health_gyrometer_calibration(_hitl_enabled);
set_health_magnetometer_calibration(_hitl_enabled);

// assume sensor calibration ok in hitl
if (_hitl_enabled) {
set_health_accelerometer_calibration(_hitl_enabled);
set_health_gyrometer_calibration(_hitl_enabled);
set_health_magnetometer_calibration(_hitl_enabled);
}
#ifdef LEVEL_CALIBRATION
set_health_level_calibration(ok);
#endif
Expand Down

0 comments on commit c055ced

Please sign in to comment.