Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gforce avg on switching to aircraft #4955

Merged
merged 2 commits into from
Mar 9, 2017
Merged

Fix gforce avg on switching to aircraft #4955

merged 2 commits into from
Mar 9, 2017

Conversation

PabstMirror
Copy link
Contributor

Fix #4952
gforces averages the last 6 seconds
on zeus RC it would only use the last 0.2 seconds, so it could spike high

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Feb 27, 2017
@PabstMirror PabstMirror added this to the 3.9.1 milestone Feb 27, 2017
@@ -14,6 +14,7 @@

//Reset forces array
GVAR(GForces) = [];
for "_i" from 1 to 30 do {GVAR(GForces) pushBack 1}; // init array to full array of neutral g-forces
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't that be better by just writing the array out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't feel like counting out 30 zeros.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆 is fine either way.

Copy link
Contributor

@commy2 commy2 Feb 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GVAR(GForces) = [];
GVAR(GForces) resize 30;
GVAR(GForces) = GVAR(GForces) apply {1};

@thojkooi
Copy link
Contributor

thojkooi commented Mar 8, 2017

@commy2 @jonpas please review and merge if approved.

@PabstMirror PabstMirror merged commit d313d53 into master Mar 9, 2017
@PabstMirror PabstMirror deleted the fixGforceAvg branch March 9, 2017 22:49
thojkooi pushed a commit that referenced this pull request Mar 13, 2017
* Fix gforce avg on switching to aircraft

* Dont use for-loop for neutral g-forces array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants