Switch personalities via steering wheel / onroad UI
Added toggle to switch between the personalities via the steering wheel for GM/Toyota/Volkswagen vehicles and an onroad button for other makes. Co-Authored-By: henryccy <104284652+henryccy@users.noreply.github.com> Co-Authored-By: Jason Jackrel <23621790+thinkpad4by3@users.noreply.github.com> Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com> Co-Authored-By: Kevin Robert Keegan <3046315+krkeegan@users.noreply.github.com> Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev> Co-Authored-By: mike8643 <98910897+mike8643@users.noreply.github.com>
This commit is contained in:
@@ -106,14 +106,15 @@ def create_friction_brake_command(packer, bus, apply_brake, idx, enabled, near_s
|
||||
return packer.make_can_msg("EBCMFrictionBrakeCmd", bus, values)
|
||||
|
||||
|
||||
def create_acc_dashboard_command(packer, bus, enabled, target_speed_kph, lead_car_in_sight, fcw):
|
||||
def create_acc_dashboard_command(packer, bus, enabled, target_speed_kph, lead_car_in_sight, fcw, display, personality):
|
||||
target_speed = min(target_speed_kph, 255)
|
||||
|
||||
values = {
|
||||
"ACCAlwaysOne": 1,
|
||||
"ACCResumeButton": 0,
|
||||
"DisplayDistance": display,
|
||||
"ACCSpeedSetpoint": target_speed,
|
||||
"ACCGapLevel": 3 * enabled, # 3 "far", 0 "inactive"
|
||||
"ACCGapLevel": min(personality + 1, 3), # 3 "far", 0 "inactive"
|
||||
"ACCCmdActive": enabled,
|
||||
"ACCAlwaysOne2": 1,
|
||||
"ACCLeadCar": lead_car_in_sight,
|
||||
|
||||
Reference in New Issue
Block a user