mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-12 11:13:46 +08:00
Compare commits
56 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0495453e3a | |||
| 5340cc449c | |||
| 89f6f7a42b | |||
| 073d9ba098 | |||
| 3ad700a964 | |||
| c69a5080f4 | |||
| 6ab4400614 | |||
| 8222e303a2 | |||
| 43da13c8b0 | |||
| 1b1d60d088 | |||
| 9421030e2c | |||
| 930fa680cf | |||
| f4fb138009 | |||
| 35cee6a7f9 | |||
| 66fbf8b21f | |||
| f3306bec23 | |||
| 5338f9a5d5 | |||
| 6a702911ab | |||
| 4da1ddc500 | |||
| cb0f964e60 | |||
| a868fc6650 | |||
| 2f44ed860d | |||
| 9bb133a188 | |||
| 251b755efd | |||
| d56a8f6c23 | |||
| 894d792dbb | |||
| 91cb407979 | |||
| 2361ad82c9 | |||
| cea54bf498 | |||
| bc012595ca | |||
| c1df1eaf2a | |||
| 323e269a6b | |||
| 4c9430caf1 | |||
| 0b193e90f0 | |||
| c3d0c9c7c3 | |||
| 89d871ea40 | |||
| 77956f33c2 | |||
| 3e47e95934 | |||
| 3086285c72 | |||
| 5fc40a8936 | |||
| 19565e7aca | |||
| 22789bc95f | |||
| 22a949893d | |||
| 7e749a73a4 | |||
| 36c2cb5fb0 | |||
| fa9234212b | |||
| fd7b50a1a6 | |||
| 64087ac7ea | |||
| 961fc23845 | |||
| 6d98e4a784 | |||
| cfd8c78c4c | |||
| 1542e69a20 | |||
| ffdea13de8 | |||
| 60b000f7b5 | |||
| 1a27190a67 | |||
| 69703fd2ac |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 875 KiB |
@@ -180,14 +180,19 @@ def send_stats():
|
|||||||
|
|
||||||
user_point = (
|
user_point = (
|
||||||
Point("user_stats")
|
Point("user_stats")
|
||||||
|
.tag("car_make", "GM" if frogpilot_toggles.car_make == "gm" else frogpilot_toggles.car_make.title())
|
||||||
|
.tag("car_model", frogpilot_toggles.car_model)
|
||||||
|
.tag("city", city)
|
||||||
|
.tag("country", country)
|
||||||
|
.tag("device", HARDWARE.get_device_type())
|
||||||
|
.tag("driving_model", clean_model_name(frogpilot_toggles.model_name))
|
||||||
|
.tag("state", state)
|
||||||
|
.tag("theme", selected_theme.title())
|
||||||
|
.tag("branch", build_metadata.channel)
|
||||||
|
.tag("dongle_id", params.get("FrogPilotDongleId", encoding="utf-8"))
|
||||||
|
|
||||||
.field("blocked_user", frogpilot_toggles.block_user)
|
.field("blocked_user", frogpilot_toggles.block_user)
|
||||||
.field("car_make", "GM" if frogpilot_toggles.car_make == "gm" else frogpilot_toggles.car_make.title())
|
|
||||||
.field("car_model", frogpilot_toggles.car_model)
|
|
||||||
.field("city", city)
|
|
||||||
.field("country", country)
|
|
||||||
.field("current_months_kilometers", int(frogpilot_stats.get("CurrentMonthsKilometers", 0)))
|
.field("current_months_kilometers", int(frogpilot_stats.get("CurrentMonthsKilometers", 0)))
|
||||||
.field("device", HARDWARE.get_device_type())
|
|
||||||
.field("driving_model", clean_model_name(frogpilot_toggles.model_name))
|
|
||||||
.field("event", 1)
|
.field("event", 1)
|
||||||
.field("frogpilot_drives", int(frogpilot_stats.get("FrogPilotDrives", 0)))
|
.field("frogpilot_drives", int(frogpilot_stats.get("FrogPilotDrives", 0)))
|
||||||
.field("frogpilot_hours", float(frogpilot_stats.get("FrogPilotSeconds", 0)) / (60 * 60))
|
.field("frogpilot_hours", float(frogpilot_stats.get("FrogPilotSeconds", 0)) / (60 * 60))
|
||||||
@@ -203,8 +208,6 @@ def send_stats():
|
|||||||
.field("longitude", longitude)
|
.field("longitude", longitude)
|
||||||
.field("rainbow_path", frogpilot_toggles.rainbow_path)
|
.field("rainbow_path", frogpilot_toggles.rainbow_path)
|
||||||
.field("random_events", frogpilot_toggles.random_events)
|
.field("random_events", frogpilot_toggles.random_events)
|
||||||
.field("state", state)
|
|
||||||
.field("theme", selected_theme.title())
|
|
||||||
.field("total_aol_seconds", float(frogpilot_stats.get("AOLTime", 0)))
|
.field("total_aol_seconds", float(frogpilot_stats.get("AOLTime", 0)))
|
||||||
.field("total_lateral_seconds", float(frogpilot_stats.get("LateralTime", 0)))
|
.field("total_lateral_seconds", float(frogpilot_stats.get("LateralTime", 0)))
|
||||||
.field("total_longitudinal_seconds", float(frogpilot_stats.get("LongitudinalTime", 0)))
|
.field("total_longitudinal_seconds", float(frogpilot_stats.get("LongitudinalTime", 0)))
|
||||||
@@ -213,9 +216,6 @@ def send_stats():
|
|||||||
.field("up_to_date", is_up_to_date(build_metadata))
|
.field("up_to_date", is_up_to_date(build_metadata))
|
||||||
.field("using_stock_acc", not (frogpilot_toggles.has_cc_long or frogpilot_toggles.openpilot_longitudinal))
|
.field("using_stock_acc", not (frogpilot_toggles.has_cc_long or frogpilot_toggles.openpilot_longitudinal))
|
||||||
|
|
||||||
.tag("branch", build_metadata.channel)
|
|
||||||
.tag("dongle_id", params.get("FrogPilotDongleId", encoding="utf-8"))
|
|
||||||
|
|
||||||
.time(now)
|
.time(now)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ BO_ 481 ASCMSteeringButton: 7 K124_ASCM
|
|||||||
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ ACCAlwaysOne : 24|1@0+ (1,0) [0|1] "" XXX
|
SG_ ACCAlwaysOne : 24|1@0+ (1,0) [0|1] "" XXX
|
||||||
|
SG_ ACCHiddenBit : 30|1@0+ (1,0) [0|1] "" XXX
|
||||||
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ DriveModeButton : 39|1@0+ (1,0) [0|1] "" XXX
|
SG_ DriveModeButton : 39|1@0+ (1,0) [0|1] "" XXX
|
||||||
SG_ RollingCounter : 33|2@0+ (1,0) [0|3] "" NEO
|
SG_ RollingCounter : 33|2@0+ (1,0) [0|3] "" NEO
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ BO_ 481 ASCMSteeringButton: 7 K124_ASCM
|
|||||||
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
SG_ DistanceButton : 22|1@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
SG_ LKAButton : 23|1@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ ACCAlwaysOne : 24|1@0+ (1,0) [0|1] "" XXX
|
SG_ ACCAlwaysOne : 24|1@0+ (1,0) [0|1] "" XXX
|
||||||
|
SG_ ACCHiddenBit : 30|1@0+ (1,0) [0|1] "" XXX
|
||||||
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
SG_ ACCButtons : 46|3@0+ (1,0) [0|0] "" NEO
|
||||||
SG_ DriveModeButton : 39|1@0+ (1,0) [0|1] "" XXX
|
SG_ DriveModeButton : 39|1@0+ (1,0) [0|1] "" XXX
|
||||||
SG_ RollingCounter : 33|2@0+ (1,0) [0|3] "" NEO
|
SG_ RollingCounter : 33|2@0+ (1,0) [0|3] "" NEO
|
||||||
|
|||||||
@@ -49,12 +49,17 @@ class CarController(CarControllerBase):
|
|||||||
|
|
||||||
self.params = CarControllerParams(self.CP)
|
self.params = CarControllerParams(self.CP)
|
||||||
self.is_volt = self.CP.carFingerprint in (CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC)
|
self.is_volt = self.CP.carFingerprint in (CAR.CHEVROLET_VOLT, CAR.CHEVROLET_VOLT_2019, CAR.CHEVROLET_VOLT_ASCM, CAR.CHEVROLET_VOLT_CAMERA, CAR.CHEVROLET_VOLT_CC)
|
||||||
|
self.pedal_scale = 1.0
|
||||||
self.mass = CP.mass
|
self.mass = CP.mass
|
||||||
self.tireRadius = 0.075 * CP.wheelbase + 0.1453
|
self.tireRadius = 0.075 * CP.wheelbase + 0.1453
|
||||||
self.frontalArea = 1.05 * CP.wheelbase + 0.0679
|
self.frontalArea = 1.05 * CP.wheelbase + 0.0679
|
||||||
self.coeffDrag = 0.30
|
self.coeffDrag = 0.30
|
||||||
self.airDensity = 1.225
|
self.airDensity = 1.225
|
||||||
self.params_ = Params()
|
self.params_ = Params()
|
||||||
|
self.malibu_cancel_phase = 0
|
||||||
|
self.malibu_cancel_last_ts = 0.0
|
||||||
|
self.malibu_cancel_frame = 0
|
||||||
|
self.malibu_button_phase = 0
|
||||||
|
|
||||||
self.packer_pt = CANPacker(DBC[self.CP.carFingerprint]['pt'])
|
self.packer_pt = CANPacker(DBC[self.CP.carFingerprint]['pt'])
|
||||||
self.packer_obj = CANPacker(DBC[self.CP.carFingerprint]['radar'])
|
self.packer_obj = CANPacker(DBC[self.CP.carFingerprint]['radar'])
|
||||||
@@ -88,10 +93,18 @@ class CarController(CarControllerBase):
|
|||||||
hud_v_cruise = hud_control.setSpeed
|
hud_v_cruise = hud_control.setSpeed
|
||||||
if hud_v_cruise > 70:
|
if hud_v_cruise > 70:
|
||||||
hud_v_cruise = 0
|
hud_v_cruise = 0
|
||||||
|
now_sec = now_nanos * 1e-9
|
||||||
|
|
||||||
# Send CAN commands.
|
# Send CAN commands.
|
||||||
can_sends = []
|
can_sends = []
|
||||||
|
|
||||||
|
if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
|
phase_map = gmcan.malibu_phase_map_for_acc(CS.cruise_buttons)
|
||||||
|
if phase_map and CS.steering_button_checksum in phase_map:
|
||||||
|
phase = (phase_map[CS.steering_button_checksum] + 1) % 4
|
||||||
|
self.malibu_cancel_phase = phase
|
||||||
|
self.malibu_button_phase = phase
|
||||||
|
|
||||||
# Steering (Active: 50Hz, inactive: 10Hz)
|
# Steering (Active: 50Hz, inactive: 10Hz)
|
||||||
steer_step = self.params.STEER_STEP if CC.latActive else self.params.INACTIVE_STEER_STEP
|
steer_step = self.params.STEER_STEP if CC.latActive else self.params.INACTIVE_STEER_STEP
|
||||||
|
|
||||||
@@ -212,6 +225,7 @@ class CarController(CarControllerBase):
|
|||||||
if self.CP.carFingerprint in CC_ONLY_CAR:
|
if self.CP.carFingerprint in CC_ONLY_CAR:
|
||||||
# gas interceptor only used for full long control on cars without ACC
|
# gas interceptor only used for full long control on cars without ACC
|
||||||
interceptor_gas_cmd = self.calc_pedal_command(actuators.accel, CC.longActive)
|
interceptor_gas_cmd = self.calc_pedal_command(actuators.accel, CC.longActive)
|
||||||
|
interceptor_gas_cmd = clip(interceptor_gas_cmd * self.pedal_scale, 0., 1.)
|
||||||
|
|
||||||
if self.CP.enableGasInterceptor and self.apply_gas > self.params.INACTIVE_REGEN and CS.out.cruiseState.standstill:
|
if self.CP.enableGasInterceptor and self.apply_gas > self.params.INACTIVE_REGEN and CS.out.cruiseState.standstill:
|
||||||
# "Tap" the accelerator pedal to re-engage ACC
|
# "Tap" the accelerator pedal to re-engage ACC
|
||||||
@@ -222,12 +236,18 @@ class CarController(CarControllerBase):
|
|||||||
idx = (self.frame // 4) % 4
|
idx = (self.frame // 4) % 4
|
||||||
|
|
||||||
if self.CP.flags & GMFlags.CC_LONG.value:
|
if self.CP.flags & GMFlags.CC_LONG.value:
|
||||||
if CC.longActive and CS.out.cruiseState.enabled and CS.out.vEgo > self.CP.minEnableSpeed:
|
if CC.longActive and CS.out.vEgo > self.CP.minEnableSpeed:
|
||||||
# Using extend instead of append since the message is only sent intermittently
|
# Using extend instead of append since the message is only sent intermittently
|
||||||
can_sends.extend(gmcan.create_gm_cc_spam_command(self.packer_pt, self, CS, actuators, frogpilot_toggles))
|
can_sends.extend(gmcan.create_gm_cc_spam_command(self.packer_pt, self, CS, actuators, frogpilot_toggles))
|
||||||
elif (CS.out.cruiseState.enabled and CC.enabled and self.frame % 52 == 0 and
|
elif (CS.out.cruiseState.enabled and CC.enabled and self.frame % 52 == 0 and
|
||||||
CS.cruise_buttons == CruiseButtons.UNPRESS and CS.out.gasPressed and CS.out.cruiseState.speed < CS.out.vEgo < hud_v_cruise):
|
CS.cruise_buttons == CruiseButtons.UNPRESS and CS.out.gasPressed and CS.out.cruiseState.speed < CS.out.vEgo < hud_v_cruise):
|
||||||
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.DECEL_SET))
|
if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
|
can_sends.append(gmcan.create_buttons_malibu(
|
||||||
|
self.packer_pt, CanBus.POWERTRAIN, CruiseButtons.DECEL_SET,
|
||||||
|
self.malibu_button_phase, CS.steering_button_prefix))
|
||||||
|
self.malibu_button_phase = (self.malibu_button_phase + 1) % 4
|
||||||
|
else:
|
||||||
|
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.DECEL_SET))
|
||||||
if self.CP.enableGasInterceptor:
|
if self.CP.enableGasInterceptor:
|
||||||
can_sends.append(create_gas_interceptor_command(self.packer_pt, interceptor_gas_cmd, idx))
|
can_sends.append(create_gas_interceptor_command(self.packer_pt, interceptor_gas_cmd, idx))
|
||||||
if self.CP.carFingerprint not in CC_ONLY_CAR:
|
if self.CP.carFingerprint not in CC_ONLY_CAR:
|
||||||
@@ -286,9 +306,17 @@ class CarController(CarControllerBase):
|
|||||||
(self.CP.flags & GMFlags.PEDAL_LONG.value) # Always cancel stock CC when using pedal interceptor
|
(self.CP.flags & GMFlags.PEDAL_LONG.value) # Always cancel stock CC when using pedal interceptor
|
||||||
or (self.CP.flags & GMFlags.CC_LONG.value and not CC.enabled) # Cancel stock CC if OP is not active
|
or (self.CP.flags & GMFlags.CC_LONG.value and not CC.enabled) # Cancel stock CC if OP is not active
|
||||||
) and CS.out.cruiseState.enabled:
|
) and CS.out.cruiseState.enabled:
|
||||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.04:
|
if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
self.last_button_frame = self.frame
|
# Match 33 Hz cadence (every 3 frames) and align phase to the last seen checksum.
|
||||||
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.CANCEL))
|
if self.malibu_cancel_frame % 3 == 0:
|
||||||
|
can_sends.append(gmcan.create_buttons_malibu_cancel(
|
||||||
|
CanBus.POWERTRAIN, self.malibu_cancel_phase, CS.steering_button_prefix))
|
||||||
|
self.malibu_cancel_phase = (self.malibu_cancel_phase + 1) % 4
|
||||||
|
self.malibu_cancel_frame += 1
|
||||||
|
else:
|
||||||
|
if (self.frame - self.last_button_frame) * DT_CTRL > 0.04:
|
||||||
|
self.last_button_frame = self.frame
|
||||||
|
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.POWERTRAIN, (CS.buttons_counter + 1) % 4, CruiseButtons.CANCEL))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# While car is braking, cancel button causes ECM to enter a soft disable state with a fault status.
|
# While car is braking, cancel button causes ECM to enter a soft disable state with a fault status.
|
||||||
@@ -296,10 +324,17 @@ class CarController(CarControllerBase):
|
|||||||
self.cancel_counter = self.cancel_counter + 1 if CC.cruiseControl.cancel else 0
|
self.cancel_counter = self.cancel_counter + 1 if CC.cruiseControl.cancel else 0
|
||||||
|
|
||||||
# Stock longitudinal, integrated at camera
|
# Stock longitudinal, integrated at camera
|
||||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.04:
|
if self.cancel_counter > CAMERA_CANCEL_DELAY_FRAMES:
|
||||||
if self.cancel_counter > CAMERA_CANCEL_DELAY_FRAMES:
|
if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
self.last_button_frame = self.frame
|
if self.malibu_cancel_frame % 3 == 0:
|
||||||
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.CAMERA, CS.buttons_counter, CruiseButtons.CANCEL))
|
can_sends.append(gmcan.create_buttons_malibu_cancel(
|
||||||
|
CanBus.POWERTRAIN, self.malibu_cancel_phase, CS.steering_button_prefix))
|
||||||
|
self.malibu_cancel_phase = (self.malibu_cancel_phase + 1) % 4
|
||||||
|
self.malibu_cancel_frame += 1
|
||||||
|
else:
|
||||||
|
if (self.frame - self.last_button_frame) * DT_CTRL > 0.04:
|
||||||
|
self.last_button_frame = self.frame
|
||||||
|
can_sends.append(gmcan.create_buttons(self.packer_pt, CanBus.CAMERA, CS.buttons_counter, CruiseButtons.CANCEL))
|
||||||
|
|
||||||
if self.CP.networkLocation == NetworkLocation.fwdCamera:
|
if self.CP.networkLocation == NetworkLocation.fwdCamera:
|
||||||
# Silence "Take Steering" alert sent by camera, forward PSCMStatus with HandsOffSWlDetectionStatus=1
|
# Silence "Take Steering" alert sent by camera, forward PSCMStatus with HandsOffSWlDetectionStatus=1
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class CarState(CarStateBase):
|
|||||||
self.pt_lka_steering_cmd_counter = 0
|
self.pt_lka_steering_cmd_counter = 0
|
||||||
self.cam_lka_steering_cmd_counter = 0
|
self.cam_lka_steering_cmd_counter = 0
|
||||||
self.buttons_counter = 0
|
self.buttons_counter = 0
|
||||||
|
self.steering_button_checksum = 0
|
||||||
|
self.steering_button_prefix = 0x01
|
||||||
|
|
||||||
self.prev_distance_button = 0
|
self.prev_distance_button = 0
|
||||||
self.distance_button = 0
|
self.distance_button = 0
|
||||||
@@ -42,6 +44,10 @@ class CarState(CarStateBase):
|
|||||||
self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]["ACCButtons"]
|
self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]["ACCButtons"]
|
||||||
self.distance_button = pt_cp.vl["ASCMSteeringButton"]["DistanceButton"]
|
self.distance_button = pt_cp.vl["ASCMSteeringButton"]["DistanceButton"]
|
||||||
self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"]
|
self.buttons_counter = pt_cp.vl["ASCMSteeringButton"]["RollingCounter"]
|
||||||
|
self.steering_button_checksum = pt_cp.vl["ASCMSteeringButton"]["SteeringButtonChecksum"]
|
||||||
|
acc_always_one = pt_cp.vl["ASCMSteeringButton"]["ACCAlwaysOne"]
|
||||||
|
acc_hidden_bit = pt_cp.vl["ASCMSteeringButton"].get("ACCHiddenBit", 0)
|
||||||
|
self.steering_button_prefix = (int(acc_always_one) & 1) | ((int(acc_hidden_bit) & 1) << 6)
|
||||||
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
|
self.pscm_status = copy.copy(pt_cp.vl["PSCMStatus"])
|
||||||
# This is to avoid a fault where you engage while still moving backwards after shifting to D.
|
# This is to avoid a fault where you engage while still moving backwards after shifting to D.
|
||||||
# An Equinox has been seen with an unsupported status (3), so only check if either wheel is in reverse (2)
|
# An Equinox has been seen with an unsupported status (3), so only check if either wheel is in reverse (2)
|
||||||
@@ -83,7 +89,7 @@ class CarState(CarStateBase):
|
|||||||
# that the brake is being intermittently pressed without user interaction.
|
# that the brake is being intermittently pressed without user interaction.
|
||||||
# To avoid a cruise fault we need to use a conservative brake position threshold
|
# To avoid a cruise fault we need to use a conservative brake position threshold
|
||||||
# https://static.nhtsa.gov/odi/tsbs/2017/MC-10137629-9999.pdf
|
# https://static.nhtsa.gov/odi/tsbs/2017/MC-10137629-9999.pdf
|
||||||
analog_thresh = 0.07 if (self.CP.flags & GMFlags.NO_ACCELERATOR_POS_MSG.value) else 8
|
analog_thresh = 0.10 if (self.CP.flags & GMFlags.NO_ACCELERATOR_POS_MSG.value) else 8
|
||||||
ret.brakePressed = ret.brake >= analog_thresh
|
ret.brakePressed = ret.brake >= analog_thresh
|
||||||
|
|
||||||
# Regen braking is braking
|
# Regen braking is braking
|
||||||
@@ -93,7 +99,7 @@ class CarState(CarStateBase):
|
|||||||
|
|
||||||
if self.CP.enableGasInterceptor:
|
if self.CP.enableGasInterceptor:
|
||||||
ret.gas = (pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
|
ret.gas = (pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
|
||||||
threshold = 23 if self.CP.carFingerprint in CAMERA_ACC_CAR else 4 # Panda 595 threshold = 23.65. Set lower to avoid panda blocking messages and GasInterceptor faulting.
|
threshold = 21 if self.CP.carFingerprint in CAMERA_ACC_CAR else 4 # Panda 595 threshold = 23.65. Set lower to avoid panda blocking messages and GasInterceptor faulting.
|
||||||
ret.gasPressed = ret.gas > threshold
|
ret.gasPressed = ret.gas > threshold
|
||||||
else:
|
else:
|
||||||
ret.gas = pt_cp.vl["AcceleratorPedal2"]["AcceleratorPedal2"] / 254.
|
ret.gas = pt_cp.vl["AcceleratorPedal2"]["AcceleratorPedal2"] / 254.
|
||||||
|
|||||||
@@ -7,6 +7,58 @@ from openpilot.selfdrive.car import make_can_msg
|
|||||||
from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CanBus
|
from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CanBus
|
||||||
|
|
||||||
|
|
||||||
|
MALIBU_BUTTON_TABLE = {
|
||||||
|
0: [0x2FBC, 0x25DE, 0x15EE, 0x1FCC],
|
||||||
|
1: [0x55AE, 0x5F8C, 0x6F7C, 0x659E],
|
||||||
|
4: [0x2ACD, 0x20EF, 0x1ADD, 0x10FF],
|
||||||
|
5: [0x50BF, 0x5A9D, 0x60AF, 0x6A8D],
|
||||||
|
}
|
||||||
|
|
||||||
|
MALIBU_BUTTON_MAP = {
|
||||||
|
CruiseButtons.UNPRESS: 0,
|
||||||
|
CruiseButtons.RES_ACCEL: 1,
|
||||||
|
CruiseButtons.MAIN: 4,
|
||||||
|
CruiseButtons.CANCEL: 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def malibu_phase_map_for_button(button):
|
||||||
|
key = MALIBU_BUTTON_MAP.get(button, None)
|
||||||
|
if key is None or key not in MALIBU_BUTTON_TABLE:
|
||||||
|
return None
|
||||||
|
return {v: i for i, v in enumerate(MALIBU_BUTTON_TABLE[key])}
|
||||||
|
|
||||||
|
|
||||||
|
def malibu_phase_map_for_acc(acc_value):
|
||||||
|
seq = MALIBU_BUTTON_TABLE.get(acc_value)
|
||||||
|
if not seq:
|
||||||
|
return None
|
||||||
|
return {v: i for i, v in enumerate(seq)}
|
||||||
|
|
||||||
|
|
||||||
|
def create_buttons_malibu(packer, bus, button, phase, prefix=0x41):
|
||||||
|
key = MALIBU_BUTTON_MAP.get(button, None)
|
||||||
|
if key is None or key not in MALIBU_BUTTON_TABLE:
|
||||||
|
# fallback to standard checksum for unsupported buttons
|
||||||
|
return create_buttons(packer, bus, 0, button)
|
||||||
|
|
||||||
|
values = {
|
||||||
|
"ACCButtons": button,
|
||||||
|
"RollingCounter": 0,
|
||||||
|
"ACCAlwaysOne": 1,
|
||||||
|
"DistanceButton": 0,
|
||||||
|
}
|
||||||
|
dat = packer.make_can_msg("ASCMSteeringButton", bus, values)[2]
|
||||||
|
data = bytearray(dat)
|
||||||
|
data[3] = prefix & 0xFF
|
||||||
|
|
||||||
|
seq = MALIBU_BUTTON_TABLE[key]
|
||||||
|
val = seq[phase % len(seq)]
|
||||||
|
data[5] = (val >> 8) & 0xFF
|
||||||
|
data[6] = val & 0xFF
|
||||||
|
return make_can_msg(0x1e1, bytes(data), bus)
|
||||||
|
|
||||||
|
|
||||||
def create_buttons(packer, bus, idx, button):
|
def create_buttons(packer, bus, idx, button):
|
||||||
values = {
|
values = {
|
||||||
"ACCButtons": button,
|
"ACCButtons": button,
|
||||||
@@ -24,6 +76,18 @@ def create_buttons(packer, bus, idx, button):
|
|||||||
return packer.make_can_msg("ASCMSteeringButton", bus, values)
|
return packer.make_can_msg("ASCMSteeringButton", bus, values)
|
||||||
|
|
||||||
|
|
||||||
|
def create_buttons_malibu_cancel(bus, phase, prefix=0x41):
|
||||||
|
# Malibu Hybrid CC cancel frames use a 4-value pattern in the last 2 bytes.
|
||||||
|
data = bytearray(7)
|
||||||
|
data[3] = prefix & 0xFF
|
||||||
|
data[4] = 0x00
|
||||||
|
cancel_bytes = (0x60, 0xAF, 0x65, 0x9E, 0x6A, 0x8D, 0x6F, 0x7C)
|
||||||
|
idx = ((phase + 2) % 4) * 2
|
||||||
|
data[5] = cancel_bytes[idx]
|
||||||
|
data[6] = cancel_bytes[idx + 1]
|
||||||
|
return make_can_msg(0x1e1, bytes(data), bus)
|
||||||
|
|
||||||
|
|
||||||
def create_pscm_status(packer, bus, pscm_status):
|
def create_pscm_status(packer, bus, pscm_status):
|
||||||
values = {s: pscm_status[s] for s in [
|
values = {s: pscm_status[s] for s in [
|
||||||
"HandsOffSWDetectionMode",
|
"HandsOffSWDetectionMode",
|
||||||
@@ -215,6 +279,13 @@ def create_gm_cc_spam_command(packer, controller, CS, actuators, frogpilot_toggl
|
|||||||
# TODO: Cleanup the timing - normal is every 30ms...
|
# TODO: Cleanup the timing - normal is every 30ms...
|
||||||
if (cruiseBtn != CruiseButtons.INIT) and ((controller.frame - controller.last_button_frame) * DT_CTRL > rate):
|
if (cruiseBtn != CruiseButtons.INIT) and ((controller.frame - controller.last_button_frame) * DT_CTRL > rate):
|
||||||
controller.last_button_frame = controller.frame
|
controller.last_button_frame = controller.frame
|
||||||
|
if CS.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
|
phase_map = malibu_phase_map_for_button(cruiseBtn)
|
||||||
|
if phase_map:
|
||||||
|
msgs = [create_buttons_malibu(packer, CanBus.POWERTRAIN, cruiseBtn, controller.malibu_button_phase,
|
||||||
|
CS.steering_button_prefix)]
|
||||||
|
controller.malibu_button_phase = (controller.malibu_button_phase + 1) % 4
|
||||||
|
return msgs
|
||||||
idx = (CS.buttons_counter + 1) % 4 # Need to predict the next idx for '22-23 EUV
|
idx = (CS.buttons_counter + 1) % 4 # Need to predict the next idx for '22-23 EUV
|
||||||
return [create_buttons(packer, CanBus.POWERTRAIN, idx, cruiseBtn)]
|
return [create_buttons(packer, CanBus.POWERTRAIN, idx, cruiseBtn)]
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs, frogpilot_toggles):
|
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs, frogpilot_toggles):
|
||||||
ret.carName = "gm"
|
ret.carName = "gm"
|
||||||
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.noOutput),
|
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.gm)]
|
||||||
get_safety_config(car.CarParams.SafetyModel.gm)]
|
|
||||||
ret.autoResumeSng = False
|
ret.autoResumeSng = False
|
||||||
ret.enableBsm = 0x142 in fingerprint[CanBus.POWERTRAIN]
|
ret.enableBsm = 0x142 in fingerprint[CanBus.POWERTRAIN]
|
||||||
|
|
||||||
@@ -133,7 +132,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
if PEDAL_MSG in fingerprint[0]:
|
if PEDAL_MSG in fingerprint[0]:
|
||||||
ret.enableGasInterceptor = True
|
ret.enableGasInterceptor = True
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_GAS_INTERCEPTOR
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_GAS_INTERCEPTOR
|
||||||
# When a pedal interceptor is present, always use normal longitudinal (block stock cruise)
|
# When a pedal interceptor is present, always use normal longitudinal (block stock cruise)
|
||||||
experimental_long = False
|
experimental_long = False
|
||||||
|
|
||||||
@@ -152,19 +151,19 @@ class CarInterface(CarInterfaceBase):
|
|||||||
ret.minEnableSpeed = 5 * CV.KPH_TO_MS
|
ret.minEnableSpeed = 5 * CV.KPH_TO_MS
|
||||||
ret.minSteerSpeed = 10 * CV.KPH_TO_MS
|
ret.minSteerSpeed = 10 * CV.KPH_TO_MS
|
||||||
if candidate in SDGM_CAR:
|
if candidate in SDGM_CAR:
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_SDGM
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_SDGM
|
||||||
# Use C9 brake bit only on SDGM variants that lack 0xBE (ECMAcceleratorPos)
|
# Use C9 brake bit only on SDGM variants that lack 0xBE (ECMAcceleratorPos)
|
||||||
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
|
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_FORCE_BRAKE_C9
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_FORCE_BRAKE_C9
|
||||||
ret.flags |= GMFlags.FORCE_BRAKE_C9.value
|
ret.flags |= GMFlags.FORCE_BRAKE_C9.value
|
||||||
ret.minEnableSpeed = -1. # engage speed is decided by pcm
|
ret.minEnableSpeed = -1. # engage speed is decided by pcm
|
||||||
ret.minSteerSpeed = 7 * CV.MPH_TO_MS
|
ret.minSteerSpeed = 7 * CV.MPH_TO_MS
|
||||||
elif candidate in ASCM_INT:
|
elif candidate in ASCM_INT:
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_CAM
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
|
||||||
ret.minSteerSpeed = 7 * CV.MPH_TO_MS
|
ret.minSteerSpeed = 7 * CV.MPH_TO_MS
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_ASCM_INT
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_ASCM_INT
|
||||||
else:
|
else:
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_CAM
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
|
||||||
|
|
||||||
# Tuning for experimental long
|
# Tuning for experimental long
|
||||||
ret.longitudinalTuning.kiV = [0.5, 0.5]
|
ret.longitudinalTuning.kiV = [0.5, 0.5]
|
||||||
@@ -177,7 +176,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
if ret.experimentalLongitudinalAvailable and experimental_long:
|
if ret.experimentalLongitudinalAvailable and experimental_long:
|
||||||
ret.pcmCruise = False
|
ret.pcmCruise = False
|
||||||
ret.openpilotLongitudinalControl = True
|
ret.openpilotLongitudinalControl = True
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
|
||||||
|
|
||||||
else: # ASCM, OBD-II harness
|
else: # ASCM, OBD-II harness
|
||||||
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
||||||
@@ -197,7 +196,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
if ret.enableGasInterceptor:
|
if ret.enableGasInterceptor:
|
||||||
# Need to set ASCM long limits when using pedal interceptor, instead of camera ACC long limits
|
# Need to set ASCM long limits when using pedal interceptor, instead of camera ACC long limits
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_ASCM_LONG
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_ASCM_LONG
|
||||||
|
|
||||||
# Start with a baseline tuning for all GM vehicles. Override tuning as needed in each model section below.
|
# Start with a baseline tuning for all GM vehicles. Override tuning as needed in each model section below.
|
||||||
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
|
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
|
||||||
@@ -220,6 +219,8 @@ class CarInterface(CarInterfaceBase):
|
|||||||
if candidate in VOLT_LIKE_CARS:
|
if candidate in VOLT_LIKE_CARS:
|
||||||
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
|
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
|
||||||
ret.steerActuatorDelay = 0.2
|
ret.steerActuatorDelay = 0.2
|
||||||
|
if candidate == CAR.CHEVROLET_MALIBU_HYBRID_CC and ret.enableGasInterceptor:
|
||||||
|
ret.flags |= GMFlags.PEDAL_LONG.value
|
||||||
|
|
||||||
elif candidate == CAR.GMC_ACADIA:
|
elif candidate == CAR.GMC_ACADIA:
|
||||||
ret.minEnableSpeed = -1. # engage speed is decided by pcm
|
ret.minEnableSpeed = -1. # engage speed is decided by pcm
|
||||||
@@ -319,7 +320,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
if ret.enableGasInterceptor and frogpilot_toggles.gm_pedal_longitudinal:
|
if ret.enableGasInterceptor and frogpilot_toggles.gm_pedal_longitudinal:
|
||||||
ret.networkLocation = NetworkLocation.fwdCamera
|
ret.networkLocation = NetworkLocation.fwdCamera
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_CAM
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM
|
||||||
ret.minEnableSpeed = -1
|
ret.minEnableSpeed = -1
|
||||||
ret.pcmCruise = False
|
ret.pcmCruise = False
|
||||||
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
||||||
@@ -328,7 +329,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
if candidate in CC_ONLY_CAR:
|
if candidate in CC_ONLY_CAR:
|
||||||
ret.flags |= GMFlags.PEDAL_LONG.value
|
ret.flags |= GMFlags.PEDAL_LONG.value
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_PEDAL_LONG
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_PEDAL_LONG
|
||||||
# Note: Low speed, stop and go not tested. Should be fairly smooth on highway
|
# Note: Low speed, stop and go not tested. Should be fairly smooth on highway
|
||||||
ret.longitudinalTuning.kiBP = [0.0, 5., 35.]
|
ret.longitudinalTuning.kiBP = [0.0, 5., 35.]
|
||||||
ret.longitudinalTuning.kiV = [0.0, 0.35, 0.5]
|
ret.longitudinalTuning.kiV = [0.0, 0.35, 0.5]
|
||||||
@@ -338,15 +339,26 @@ class CarInterface(CarInterfaceBase):
|
|||||||
ret.pcmCruise = False
|
ret.pcmCruise = False
|
||||||
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
||||||
else: # Pedal used for SNG, ACC for longitudinal control otherwise
|
else: # Pedal used for SNG, ACC for longitudinal control otherwise
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_HW_CAM_LONG
|
||||||
ret.startingState = True
|
ret.startingState = True
|
||||||
ret.vEgoStopping = 0.25
|
ret.vEgoStopping = 0.25
|
||||||
ret.vEgoStarting = 0.25
|
ret.vEgoStarting = 0.25
|
||||||
|
|
||||||
|
if ret.enableGasInterceptor and candidate == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||||
|
ret.flags |= GMFlags.PEDAL_LONG.value
|
||||||
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_PEDAL_LONG
|
||||||
|
ret.longitudinalTuning.kiBP = [0.0, 5., 35.]
|
||||||
|
ret.longitudinalTuning.kiV = [0.0, 0.18, 0.25]
|
||||||
|
ret.longitudinalTuning.kfDEPRECATED = 0.15
|
||||||
|
ret.stoppingDecelRate = 0.8
|
||||||
|
ret.minEnableSpeed = -1
|
||||||
|
ret.pcmCruise = False
|
||||||
|
ret.openpilotLongitudinalControl = not frogpilot_toggles.disable_openpilot_long
|
||||||
|
|
||||||
|
|
||||||
elif candidate in CC_ONLY_CAR:
|
elif candidate in CC_ONLY_CAR:
|
||||||
ret.flags |= GMFlags.CC_LONG.value
|
ret.flags |= GMFlags.CC_LONG.value
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_CC_LONG
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_CC_LONG
|
||||||
ret.radarUnavailable = True
|
ret.radarUnavailable = True
|
||||||
ret.experimentalLongitudinalAvailable = False
|
ret.experimentalLongitudinalAvailable = False
|
||||||
ret.minEnableSpeed = 24 * CV.MPH_TO_MS
|
ret.minEnableSpeed = 24 * CV.MPH_TO_MS
|
||||||
@@ -368,12 +380,12 @@ class CarInterface(CarInterfaceBase):
|
|||||||
ret.longitudinalTuning.kiV = [0.1]
|
ret.longitudinalTuning.kiV = [0.1]
|
||||||
|
|
||||||
if candidate in CC_ONLY_CAR:
|
if candidate in CC_ONLY_CAR:
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_NO_ACC
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_NO_ACC
|
||||||
|
|
||||||
# Exception for flashed cars, or cars whose camera was removed
|
# Exception for flashed cars, or cars whose camera was removed
|
||||||
if (ret.networkLocation == NetworkLocation.fwdCamera or candidate in CC_ONLY_CAR) and CAM_MSG not in fingerprint[CanBus.CAMERA] and not candidate in (SDGM_CAR | ASCM_INT):
|
if (ret.networkLocation == NetworkLocation.fwdCamera or candidate in CC_ONLY_CAR) and CAM_MSG not in fingerprint[CanBus.CAMERA] and not candidate in (SDGM_CAR | ASCM_INT):
|
||||||
ret.flags |= GMFlags.NO_CAMERA.value
|
ret.flags |= GMFlags.NO_CAMERA.value
|
||||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_GM_NO_CAMERA
|
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_GM_NO_CAMERA
|
||||||
|
|
||||||
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
|
if ACCELERATOR_POS_MSG not in fingerprint[CanBus.POWERTRAIN]:
|
||||||
ret.flags |= GMFlags.NO_ACCELERATOR_POS_MSG.value
|
ret.flags |= GMFlags.NO_ACCELERATOR_POS_MSG.value
|
||||||
@@ -421,6 +433,7 @@ class CarInterface(CarInterfaceBase):
|
|||||||
|
|
||||||
if (self.CP.flags & GMFlags.PEDAL_LONG.value) and \
|
if (self.CP.flags & GMFlags.PEDAL_LONG.value) and \
|
||||||
self.CP.transmissionType == TransmissionType.direct and \
|
self.CP.transmissionType == TransmissionType.direct and \
|
||||||
|
self.CP.carFingerprint != CAR.CHEVROLET_MALIBU_HYBRID_CC and \
|
||||||
not self.CS.single_pedal_mode and \
|
not self.CS.single_pedal_mode and \
|
||||||
c.longActive:
|
c.longActive:
|
||||||
events.add(FrogPilotEventName.pedalInterceptorNoBrake)
|
events.add(FrogPilotEventName.pedalInterceptorNoBrake)
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ class CAR(Platforms):
|
|||||||
)
|
)
|
||||||
CHEVROLET_MALIBU_CC = GMPlatformConfig(
|
CHEVROLET_MALIBU_CC = GMPlatformConfig(
|
||||||
[GMCarDocs("Chevrolet Malibu 2023 - No-ACC")],
|
[GMCarDocs("Chevrolet Malibu 2023 - No-ACC")],
|
||||||
CarSpecs(mass=1450, wheelbase=2.8, steerRatio=15.8, centerToFrontRatio=0.4),
|
CarSpecs(mass=1450, wheelbase=2.8, steerRatio=18.25, centerToFrontRatio=0.4, tireStiffnessFactor=0.997),
|
||||||
)
|
)
|
||||||
CHEVROLET_MALIBU_HYBRID_CC = GMPlatformConfig(
|
CHEVROLET_MALIBU_HYBRID_CC = GMPlatformConfig(
|
||||||
[GMCarDocs("Chevrolet Malibu Hybrid 2017 - No-ACC")],
|
[GMCarDocs("Chevrolet Malibu Hybrid 2017 - No-ACC")],
|
||||||
@@ -297,12 +297,12 @@ class AccState:
|
|||||||
STANDSTILL = 4
|
STANDSTILL = 4
|
||||||
|
|
||||||
class CanBus:
|
class CanBus:
|
||||||
POWERTRAIN = 4
|
POWERTRAIN = 0
|
||||||
OBSTACLE = 5
|
OBSTACLE = 1
|
||||||
CAMERA = 6
|
CAMERA = 2
|
||||||
CHASSIS = 6
|
CHASSIS = 2
|
||||||
LOOPBACK = 132
|
LOOPBACK = 128
|
||||||
DROPPED = 196
|
DROPPED = 192
|
||||||
|
|
||||||
class GMFlags(IntFlag):
|
class GMFlags(IntFlag):
|
||||||
PEDAL_LONG = 1
|
PEDAL_LONG = 1
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
|
|||||||
"CADILLAC_XT4" = [1.45, 1.6, 0.2]
|
"CADILLAC_XT4" = [1.45, 1.6, 0.2]
|
||||||
"CADILLAC_XT6" = [1.33, 1.9, 0.16]
|
"CADILLAC_XT6" = [1.33, 1.9, 0.16]
|
||||||
"CHEVROLET_BOLT_EUV" = [1.0, 2.0, 0.175]
|
"CHEVROLET_BOLT_EUV" = [1.0, 2.0, 0.175]
|
||||||
|
"CHEVROLET_MALIBU_CC" = [1.58, 1.8422651988094612, 0.205]
|
||||||
"CHEVROLET_SILVERADO" = [1.9, 1.9, 0.112]
|
"CHEVROLET_SILVERADO" = [1.9, 1.9, 0.112]
|
||||||
"CHEVROLET_BLAZER" = [1.33, 1.33, 0.18]
|
"CHEVROLET_BLAZER" = [1.33, 1.33, 0.18]
|
||||||
"CHEVROLET_TRAILBLAZER" = [1.33, 1.9, 0.16]
|
"CHEVROLET_TRAILBLAZER" = [1.33, 1.9, 0.16]
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"]
|
|||||||
"CHEVROLET_MALIBU" = "CHEVROLET_VOLT"
|
"CHEVROLET_MALIBU" = "CHEVROLET_VOLT"
|
||||||
"CHEVROLET_MALIBU_ASCM" = "CHEVROLET_VOLT"
|
"CHEVROLET_MALIBU_ASCM" = "CHEVROLET_VOLT"
|
||||||
"CHEVROLET_MALIBU_SDGM" = "CHEVROLET_VOLT"
|
"CHEVROLET_MALIBU_SDGM" = "CHEVROLET_VOLT"
|
||||||
"CHEVROLET_MALIBU_CC" = "CHEVROLET_VOLT"
|
|
||||||
"HOLDEN_ASTRA" = "CHEVROLET_VOLT"
|
"HOLDEN_ASTRA" = "CHEVROLET_VOLT"
|
||||||
"CHEVROLET_VOLT_CC" = "CHEVROLET_VOLT"
|
"CHEVROLET_VOLT_CC" = "CHEVROLET_VOLT"
|
||||||
"CHEVROLET_VOLT_CAMERA" = "CHEVROLET_VOLT"
|
"CHEVROLET_VOLT_CAMERA" = "CHEVROLET_VOLT"
|
||||||
|
|||||||
Reference in New Issue
Block a user