Skip to content

Commit

Permalink
tcs yyds (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juice-XIJ authored May 24, 2022
1 parent 5e9b01a commit 0b90a93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion forza.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __down_shift(self, speed, target_down_speed, slips, iteration, gear, fdp):
gear (int): current gear
fdp (ForzaPackage): Forza Package
"""
if speed < target_down_speed * 0.95 and slips[0] < 1 and slips[1] < 1 and slips[2] < 0.9 and slips[3] < 0.9 and abs(fdp.acceleration_x) < 1:
if speed < target_down_speed * 0.95 and slips[0] < 1 and slips[1] < 1 and slips[2] < 0.9 and slips[3] < 0.9:
self.logger.debug(f'[{iteration}] down shift triggerred. speed < target down speed ({speed} < {target_down_speed}), slips {slips}')
gear_helper.down_shift_handle(gear, self)

Expand Down
1 change: 1 addition & 0 deletions gear_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def calculate_optimal_shift_point(forza: CarInfo):
if abs(delta) < min_dt_torque and torque > torqueo:
rpmo = r
min_dt_torque = delta
torqueo = torque

speedo = rpm_to_torque[np.abs(rpms - rpmo).argmin()]['speed']
theory_speed = rpmo * ratio
Expand Down

0 comments on commit 0b90a93

Please sign in to comment.