Skip to content

Commit 2e7fe57

Browse files
Switchable mag calibration report.
1 parent 8c2ecfb commit 2e7fe57

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

NAV_Algorithms/AHRS.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,7 @@ void AHRS_type::handle_magnetic_calibration ( char type)
404404
{
405405
bool calibration_changed = compass_calibration.set_calibration_if_changed ( mag_calibration_data_collector_right_turn, mag_calibration_data_collector_left_turn, MAG_SCALE);
406406

407-
float3vector new_induction_estimate;
408-
407+
#if REPORT_MAGNETIC_CALIBRATION == 1
409408
if( calibration_changed)
410409
{
411410
magnetic_induction_report_t magnetic_induction_report;
@@ -415,6 +414,10 @@ void AHRS_type::handle_magnetic_calibration ( char type)
415414
report_magnetic_calibration_has_changed( &magnetic_induction_report, type);
416415
magnetic_calibration_updated = true;
417416
}
417+
#else
418+
(void)calibration_changed;
419+
(void)type;
420+
#endif
418421
}
419422

420423
void AHRS_type::filter_magnetic_induction( const float3vector &gyro, float3vector &mag)

0 commit comments

Comments
 (0)