Skip to content

Commit 8c2ecfb

Browse files
Merge pull request #46 from larus-breeze/BUGFIX
Development-patch removed.
2 parents 7582c2e + f169d94 commit 8c2ecfb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

NAV_Algorithms/AHRS.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,17 +400,14 @@ void AHRS_type::write_calibration_into_EEPROM( void)
400400
lock_EEPROM( true);
401401
}
402402

403-
bool compass_calibrated = false;
404-
405403
void AHRS_type::handle_magnetic_calibration ( char type)
406404
{
407405
bool calibration_changed = compass_calibration.set_calibration_if_changed ( mag_calibration_data_collector_right_turn, mag_calibration_data_collector_left_turn, MAG_SCALE);
408406

409407
float3vector new_induction_estimate;
410408

411-
if( ! compass_calibrated && calibration_changed)
409+
if( calibration_changed)
412410
{
413-
compass_calibrated=true;
414411
magnetic_induction_report_t magnetic_induction_report;
415412
for( unsigned i=0; i<3; ++i)
416413
magnetic_induction_report.calibration[i] = (compass_calibration.get_calibration())[i];

0 commit comments

Comments
 (0)