common_code_v2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
common_code_v2 [2018/07/02 13:08] – [Idle] hakcenter | common_code_v2 [2018/07/02 13:09] – [Accel Variable] hakcenter | ||
---|---|---|---|
Line 101: | Line 101: | ||
The acceleration variable, is computed at 100ms and 10ms, and it represents the turbo rpm acceleration rate in, rpm per ms. | The acceleration variable, is computed at 100ms and 10ms, and it represents the turbo rpm acceleration rate in, rpm per ms. | ||
< | < | ||
- | | + | |
- | if (timer % 10 == 0) { | + | turbo_accel = (int) (turbo_rpm - last_turbo_rpm) / 100.0f; |
- | turbo_accel[0] = (int) (turbo_rpm | + | last_turbo_rpm = turbo_rpm; |
- | | + | |
- | if (timer % 100 == 0) { | + | |
- | | + | |
- | last_turbo_rpm[1] = turbo_rpm; | + | |
- | } | + | |
- | if (turbo_rpm < top_end_rpm) { turbo_accel[2] = turbo_accel[1]; | + | |
- | } | + | |
</ | </ | ||
- | \\ **<fc # | + | \\ **<fc # |
- | \\ **<fc # | + | |
---- | ---- | ||
==== Idle ==== | ==== Idle ==== |
common_code_v2.txt · Last modified: 2018/07/02 13:28 by hakcenter