|
|
@ -35,14 +35,12 @@ def create_gas_regen_command(packer, bus, throttle, idx, acc_engaged, at_full_st |
|
|
|
return packer.make_can_msg("ASCMGasRegenCmd", bus, values) |
|
|
|
return packer.make_can_msg("ASCMGasRegenCmd", bus, values) |
|
|
|
|
|
|
|
|
|
|
|
def create_friction_brake_command(packer, bus, apply_brake, idx, near_stop, at_full_stop): |
|
|
|
def create_friction_brake_command(packer, bus, apply_brake, idx, near_stop, at_full_stop): |
|
|
|
|
|
|
|
mode = 0x1 |
|
|
|
if apply_brake == 0: |
|
|
|
if apply_brake > 0: |
|
|
|
mode = 0x1 |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
mode = 0xa |
|
|
|
mode = 0xa |
|
|
|
|
|
|
|
if at_full_stop: |
|
|
|
|
|
|
|
mode = 0xd |
|
|
|
|
|
|
|
|
|
|
|
if at_full_stop: |
|
|
|
|
|
|
|
mode = 0xd |
|
|
|
|
|
|
|
# TODO: this is to have GM bringing the car to complete stop, |
|
|
|
# TODO: this is to have GM bringing the car to complete stop, |
|
|
|
# but currently it conflicts with OP controls, so turned off. |
|
|
|
# but currently it conflicts with OP controls, so turned off. |
|
|
|
#elif near_stop: |
|
|
|
#elif near_stop: |
|
|
|