Skip to content

Commit

Permalink
Give GM some steroids and protein shakes (commaai#150)
Browse files Browse the repository at this point in the history
* Add retunes and acceleration/braking functions from jamezz unstable.

* Fix 2017 fingerprint?

* Reintroduce startAccel to compensate

* Try yanking calc_accel_override to fix slow restart

* Set bp for gasMax like honda

* GM only maps 0.5 as max gas. Update to be more clear

* Revert "Try yanking calc_accel_override to fix slow restart"

This reverts commit 2c6669d.

* Undo cruise following change

* I missed

* Go back to all gas all the time

* Adjust overall max acceleration override upwards

* Invert A_ACC_MAX usage. Should help with weak accel

* Revert "Fix 2017 fingerprint?"

This reverts commit 1065d69.

* Halve A_ACC_MAX to try and improve acceleration

* Revert "Merge branch 'kegman-unstable-merge' of github.com:jamezz-comma/openpilot into kegman-unstable-merge"

This reverts commit a096bee, reversing
changes made to 1cbb79f.

* Rename variable

* Revert "Revert "Merge branch 'kegman-unstable-merge' of github.com:jamezz-comma/openpilot into kegman-unstable-merge""

This reverts commit b587657.
  • Loading branch information
Jamezz authored and kegman committed Apr 6, 2019
1 parent 6e2ad64 commit 2c2d869
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
except ImportError:
CarController = None

A_ACC_MAX = min(_A_CRUISE_MAX_V_FOLLOWING)
FOLLOW_AGGRESSION = 0.15 # (Acceleration/Decel aggression) Lower is more aggressive

class CanBus(object):
def __init__(self):
Expand Down Expand Up @@ -86,7 +86,7 @@ def calc_accel_override(a_ego, a_target, v_ego, v_target):
# accelOverride is more or less the max throttle allowed to pcm: usually set to a constant
# unless aTargetMax is very high and then we scale with it; this help in quicker restart

return float(max(max_accel, a_target / A_ACC_MAX)) * min(speedLimiter, accelLimiter)
return float(max(max_accel, a_target / FOLLOW_AGGRESSION)) * min(speedLimiter, accelLimiter)

@staticmethod
def get_params(candidate, fingerprint):
Expand Down

0 comments on commit 2c2d869

Please sign in to comment.