Skip to content

Commit

Permalink
Resolve Mag startup sequence (#332) (#334)
Browse files Browse the repository at this point in the history
* Mag startup sequence (#332)
  • Loading branch information
mvacanti authored Oct 20, 2020
1 parent 3743a5c commit 9660986
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/models/flight_control/FGMagnetometer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ FGMagnetometer::~FGMagnetometer()
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGMagnetometer::updateInertialMag(void)
{
counter++;
if (counter > INERTIAL_UPDATE_RATE)//dont need to update every iteration
if (counter++ % INERTIAL_UPDATE_RATE == 0)//dont need to update every iteration
{
counter = 0;

Expand Down

0 comments on commit 9660986

Please sign in to comment.