Merge remote-tracking branch 'upstream/master' into PR_gm_ev_ice_gas_brake_lookup

pull/25354/head
Shane Smiskol 3 years ago
commit fba988368f
  1. 2
      .github/workflows/prebuilt.yaml
  2. 2
      .github/workflows/selfdrive_tests.yaml
  3. 2
      .github/workflows/tools_tests.yaml
  4. 5
      docs/CARS.md
  5. 4
      selfdrive/car/chrysler/values.py
  6. 13
      selfdrive/car/gm/carstate.py
  7. 5
      selfdrive/car/gm/interface.py
  8. 5
      selfdrive/car/hyundai/values.py
  9. 5
      selfdrive/car/interfaces.py
  10. 2
      selfdrive/test/process_replay/model_replay_ref_commit
  11. 2
      selfdrive/test/process_replay/ref_commit
  12. 8
      selfdrive/ui/qt/onroad.cc
  13. 1
      selfdrive/ui/qt/onroad.h
  14. 16
      selfdrive/ui/translations/main_ja.ts
  15. 16
      selfdrive/ui/translations/main_ko.ts
  16. 16
      selfdrive/ui/translations/main_zh-CHS.ts
  17. 16
      selfdrive/ui/translations/main_zh-CHT.ts
  18. 3
      system/hardware/tici/test_power_draw.py
  19. 3
      tools/replay/README.md

@ -9,7 +9,7 @@ env:
BASE_IMAGE: openpilot-base BASE_IMAGE: openpilot-base
DOCKER_REGISTRY: ghcr.io/commaai DOCKER_REGISTRY: ghcr.io/commaai
DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }} DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: | BUILD: |
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true
docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true

@ -11,7 +11,7 @@ env:
DOCKER_REGISTRY: ghcr.io/commaai DOCKER_REGISTRY: ghcr.io/commaai
AZURE_TOKEN: ${{ secrets.AZURE_COMMADATACI_OPENPILOTCI_TOKEN }} AZURE_TOKEN: ${{ secrets.AZURE_COMMADATACI_OPENPILOTCI_TOKEN }}
DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }} DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: | BUILD: |
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true
docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true docker pull $DOCKER_REGISTRY/$BASE_IMAGE:latest || true

@ -7,7 +7,7 @@ env:
BASE_IMAGE: openpilot-base BASE_IMAGE: openpilot-base
CL_BASE_IMAGE: openpilot-base-cl CL_BASE_IMAGE: openpilot-base-cl
DOCKER_REGISTRY: ghcr.io/commaai DOCKER_REGISTRY: ghcr.io/commaai
DOCKER_LOGIN: docker login ghcr.io -u adeebshihadeh -p ${{ secrets.CONTAINER_TOKEN }} DOCKER_LOGIN: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
BUILD: | BUILD: |
docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true docker pull $(grep -iohP '(?<=^from)\s+\S+' Dockerfile.openpilot_base) || true

@ -19,7 +19,7 @@ A supported vehicle is one that just works when you install a comma device. Ever
- [![star](assets/icon-star-empty.svg)](##) - Limited ability to make tighter turns. - [![star](assets/icon-star-empty.svg)](##) - Limited ability to make tighter turns.
# 198 Supported Cars # 199 Supported Cars
|Make|Model|Supported Package|openpilot ACC|Stop and Go|Steer to 0|Steering Torque| |Make|Model|Supported Package|openpilot ACC|Stop and Go|Steer to 0|Steering Torque|
|---|---|---|:---:|:---:|:---:|:---:| |---|---|---|:---:|:---:|:---:|:---:|
@ -97,7 +97,8 @@ A supported vehicle is one that just works when you install a comma device. Ever
|Kia|Forte 2018|Smart Cruise Control (SCC) & LKAS|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Forte 2018|Smart Cruise Control (SCC) & LKAS|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Forte 2019-21|All|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Forte 2019-21|All|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|K5 2021-22|Smart Cruise Control (SCC)|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|K5 2021-22|Smart Cruise Control (SCC)|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Niro Electric 2019-20|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Niro Electric 2019|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Niro Electric 2020|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Niro Electric 2021|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Niro Electric 2021|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Niro Electric 2022|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Niro Electric 2022|All|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|
|Kia|Niro Hybrid 2021|Smart Cruise Control (SCC) & LKAS|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)| |Kia|Niro Hybrid 2021|Smart Cruise Control (SCC) & LKAS|[![star](assets/icon-star-empty.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|[![star](assets/icon-star-full.svg)](##)|

@ -107,6 +107,10 @@ FINGERPRINTS = {
}], }],
CAR.JEEP_CHEROKEE: [{ CAR.JEEP_CHEROKEE: [{
55: 8, 168: 8, 181: 8, 256: 4, 257: 5, 258: 8, 264: 8, 268: 8, 272: 6, 273: 6, 274: 2, 280: 8, 284: 8, 288: 7, 290: 6, 292: 8, 300: 8, 308: 8, 320: 8, 324: 8, 331: 8, 332: 8, 344: 8, 352: 8, 362: 8, 368: 8, 376: 3, 384: 8, 388: 4, 416: 7, 448: 6, 456: 4, 464: 8, 500: 8, 501: 8, 512: 8, 514: 8, 520: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 4, 564: 4, 571: 3, 579: 8, 584: 8, 608: 8, 618: 8, 624: 8, 625: 8, 632: 8, 639: 8, 656: 4, 658: 6, 660: 8, 671: 8, 672: 8, 676: 8, 678: 8, 680: 8, 683: 8, 684: 8, 703: 8, 705: 8, 706: 8, 709: 8, 710: 8, 719: 8, 720: 6, 729: 5, 736: 8, 737: 8, 738: 8, 746: 5, 752: 2, 754: 8, 760: 8, 761: 8, 764: 8, 766: 8, 773: 8, 776: 8, 779: 8, 782: 8, 783: 8, 784: 8, 785: 8, 788: 3, 792: 8, 799: 8, 800: 8, 804: 8, 806: 2, 808: 8, 810: 8, 816: 8, 817: 8, 820: 8, 825: 2, 826: 8, 831: 6, 832: 8, 838: 2, 840: 8, 844: 5, 847: 1, 848: 8, 853: 8, 856: 4, 860: 6, 863: 8, 874: 2, 882: 8, 897: 8, 906: 8, 924: 8, 937: 8, 938: 8, 939: 8, 940: 8, 941: 8, 942: 8, 943: 8, 947: 8, 948: 8, 956: 8, 968: 8, 969: 4, 970: 8, 973: 8, 974: 5, 975: 8, 976: 8, 977: 4, 979: 8, 980: 8, 981: 8, 982: 8, 983: 8, 984: 8, 992: 8, 993: 7, 995: 8, 996: 8, 1000: 8, 1001: 8, 1002: 8, 1003: 8, 1008: 8, 1009: 8, 1010: 8, 1011: 8, 1012: 8, 1013: 8, 1014: 8, 1015: 8, 1024: 8, 1025: 8, 1026: 8, 1031: 8, 1033: 8, 1050: 8, 1059: 8, 1062: 8, 1098: 8, 1100: 8, 1543: 8, 1562: 8, 2015: 8, 2016: 8, 2017: 8, 2024: 8, 2025: 8 55: 8, 168: 8, 181: 8, 256: 4, 257: 5, 258: 8, 264: 8, 268: 8, 272: 6, 273: 6, 274: 2, 280: 8, 284: 8, 288: 7, 290: 6, 292: 8, 300: 8, 308: 8, 320: 8, 324: 8, 331: 8, 332: 8, 344: 8, 352: 8, 362: 8, 368: 8, 376: 3, 384: 8, 388: 4, 416: 7, 448: 6, 456: 4, 464: 8, 500: 8, 501: 8, 512: 8, 514: 8, 520: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 4, 564: 4, 571: 3, 579: 8, 584: 8, 608: 8, 618: 8, 624: 8, 625: 8, 632: 8, 639: 8, 656: 4, 658: 6, 660: 8, 671: 8, 672: 8, 676: 8, 678: 8, 680: 8, 683: 8, 684: 8, 703: 8, 705: 8, 706: 8, 709: 8, 710: 8, 719: 8, 720: 6, 729: 5, 736: 8, 737: 8, 738: 8, 746: 5, 752: 2, 754: 8, 760: 8, 761: 8, 764: 8, 766: 8, 773: 8, 776: 8, 779: 8, 782: 8, 783: 8, 784: 8, 785: 8, 788: 3, 792: 8, 799: 8, 800: 8, 804: 8, 806: 2, 808: 8, 810: 8, 816: 8, 817: 8, 820: 8, 825: 2, 826: 8, 831: 6, 832: 8, 838: 2, 840: 8, 844: 5, 847: 1, 848: 8, 853: 8, 856: 4, 860: 6, 863: 8, 874: 2, 882: 8, 897: 8, 906: 8, 924: 8, 937: 8, 938: 8, 939: 8, 940: 8, 941: 8, 942: 8, 943: 8, 947: 8, 948: 8, 956: 8, 968: 8, 969: 4, 970: 8, 973: 8, 974: 5, 975: 8, 976: 8, 977: 4, 979: 8, 980: 8, 981: 8, 982: 8, 983: 8, 984: 8, 992: 8, 993: 7, 995: 8, 996: 8, 1000: 8, 1001: 8, 1002: 8, 1003: 8, 1008: 8, 1009: 8, 1010: 8, 1011: 8, 1012: 8, 1013: 8, 1014: 8, 1015: 8, 1024: 8, 1025: 8, 1026: 8, 1031: 8, 1033: 8, 1050: 8, 1059: 8, 1062: 8, 1098: 8, 1100: 8, 1543: 8, 1562: 8, 2015: 8, 2016: 8, 2017: 8, 2024: 8, 2025: 8
},
# Based on c88f65eeaee4003a|2022-08-04--15-37-16
{
257: 5, 258: 8, 264: 8, 268: 8, 274: 2, 280: 8, 284: 8, 288: 7, 290: 6, 292: 8, 300: 8, 308: 8, 320: 8, 324: 8, 331: 8, 332: 8, 344: 8, 352: 8, 362: 8, 368: 8, 376: 3, 384: 8, 388: 4, 416: 7, 448: 6, 456: 4, 464: 8, 500: 8, 501: 8, 512: 8, 514: 8, 520: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 4, 564: 4, 571: 3, 584: 8, 608: 8, 624: 8, 625: 8, 632: 8, 639: 8, 658: 6, 660: 8, 671: 8, 672: 8, 678: 8, 680: 8, 684: 8, 703: 8, 705: 8, 706: 8, 709: 8, 710: 8, 719: 8, 720: 6, 729: 5, 736: 8, 737: 8, 746: 5, 752: 2, 760: 8, 761: 8, 764: 8, 766: 8, 773: 8, 776: 8, 779: 8, 783: 8, 784: 8, 792: 8, 799: 8, 800: 8, 804: 8, 806: 2, 810: 8, 816: 8, 817: 8, 820: 8, 825: 2, 826: 8, 831: 6, 832: 8, 838: 2, 844: 5, 848: 8, 853: 8, 856: 4, 860: 6, 863: 8, 882: 8, 897: 8, 924: 3, 937: 8, 947: 8, 948: 8, 969: 4, 974: 5, 977: 4, 979: 8, 980: 8, 981: 8, 982: 8, 983: 8, 984: 8, 992: 8, 993: 7, 995: 8, 996: 8, 1000: 8, 1001: 8, 1002: 8, 1003: 8, 1008: 8, 1009: 8, 1010: 8, 1011: 8, 1012: 8, 1013: 8, 1014: 8, 1015: 8, 1024: 8, 1025: 8, 1026: 8, 1031: 8, 1033: 8, 1050: 8, 1059: 8, 1062: 8, 1098: 8, 1100: 8, 1216: 8, 1218: 8, 1220: 8, 1223: 8, 1235: 8, 1242: 8, 1252: 8, 1792: 8, 1798: 8, 1799: 8, 1810: 8, 1813: 8, 1824: 8, 1825: 8, 1840: 8, 1856: 8, 1858: 8, 1859: 8, 1860: 8, 1862: 8, 1863: 8, 1872: 8, 1875: 8, 1879: 8, 1882: 8, 1888: 8, 1892: 8, 1927: 8, 1937: 8, 1953: 8, 1968: 8, 1988: 8, 2000: 8, 2001: 8, 2004: 8, 2015: 8, 2016: 8, 2017: 8, 2024: 8, 2025: 8
}], }],
CAR.JEEP_CHEROKEE_2019: [{ CAR.JEEP_CHEROKEE_2019: [{
# Jeep Grand Cherokee 2019, including most 2020 models # Jeep Grand Cherokee 2019, including most 2020 models

@ -12,7 +12,7 @@ class CarState(CarStateBase):
def __init__(self, CP): def __init__(self, CP):
super().__init__(CP) super().__init__(CP)
can_define = CANDefine(DBC[CP.carFingerprint]["pt"]) can_define = CANDefine(DBC[CP.carFingerprint]["pt"])
self.shifter_values = can_define.dv["ECMPRDNL"]["PRNDL"] self.shifter_values = can_define.dv["ECMPRDNL2"]["PRNDL2"]
self.lka_steering_cmd_counter = 0 self.lka_steering_cmd_counter = 0
def update(self, pt_cp, loopback_cp): def update(self, pt_cp, loopback_cp):
@ -30,7 +30,11 @@ class CarState(CarStateBase):
ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr]) ret.vEgoRaw = mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr])
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw) ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
ret.standstill = ret.vEgoRaw < 0.01 ret.standstill = ret.vEgoRaw < 0.01
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["ECMPRDNL"]["PRNDL"], None))
if pt_cp.vl["ECMPRDNL2"]["ManualMode"] == 1:
ret.gearShifter = self.parse_gear_shifter("T")
else:
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["ECMPRDNL2"]["PRNDL2"], None))
# Brake pedal's potentiometer returns near-zero reading even when pedal is not pressed. # Brake pedal's potentiometer returns near-zero reading even when pedal is not pressed.
ret.brake = pt_cp.vl["EBCMBrakePedalPosition"]["BrakePedalPosition"] / 0xd0 ret.brake = pt_cp.vl["EBCMBrakePedalPosition"]["BrakePedalPosition"] / 0xd0
@ -97,7 +101,8 @@ class CarState(CarStateBase):
("FRWheelSpd", "EBCMWheelSpdFront"), ("FRWheelSpd", "EBCMWheelSpdFront"),
("RLWheelSpd", "EBCMWheelSpdRear"), ("RLWheelSpd", "EBCMWheelSpdRear"),
("RRWheelSpd", "EBCMWheelSpdRear"), ("RRWheelSpd", "EBCMWheelSpdRear"),
("PRNDL", "ECMPRDNL"), ("PRNDL2", "ECMPRDNL2"),
("ManualMode", "ECMPRDNL2"),
("LKADriverAppldTrq", "PSCMStatus"), ("LKADriverAppldTrq", "PSCMStatus"),
("LKATorqueDelivered", "PSCMStatus"), ("LKATorqueDelivered", "PSCMStatus"),
("LKATorqueDeliveredStatus", "PSCMStatus"), ("LKATorqueDeliveredStatus", "PSCMStatus"),
@ -108,7 +113,7 @@ class CarState(CarStateBase):
checks = [ checks = [
("BCMTurnSignals", 1), ("BCMTurnSignals", 1),
("ECMPRDNL", 10), ("ECMPRDNL2", 10),
("PSCMStatus", 10), ("PSCMStatus", 10),
("ESPStatus", 10), ("ESPStatus", 10),
("BCMDoorBeltStatus", 10), ("BCMDoorBeltStatus", 10),

@ -9,6 +9,7 @@ from selfdrive.car.interfaces import CarInterfaceBase
ButtonType = car.CarState.ButtonEvent.Type ButtonType = car.CarState.ButtonEvent.Type
EventName = car.CarEvent.EventName EventName = car.CarEvent.EventName
GearShifter = car.CarState.GearShifter
TransmissionType = car.CarParams.TransmissionType TransmissionType = car.CarParams.TransmissionType
NetworkLocation = car.CarParams.NetworkLocation NetworkLocation = car.CarParams.NetworkLocation
BUTTONS_DICT = {CruiseButtons.RES_ACCEL: ButtonType.accelCruise, CruiseButtons.DECEL_SET: ButtonType.decelCruise, BUTTONS_DICT = {CruiseButtons.RES_ACCEL: ButtonType.accelCruise, CruiseButtons.DECEL_SET: ButtonType.decelCruise,
@ -166,7 +167,9 @@ class CarInterface(CarInterfaceBase):
ret.buttonEvents = [be] ret.buttonEvents = [be]
events = self.create_common_events(ret, pcm_enable=self.CP.pcmCruise) events = self.create_common_events(ret, extra_gears=[GearShifter.sport, GearShifter.low,
GearShifter.eco, GearShifter.manumatic],
pcm_enable=self.CP.pcmCruise)
if ret.vEgo < self.CP.minEnableSpeed: if ret.vEgo < self.CP.minEnableSpeed:
events.add(EventName.belowEngageSpeed) events.add(EventName.belowEngageSpeed)

@ -141,7 +141,8 @@ CAR_INFO: Dict[str, Optional[Union[HyundaiCarInfo, List[HyundaiCarInfo]]]] = {
], ],
CAR.KIA_K5_2021: HyundaiCarInfo("Kia K5 2021-22", "Smart Cruise Control (SCC)", harness=Harness.hyundai_a), CAR.KIA_K5_2021: HyundaiCarInfo("Kia K5 2021-22", "Smart Cruise Control (SCC)", harness=Harness.hyundai_a),
CAR.KIA_NIRO_EV: [ CAR.KIA_NIRO_EV: [
HyundaiCarInfo("Kia Niro Electric 2019-20", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_f), HyundaiCarInfo("Kia Niro Electric 2019", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_h),
HyundaiCarInfo("Kia Niro Electric 2020", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_f),
HyundaiCarInfo("Kia Niro Electric 2021", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_c), HyundaiCarInfo("Kia Niro Electric 2021", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_c),
HyundaiCarInfo("Kia Niro Electric 2022", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_h), HyundaiCarInfo("Kia Niro Electric 2022", "All", video_link="https://www.youtube.com/watch?v=lT7zcG6ZpGo", harness=Harness.hyundai_h),
], ],
@ -742,6 +743,7 @@ FW_VERSIONS = {
b'\xf1\x00LX ESC \x0b 104 \x10\x16 58910-S8360', b'\xf1\x00LX ESC \x0b 104 \x10\x16 58910-S8360',
b'\xf1\x00ON ESC \x0b 100\x18\x12\x18 58910-S9360', b'\xf1\x00ON ESC \x0b 100\x18\x12\x18 58910-S9360',
b'\xf1\x00ON ESC \x0b 101\x19\t\x08 58910-S9360', b'\xf1\x00ON ESC \x0b 101\x19\t\x08 58910-S9360',
b'\xf1\x00ON ESC \x0b 101\x19\t\x05 58910-S9320',
], ],
(Ecu.engine, 0x7e0, None): [ (Ecu.engine, 0x7e0, None): [
b'\xf1\x81640J0051\x00\x00\x00\x00\x00\x00\x00\x00', b'\xf1\x81640J0051\x00\x00\x00\x00\x00\x00\x00\x00',
@ -812,6 +814,7 @@ FW_VERSIONS = {
b'\xf1\x87LDMVBN899222KF37\xa8\x88x\x87\x97www\x98\x99\x99\x89\x88\x99\x98\x89f\x88\x96hdo\xf7\xff\xbb\xaa\x9f\xff\xe2U\xf1\x81U922\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U922\x00\x00\x00\x00\x00\x00SLX4G38NB5\xb9\x94\xe8\x89', b'\xf1\x87LDMVBN899222KF37\xa8\x88x\x87\x97www\x98\x99\x99\x89\x88\x99\x98\x89f\x88\x96hdo\xf7\xff\xbb\xaa\x9f\xff\xe2U\xf1\x81U922\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U922\x00\x00\x00\x00\x00\x00SLX4G38NB5\xb9\x94\xe8\x89',
b"\xf1\x87LBLUFN622950KF36\xa8\x88\x88\x88\x87w\x87xh\x99\x96\x89\x88\x99\x98\x89\x88\x99\x98\x89\x87o\xf6\xff\x98\x88o\xffx'\xf1\x81U891\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U891\x00\x00\x00\x00\x00\x00SLX2G38NB3\xd1\xc3\xf8\xa8", b"\xf1\x87LBLUFN622950KF36\xa8\x88\x88\x88\x87w\x87xh\x99\x96\x89\x88\x99\x98\x89\x88\x99\x98\x89\x87o\xf6\xff\x98\x88o\xffx'\xf1\x81U891\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U891\x00\x00\x00\x00\x00\x00SLX2G38NB3\xd1\xc3\xf8\xa8",
b'\xf1\x87LDMVBN950669KF37\x97www\x96fffy\x99\xa7\x99\xa9\x99\xaa\x99g\x88\x96x\xb8\x8f\xf9\xffTD/\xff\xa7\xcb\xf1\x81U922\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U922\x00\x00\x00\x00\x00\x00SLX4G38NB5\xb9\x94\xe8\x89', b'\xf1\x87LDMVBN950669KF37\x97www\x96fffy\x99\xa7\x99\xa9\x99\xaa\x99g\x88\x96x\xb8\x8f\xf9\xffTD/\xff\xa7\xcb\xf1\x81U922\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U922\x00\x00\x00\x00\x00\x00SLX4G38NB5\xb9\x94\xe8\x89',
b'\xf1\x87LDLVAA4478824HH1\x87wwwvfvg\x89\x99\xa8\x99w\x88\x87x\x89\x99\xa8\x99\xa6o\xfa\xfffU/\xffu\x92\xf1\x81U903\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U903\x00\x00\x00\x00\x00\x00TON4G38NB2[v\\\xb6',
], ],
}, },
CAR.VELOSTER: { CAR.VELOSTER: {

@ -61,6 +61,7 @@ class CarInterfaceBase(ABC):
self.steering_unpressed = 0 self.steering_unpressed = 0
self.low_speed_alert = False self.low_speed_alert = False
self.silent_steer_warning = True self.silent_steer_warning = True
self.v_ego_cluster_seen = False
self.CS = None self.CS = None
self.can_parsers = [] self.can_parsers = []
@ -162,8 +163,10 @@ class CarInterfaceBase(ABC):
ret.canValid = all(cp.can_valid for cp in self.can_parsers if cp is not None) ret.canValid = all(cp.can_valid for cp in self.can_parsers if cp is not None)
ret.canTimeout = any(cp.bus_timeout for cp in self.can_parsers if cp is not None) ret.canTimeout = any(cp.bus_timeout for cp in self.can_parsers if cp is not None)
if ret.vEgoCluster == 0.0: if ret.vEgoCluster == 0.0 and not self.v_ego_cluster_seen:
ret.vEgoCluster = ret.vEgo ret.vEgoCluster = ret.vEgo
else:
self.v_ego_cluster_seen = True
if ret.cruiseState.speedCluster == 0: if ret.cruiseState.speedCluster == 0:
ret.cruiseState.speedCluster = ret.cruiseState.speed ret.cruiseState.speedCluster = ret.cruiseState.speed

@ -1 +1 @@
df0ce74929dd6b5fa7a55224baefeff4bac6d785 5c2cb8fb9787584a1eb553968cb87e7e6782dac5

@ -1 +1 @@
6d9bd0e80ccdf39827bded1883adbc922224bdf1 82d3f0a3bfe07a76983e7e4603a0553d077ba15b

@ -193,7 +193,13 @@ void NvgWindow::updateState(const UIState &s) {
} }
// Handle older routes where vEgoCluster is not set // Handle older routes where vEgoCluster is not set
float v_ego = sm["carState"].getCarState().getVEgoCluster() == 0.0 ? sm["carState"].getCarState().getVEgo() : sm["carState"].getCarState().getVEgoCluster(); float v_ego;
if (sm["carState"].getCarState().getVEgoCluster() == 0.0 && !v_ego_cluster_seen) {
v_ego = sm["carState"].getCarState().getVEgo();
} else {
v_ego = sm["carState"].getCarState().getVEgoCluster();
v_ego_cluster_seen = true;
}
float cur_speed = cs_alive ? std::max<float>(0.0, v_ego) : 0.0; float cur_speed = cs_alive ? std::max<float>(0.0, v_ego) : 0.0;
cur_speed *= s.scene.is_metric ? MS_TO_KPH : MS_TO_MPH; cur_speed *= s.scene.is_metric ? MS_TO_KPH : MS_TO_MPH;

@ -66,6 +66,7 @@ private:
bool rightHandDM = false; bool rightHandDM = false;
bool has_us_speed_limit = false; bool has_us_speed_limit = false;
bool has_eu_speed_limit = false; bool has_eu_speed_limit = false;
bool v_ego_cluster_seen = false;
int status = STATUS_DISENGAGED; int status = STATUS_DISENGAGED;
protected: protected:

@ -490,30 +490,30 @@ location set</source>
<context> <context>
<name>NvgWindow</name> <name>NvgWindow</name>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>km/h</source> <source>km/h</source>
<translation>km/h</translation> <translation>km/h</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>mph</source> <source>mph</source>
<translation>mph</translation> <translation>mph</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="280"/> <location filename="../qt/onroad.cc" line="286"/>
<location filename="../qt/onroad.cc" line="283"/> <location filename="../qt/onroad.cc" line="289"/>
<source>MAX</source> <source>MAX</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="327"/> <location filename="../qt/onroad.cc" line="333"/>
<location filename="../qt/onroad.cc" line="330"/> <location filename="../qt/onroad.cc" line="336"/>
<source>SPEED</source> <source>SPEED</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="333"/> <location filename="../qt/onroad.cc" line="339"/>
<location filename="../qt/onroad.cc" line="336"/> <location filename="../qt/onroad.cc" line="342"/>
<source>LIMIT</source> <source>LIMIT</source>
<translation></translation> <translation></translation>
</message> </message>

@ -490,30 +490,30 @@ location set</source>
<context> <context>
<name>NvgWindow</name> <name>NvgWindow</name>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>km/h</source> <source>km/h</source>
<translation>km/h</translation> <translation>km/h</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>mph</source> <source>mph</source>
<translation>mph</translation> <translation>mph</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="280"/> <location filename="../qt/onroad.cc" line="286"/>
<location filename="../qt/onroad.cc" line="283"/> <location filename="../qt/onroad.cc" line="289"/>
<source>MAX</source> <source>MAX</source>
<translation>MAX</translation> <translation>MAX</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="327"/> <location filename="../qt/onroad.cc" line="333"/>
<location filename="../qt/onroad.cc" line="330"/> <location filename="../qt/onroad.cc" line="336"/>
<source>SPEED</source> <source>SPEED</source>
<translation>SPEED</translation> <translation>SPEED</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="333"/> <location filename="../qt/onroad.cc" line="339"/>
<location filename="../qt/onroad.cc" line="336"/> <location filename="../qt/onroad.cc" line="342"/>
<source>LIMIT</source> <source>LIMIT</source>
<translation>LIMIT</translation> <translation>LIMIT</translation>
</message> </message>

@ -488,30 +488,30 @@ location set</source>
<context> <context>
<name>NvgWindow</name> <name>NvgWindow</name>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>km/h</source> <source>km/h</source>
<translation>km/h</translation> <translation>km/h</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>mph</source> <source>mph</source>
<translation>mph</translation> <translation>mph</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="280"/> <location filename="../qt/onroad.cc" line="286"/>
<location filename="../qt/onroad.cc" line="283"/> <location filename="../qt/onroad.cc" line="289"/>
<source>MAX</source> <source>MAX</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="327"/> <location filename="../qt/onroad.cc" line="333"/>
<location filename="../qt/onroad.cc" line="330"/> <location filename="../qt/onroad.cc" line="336"/>
<source>SPEED</source> <source>SPEED</source>
<translation>SPEED</translation> <translation>SPEED</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="333"/> <location filename="../qt/onroad.cc" line="339"/>
<location filename="../qt/onroad.cc" line="336"/> <location filename="../qt/onroad.cc" line="342"/>
<source>LIMIT</source> <source>LIMIT</source>
<translation>LIMIT</translation> <translation>LIMIT</translation>
</message> </message>

@ -490,30 +490,30 @@ location set</source>
<context> <context>
<name>NvgWindow</name> <name>NvgWindow</name>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>km/h</source> <source>km/h</source>
<translation>km/h</translation> <translation>km/h</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="212"/> <location filename="../qt/onroad.cc" line="218"/>
<source>mph</source> <source>mph</source>
<translation>mph</translation> <translation>mph</translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="280"/> <location filename="../qt/onroad.cc" line="286"/>
<location filename="../qt/onroad.cc" line="283"/> <location filename="../qt/onroad.cc" line="289"/>
<source>MAX</source> <source>MAX</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="327"/> <location filename="../qt/onroad.cc" line="333"/>
<location filename="../qt/onroad.cc" line="330"/> <location filename="../qt/onroad.cc" line="336"/>
<source>SPEED</source> <source>SPEED</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../qt/onroad.cc" line="333"/> <location filename="../qt/onroad.cc" line="339"/>
<location filename="../qt/onroad.cc" line="336"/> <location filename="../qt/onroad.cc" line="342"/>
<source>LIMIT</source> <source>LIMIT</source>
<translation></translation> <translation></translation>
</message> </message>

@ -37,6 +37,9 @@ class TestPowerDraw(unittest.TestCase):
HARDWARE.initialize_hardware() HARDWARE.initialize_hardware()
HARDWARE.set_power_save(False) HARDWARE.set_power_save(False)
# wait a bit for power save to disable
time.sleep(5)
def tearDown(self): def tearDown(self):
manager_cleanup() manager_cleanup()

@ -6,7 +6,7 @@
```bash ```bash
# Log in via browser to have access to non-public routes # Log in via browser to have access to non-public routes
python lib/auth.py python tools/lib/auth.py
# Start a replay # Start a replay
tools/replay/replay <route-name> tools/replay/replay <route-name>
@ -24,6 +24,7 @@ python replay/ui.py
``` ```
## usage ## usage
``` bash ``` bash
$ tools/replay/replay -h $ tools/replay/replay -h
Usage: tools/replay/replay [options] route Usage: tools/replay/replay [options] route

Loading…
Cancel
Save