Skip to content

Commit

Permalink
Reset lastTorque when we leave the track
Browse files Browse the repository at this point in the history
  • Loading branch information
nlp80 committed Dec 15, 2016
1 parent e4c4b25 commit c5d1cd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion irFFB/irFFB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ int APIENTRY wWinMain(
if (wasOnTrack && !*isOnTrack) {
wasOnTrack = false;
text(L"Has left track");
lastTorque = 0;
force = 0;
setFFB(force);
}
Expand Down Expand Up @@ -453,7 +454,7 @@ int APIENTRY wWinMain(
invFactor = 1 - factor;
}

setFFB(int(factor * DI_MAX + scaleTorque(*swTorque) * invFactor));
setFFB(f2i(factor * DI_MAX + scaleTorque(*swTorque) * invFactor));
continue;

}
Expand Down

0 comments on commit c5d1cd8

Please sign in to comment.