mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-22 00:23:48 +08:00
Merge remote-tracking branch 'upstream/master' into palisade-2023-port-1
This commit is contained in:
+1
-1
Submodule cereal updated: b88523f05a...42f84fd85d
+1
-1
@@ -183,7 +183,7 @@ A supported vehicle is one that just works when you install a comma three. All s
|
||||
|Toyota|C-HR Hybrid 2017-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=C-HR Hybrid 2017-20">Toyota</a>||
|
||||
|Toyota|C-HR Hybrid 2021-22|All|Stock|0 mph|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=C-HR Hybrid 2021-22">Toyota</a>||
|
||||
|Toyota|Camry 2018-20|All|Stock|0 mph[<sup>6</sup>](#footnotes)|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Camry 2018-20">Toyota</a>|<a href="https://www.youtube.com/watch?v=fkcjviZY9CM" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>|
|
||||
|Toyota|Camry 2021-22|All|openpilot|0 mph[<sup>6</sup>](#footnotes)|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Camry 2021-22">Toyota</a>||
|
||||
|Toyota|Camry 2021-23|All|openpilot|0 mph[<sup>6</sup>](#footnotes)|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Camry 2021-23">Toyota</a>||
|
||||
|Toyota|Camry Hybrid 2018-20|All|Stock|0 mph|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Camry Hybrid 2018-20">Toyota</a>|<a href="https://www.youtube.com/watch?v=Q2DYY0AWKgk" target="_blank"><img height="18px" src="assets/icon-youtube.svg"></img></a>|
|
||||
|Toyota|Camry Hybrid 2021-23|All|openpilot|0 mph|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Camry Hybrid 2021-23">Toyota</a>||
|
||||
|Toyota|Corolla 2017-19|All|openpilot available[<sup>2</sup>](#footnotes)|19 mph|0 mph|[](##)|[](##)|<a href="https://comma.ai/shop/comma-three.html?make=Toyota&model=Corolla 2017-19">Toyota</a>||
|
||||
|
||||
+1
-1
Submodule laika_repo updated: 278b44ba8c...b740b71c82
@@ -135,7 +135,7 @@ FINGERPRINTS = {
|
||||
}],
|
||||
CAR.JEEP_CHEROKEE_2019: [{
|
||||
# Jeep Grand Cherokee 2019, including most 2020 models
|
||||
55: 8, 168: 8, 179: 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, 341: 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, 530: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 8, 564: 8, 571: 3, 579: 8, 584: 8, 608: 8, 618: 8, 624: 8, 625: 8, 632: 8, 639: 8, 640: 1, 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, 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, 960: 4, 968: 8, 969: 4, 970: 8, 973: 8, 974: 5, 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, 1216: 8, 1218: 8, 1220: 8, 1223: 8, 1225: 8, 1227: 8, 1235: 8, 1242: 8, 1250: 8, 1251: 8, 1252: 8, 1254: 8, 1264: 8, 1284: 8, 1536: 8, 1537: 8, 1543: 8, 1545: 8, 1562: 8, 1568: 8, 1570: 8, 1572: 8, 1593: 8, 1856: 8, 1858: 8, 1860: 8, 1863: 8, 1865: 8, 1867: 8, 1875: 8, 1882: 8, 1890: 8, 1891: 8, 1892: 8, 1894: 8, 1896: 8, 1904: 8, 2015: 8, 2016: 8, 2017: 8, 2024: 8, 2025: 8
|
||||
55: 8, 168: 8, 179: 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, 341: 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, 530: 8, 532: 8, 544: 8, 557: 8, 559: 8, 560: 8, 564: 8, 571: 3, 579: 8, 584: 8, 608: 8, 618: 8, 624: 8, 625: 8, 632: 8, 639: 8, 640: 1, 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, 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, 960: 4, 968: 8, 969: 4, 970: 8, 973: 8, 974: 5, 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, 1216: 8, 1218: 8, 1220: 8, 1223: 8, 1225: 8, 1227: 8, 1235: 8, 1242: 8, 1250: 8, 1251: 8, 1252: 8, 1254: 8, 1264: 8, 1284: 8, 1536: 8, 1537: 8, 1538: 8, 1543: 8, 1545: 8, 1562: 8, 1568: 8, 1570: 8, 1572: 8, 1593: 8, 1856: 8, 1858: 8, 1860: 8, 1863: 8, 1865: 8, 1867: 8, 1875: 8, 1882: 8, 1890: 8, 1891: 8, 1892: 8, 1894: 8, 1896: 8, 1904: 8, 2015: 8, 2016: 8, 2017: 8, 2024: 8, 2025: 8
|
||||
}],
|
||||
}
|
||||
|
||||
|
||||
@@ -368,10 +368,12 @@ FW_VERSIONS = {
|
||||
b'57114-TWA-A050\x00\x00',
|
||||
b'57114-TWA-A530\x00\x00',
|
||||
b'57114-TWA-B520\x00\x00',
|
||||
b'57114-TWB-H030\x00\x00',
|
||||
],
|
||||
(Ecu.srs, 0x18da53f1, None): [
|
||||
b'77959-TWA-A440\x00\x00',
|
||||
b'77959-TWA-L420\x00\x00',
|
||||
b'77959-TWB-H220\x00\x00',
|
||||
],
|
||||
(Ecu.combinationMeter, 0x18da60f1, None): [
|
||||
b'78109-TWA-A010\x00\x00',
|
||||
@@ -385,6 +387,7 @@ FW_VERSIONS = {
|
||||
b'78109-TWA-A230\x00\x00',
|
||||
b'78109-TWA-L010\x00\x00',
|
||||
b'78109-TWA-L210\x00\x00',
|
||||
b'78109-TWA-H210\x00\x00',
|
||||
],
|
||||
(Ecu.shiftByWire, 0x18da0bf1, None): [
|
||||
b'54008-TWA-A910\x00\x00',
|
||||
@@ -396,16 +399,19 @@ FW_VERSIONS = {
|
||||
(Ecu.fwdCamera, 0x18dab5f1, None): [
|
||||
b'36161-TWA-A070\x00\x00',
|
||||
b'36161-TWA-A330\x00\x00',
|
||||
b'36161-TWB-H040\x00\x00',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x18dab0f1, None): [
|
||||
b'36802-TWA-A070\x00\x00',
|
||||
b'36802-TWA-A080\x00\x00',
|
||||
b'36802-TWA-A330\x00\x00',
|
||||
b'36802-TWB-H060\x00\x00',
|
||||
],
|
||||
(Ecu.eps, 0x18da30f1, None): [
|
||||
b'39990-TVA-A160\x00\x00',
|
||||
b'39990-TVA-A150\x00\x00',
|
||||
b'39990-TVA-A340\x00\x00',
|
||||
b'39990-TWB-H120\x00\x00',
|
||||
],
|
||||
},
|
||||
CAR.CIVIC: {
|
||||
|
||||
@@ -523,7 +523,6 @@ FW_VERSIONS = {
|
||||
b'\xf1\x00DN8_ SCC FHCUP 1.00 1.01 99110-L1000 ',
|
||||
b'\xf1\x00DN89110-L0000 \xaa\xaa\xaa\xaa\xaa\xaa\xaa ',
|
||||
b'\xf1\x8799110L0000\xf1\x00DN8_ SCC F-CUP 1.00 1.00 99110-L0000 ',
|
||||
b'\xf1\x8799110L0000\xf1\x00DN8_ SCC FHCUP 1.00 1.00 99110-L0000 ',
|
||||
],
|
||||
(Ecu.abs, 0x7d1, None): [
|
||||
b'\xf1\x00DN ESC \x07 106 \x07\x01 58910-L0100',
|
||||
@@ -536,7 +535,6 @@ FW_VERSIONS = {
|
||||
b'\xf1\x8758910-L0100\xf1\x00DN ESC \x06 104\x19\x08\x01 58910-L0100',
|
||||
b'\xf1\x8758910-L0100\xf1\x00DN ESC \x06 106 \x07\x01 58910-L0100',
|
||||
b'\xf1\x8758910-L0100\xf1\x00DN ESC \x07 104\x19\x08\x01 58910-L0100',
|
||||
b'\xf1\x8758910-L0300\xf1\x00DN ESC \x03 100 \x08\x01 58910-L0300',
|
||||
b'\xf1\x00DN ESC \x06 106 \x07\x01 58910-L0100',
|
||||
],
|
||||
(Ecu.engine, 0x7e0, None): [
|
||||
@@ -598,6 +596,7 @@ FW_VERSIONS = {
|
||||
b'\xf1\x00HT6WA280BLHT6WAD10A1SDN8G25NB4\x00\x00\x00\x00\x00\x00g!l[',
|
||||
b'\xf1\x00T02601BL T02730A1 VDN8T25XXX730NS5\xf7_\x92\xf5',
|
||||
b'\xf1\x00T02601BL T02832A1 VDN8T25XXX832NS8G\x0e\xfeE',
|
||||
b'\xf1\x00T02601BL T02900A1 VDN8T25XXX900NSCF\xe4!Y',
|
||||
b'\xf1\x87954A02N060\x00\x00\x00\x00\x00\xf1\x81T02730A1 \xf1\x00T02601BL T02730A1 VDN8T25XXX730NS5\xf7_\x92\xf5',
|
||||
b'\xf1\x87SAKFBA2926554GJ2VefVww\x87xwwwww\x88\x87xww\x87wTo\xfb\xffvUo\xff\x8d\x16\xf1\x81U903\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U903\x00\x00\x00\x00\x00\x00SDN8T16NB0z{\xd4v',
|
||||
b'\xf1\x87SAKFBA3030524GJ2UVugww\x97yx\x88\x87\x88vw\x87gww\x87wto\xf9\xfffUo\xff\xa2\x0c\xf1\x81U903\x00\x00\x00\x00\x00\x00\xf1\x00bcsh8p54 U903\x00\x00\x00\x00\x00\x00SDN8T16NB0z{\xd4v',
|
||||
@@ -1577,6 +1576,7 @@ FW_VERSIONS = {
|
||||
b'\xf1\x00NE1 MFC AT EUR RHD 1.00 1.01 99211-GI010 211007',
|
||||
b'\xf1\x00NE1 MFC AT USA LHD 1.00 1.01 99211-GI010 211007',
|
||||
b'\xf1\x00NE1 MFC AT EUR RHD 1.00 1.02 99211-GI010 211206',
|
||||
b'\xf1\x00NE1 MFC AT USA LHD 1.00 1.03 99211-GI010 220401',
|
||||
],
|
||||
},
|
||||
CAR.TUCSON_4TH_GEN: {
|
||||
|
||||
@@ -115,7 +115,7 @@ CAR_INFO: Dict[str, Union[ToyotaCarInfo, List[ToyotaCarInfo]]] = {
|
||||
CAR.AVALONH_TSS2: ToyotaCarInfo("Toyota Avalon Hybrid 2022"),
|
||||
CAR.CAMRY: ToyotaCarInfo("Toyota Camry 2018-20", video_link="https://www.youtube.com/watch?v=fkcjviZY9CM", footnotes=[Footnote.CAMRY]),
|
||||
CAR.CAMRYH: ToyotaCarInfo("Toyota Camry Hybrid 2018-20", video_link="https://www.youtube.com/watch?v=Q2DYY0AWKgk"),
|
||||
CAR.CAMRY_TSS2: ToyotaCarInfo("Toyota Camry 2021-22", footnotes=[Footnote.CAMRY]),
|
||||
CAR.CAMRY_TSS2: ToyotaCarInfo("Toyota Camry 2021-23", footnotes=[Footnote.CAMRY]),
|
||||
CAR.CAMRYH_TSS2: ToyotaCarInfo("Toyota Camry Hybrid 2021-23"),
|
||||
CAR.CHR: ToyotaCarInfo("Toyota C-HR 2017-20"),
|
||||
CAR.CHR_TSS2: ToyotaCarInfo("Toyota C-HR 2021"),
|
||||
|
||||
@@ -739,12 +739,14 @@ FW_VERSIONS = {
|
||||
b'\xf1\x8783A907115B \xf1\x890005',
|
||||
b'\xf1\x8783A907115F \xf1\x890002',
|
||||
b'\xf1\x8783A907115G \xf1\x890001',
|
||||
b'\xf1\x8783A907115K \xf1\x890001',
|
||||
],
|
||||
(Ecu.transmission, 0x7e1, None): [
|
||||
b'\xf1\x8709G927158DT\xf1\x893698',
|
||||
b'\xf1\x8709G927158FM\xf1\x893757',
|
||||
b'\xf1\x8709G927158GC\xf1\x893821',
|
||||
b'\xf1\x8709G927158GD\xf1\x893820',
|
||||
b'\xf1\x8709G927158GM\xf1\x893936',
|
||||
b'\xf1\x870D9300043 \xf1\x895202',
|
||||
b'\xf1\x870DL300011N \xf1\x892001',
|
||||
b'\xf1\x870DL300011N \xf1\x892012',
|
||||
@@ -775,6 +777,7 @@ FW_VERSIONS = {
|
||||
b'\xf1\x875QM909144B \xf1\x891081\xf1\x82\x0521A60604A1',
|
||||
b'\xf1\x875QM909144C \xf1\x891082\xf1\x82\x0521A60604A1',
|
||||
b'\xf1\x875QM909144C \xf1\x891082\xf1\x82\00521A60804A1',
|
||||
b'\xf1\x875QM907144D \xf1\x891063\xf1\x82\x002SA6092SOM',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x757, None): [
|
||||
b'\xf1\x872Q0907572AA\xf1\x890396',
|
||||
@@ -1049,6 +1052,7 @@ FW_VERSIONS = {
|
||||
(Ecu.engine, 0x7e0, None): [
|
||||
b'\xf1\x8704E906027DD\xf1\x893123',
|
||||
b'\xf1\x8704L906026DE\xf1\x895418',
|
||||
b'\xf1\x8704L906026HT\xf1\x893617',
|
||||
b'\xf1\x875NA907115E \xf1\x890003',
|
||||
b'\xf1\x875NA907115E \xf1\x890005',
|
||||
],
|
||||
@@ -1060,17 +1064,20 @@ FW_VERSIONS = {
|
||||
],
|
||||
(Ecu.srs, 0x715, None): [
|
||||
b'\xf1\x873Q0959655BJ\xf1\x890703\xf1\x82\x0e1213001211001205212111052100',
|
||||
b'\xf1\x873Q0959655BK\xf1\x890703\xf1\x82\x0e1213001211001244212111442100',
|
||||
b'\xf1\x873Q0959655CN\xf1\x890720\xf1\x82\x0e1213001211001205212112052100',
|
||||
b'\xf1\x873Q0959655CQ\xf1\x890720\xf1\x82\x0e1213111211001205212112052111',
|
||||
],
|
||||
(Ecu.eps, 0x712, None): [
|
||||
b'\xf1\x875Q0909143P \xf1\x892051\xf1\x820527T6050405',
|
||||
b'\xf1\x875Q0909143P \xf1\x892051\xf1\x820527T6060405',
|
||||
b'\xf1\x875Q0909143P \xf1\x892051\xf1\x820527T6070405',
|
||||
b'\xf1\x875Q0910143C \xf1\x892211\xf1\x82\x0567T600G600',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x757, None): [
|
||||
b'\xf1\x872Q0907572Q \xf1\x890342',
|
||||
b'\xf1\x872Q0907572R \xf1\x890372',
|
||||
b'\xf1\x872Q0907572AA\xf1\x890396',
|
||||
],
|
||||
},
|
||||
CAR.SKODA_OCTAVIA_MK3: {
|
||||
@@ -1140,6 +1147,7 @@ FW_VERSIONS = {
|
||||
b'\xf1\x8704L906026FP\xf1\x891196',
|
||||
b'\xf1\x8704L906026KB\xf1\x894071',
|
||||
b'\xf1\x8704L906026KD\xf1\x894798',
|
||||
b'\xf1\x873G0906259 \xf1\x890004',
|
||||
b'\xf1\x873G0906259B \xf1\x890002',
|
||||
b'\xf1\x873G0906264A \xf1\x890002',
|
||||
],
|
||||
@@ -1149,12 +1157,14 @@ FW_VERSIONS = {
|
||||
b'\xf1\x870D9300012 \xf1\x894940',
|
||||
b'\xf1\x870D9300041H \xf1\x894905',
|
||||
b'\xf1\x870GC300043 \xf1\x892301',
|
||||
b'\xf1\x870D9300043F \xf1\x895202',
|
||||
],
|
||||
(Ecu.srs, 0x715, None): [
|
||||
b'\xf1\x875Q0959655AE\xf1\x890130\xf1\x82\x12111200111121001121110012211292221111',
|
||||
b'\xf1\x875Q0959655AE\xf1\x890130\xf1\x82\022111200111121001121118112231292221111',
|
||||
b'\xf1\x875Q0959655AK\xf1\x890130\xf1\x82\022111200111121001121110012211292221111',
|
||||
b'\xf1\x875Q0959655BH\xf1\x890336\xf1\x82\02331310031313100313131013141319331413100',
|
||||
b'\xf1\x875Q0959655CA\xf1\x890403\xf1\x82\x1331310031313100313151013141319331423100',
|
||||
],
|
||||
(Ecu.eps, 0x712, None): [
|
||||
b'\xf1\x875Q0909143K \xf1\x892033\xf1\x820514UZ070203',
|
||||
|
||||
@@ -122,8 +122,9 @@ class LongitudinalPlanner:
|
||||
self.mpc.update(sm['radarState'], v_cruise, x, v, a, j)
|
||||
|
||||
self.v_desired_trajectory_full = np.interp(T_IDXS, T_IDXS_MPC, self.mpc.v_solution)
|
||||
self.a_desired_trajectory_full = np.interp(T_IDXS, T_IDXS_MPC, self.mpc.a_solution)
|
||||
self.v_desired_trajectory = self.v_desired_trajectory_full[:CONTROL_N]
|
||||
self.a_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC, self.mpc.a_solution)
|
||||
self.a_desired_trajectory = self.a_desired_trajectory_full[:CONTROL_N]
|
||||
self.j_desired_trajectory = np.interp(T_IDXS[:CONTROL_N], T_IDXS_MPC[:-1], self.mpc.j_solution)
|
||||
|
||||
# TODO counter is only needed because radar is glitchy, remove once radar is gone
|
||||
|
||||
@@ -22,6 +22,7 @@ def publish_ui_plan(sm, pm, lateral_planner, longitudinal_planner):
|
||||
uiPlan.position.x = np.interp(plan_odo, model_odo, lateral_planner.lat_mpc.x_sol[:,0]).tolist()
|
||||
uiPlan.position.y = np.interp(plan_odo, model_odo, lateral_planner.lat_mpc.x_sol[:,1]).tolist()
|
||||
uiPlan.position.z = np.interp(plan_odo, model_odo, lateral_planner.path_xyz[:,2]).tolist()
|
||||
uiPlan.accel = longitudinal_planner.a_desired_trajectory_full.tolist()
|
||||
pm.send('uiPlan', ui_send)
|
||||
|
||||
def plannerd_thread(sm=None, pm=None):
|
||||
|
||||
@@ -74,7 +74,7 @@ if __name__ == "__main__":
|
||||
|
||||
elif msg.which() == "carParams":
|
||||
CP = msg.carParams
|
||||
car_fw = CP.carFw
|
||||
car_fw = [fw for fw in CP.carFw if not fw.logging]
|
||||
if len(car_fw) == 0:
|
||||
print("no fw")
|
||||
break
|
||||
|
||||
@@ -97,19 +97,25 @@ class Laikad:
|
||||
|
||||
def get_lsq_fix(self, t, measurements):
|
||||
if self.last_fix_t is None or abs(self.last_fix_t - t) > 0:
|
||||
min_measurements = 7 if any(p.constellation_id == ConstellationId.GLONASS for p in measurements) else 6
|
||||
position_solution, pr_residuals = calc_pos_fix(measurements, self.posfix_functions, min_measurements=min_measurements)
|
||||
min_measurements = 5 if any(p.constellation_id == ConstellationId.GLONASS for p in measurements) else 4
|
||||
position_solution, pr_residuals, pos_std = calc_pos_fix(measurements, self.posfix_functions, min_measurements=min_measurements)
|
||||
if len(position_solution) < 3:
|
||||
return None
|
||||
position_estimate = position_solution[:3]
|
||||
#TODO median abs residual is decent estimate of std, can be improved with measurements stds and/or DOP
|
||||
position_std = np.median(np.abs(pr_residuals)) * np.ones(3)
|
||||
velocity_solution, prr_residuals = calc_vel_fix(measurements, position_estimate, self.velfix_function, min_measurements=min_measurements)
|
||||
|
||||
position_std_residual = np.median(np.abs(pr_residuals))
|
||||
position_std = np.median(np.abs(pos_std))/10
|
||||
position_std = max(position_std_residual, position_std) * np.ones(3)
|
||||
|
||||
velocity_solution, prr_residuals, vel_std = calc_vel_fix(measurements, position_estimate, self.velfix_function, min_measurements=min_measurements)
|
||||
if len(velocity_solution) < 3:
|
||||
return None
|
||||
|
||||
velocity_estimate = velocity_solution[:3]
|
||||
velocity_std = np.median(np.abs(prr_residuals)) * np.ones(3)
|
||||
|
||||
velocity_std_residual = np.median(np.abs(prr_residuals))
|
||||
velocity_std = np.median(np.abs(vel_std))/10
|
||||
velocity_std = max(velocity_std, velocity_std_residual) * np.ones(3)
|
||||
|
||||
return position_estimate, position_std, velocity_estimate, velocity_std
|
||||
|
||||
def is_good_report(self, gnss_msg):
|
||||
@@ -187,10 +193,10 @@ class Laikad:
|
||||
elif self.is_good_report(gnss_msg):
|
||||
|
||||
week, tow, new_meas = self.read_report(gnss_msg)
|
||||
self.gps_week = week
|
||||
if len(new_meas) == 0:
|
||||
return None
|
||||
|
||||
self.gps_week = week
|
||||
t = gnss_mono_time * 1e-9
|
||||
if week > 0:
|
||||
self.got_first_gnss_msg = True
|
||||
|
||||
@@ -160,7 +160,7 @@ class TestLaikad(unittest.TestCase):
|
||||
laikad = Laikad(auto_update=True, valid_ephem_types=EphemerisType.ULTRA_RAPID_ORBIT)
|
||||
correct_msgs = verify_messages(self.logs, laikad)
|
||||
|
||||
correct_msgs_expected = 554
|
||||
correct_msgs_expected = 559
|
||||
self.assertEqual(correct_msgs_expected, len(correct_msgs))
|
||||
self.assertEqual(correct_msgs_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
|
||||
|
||||
@@ -180,7 +180,7 @@ class TestLaikad(unittest.TestCase):
|
||||
laikad = Laikad(auto_update=True, valid_ephem_types=EphemerisType.NAV)
|
||||
# Disable fetch_orbits to test NAV only
|
||||
correct_msgs = verify_messages(self.logs, laikad)
|
||||
correct_msgs_expected = 554
|
||||
correct_msgs_expected = 559
|
||||
self.assertEqual(correct_msgs_expected, len(correct_msgs))
|
||||
self.assertEqual(correct_msgs_expected, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
|
||||
|
||||
@@ -195,8 +195,8 @@ class TestLaikad(unittest.TestCase):
|
||||
downloader_mock.side_effect = DownloadFailed
|
||||
laikad = Laikad(auto_update=False)
|
||||
correct_msgs = verify_messages(self.logs, laikad)
|
||||
self.assertEqual(0, len(correct_msgs))
|
||||
self.assertEqual(0, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
|
||||
self.assertEqual(255, len(correct_msgs))
|
||||
self.assertEqual(255, len([m for m in correct_msgs if m.gnssMeasurements.positionECEF.valid]))
|
||||
|
||||
def test_laika_get_orbits(self):
|
||||
laikad = Laikad(auto_update=False)
|
||||
@@ -282,7 +282,7 @@ class TestLaikad(unittest.TestCase):
|
||||
gm = msg.gnssMeasurements
|
||||
if len(gm.correctedMeasurements) != 0 and gm.positionECEF.valid:
|
||||
cnt += 1
|
||||
self.assertEqual(cnt, 554)
|
||||
self.assertEqual(cnt, 559)
|
||||
|
||||
def dict_has_values(self, dct):
|
||||
self.assertGreater(len(dct), 0)
|
||||
|
||||
@@ -36,7 +36,7 @@ def manager_init() -> None:
|
||||
|
||||
default_params: List[Tuple[str, Union[str, bytes]]] = [
|
||||
("CompletedTrainingVersion", "0"),
|
||||
("DisengageOnAccelerator", "1"),
|
||||
("DisengageOnAccelerator", "0"),
|
||||
("GsmMetered", "1"),
|
||||
("HasAcceptedTerms", "0"),
|
||||
("LanguageSetting", "main_en"),
|
||||
|
||||
@@ -1 +1 @@
|
||||
772f30de36fc7f8421dabb779cc02f45eb83d7bb
|
||||
f9c7e05b836c4bff364978752e82d64b90f9d6e6
|
||||
|
||||
@@ -573,7 +573,10 @@ void AnnotatedCameraWidget::drawDriverState(QPainter &painter, const UIState *s)
|
||||
const int arc_l = 133;
|
||||
const float arc_t_default = 6.7;
|
||||
const float arc_t_extend = 12.0;
|
||||
QColor arc_color = QColor::fromRgbF(0.09, 0.945, 0.26, 0.4*(1.0-dm_fade_state)*(s->engaged()));
|
||||
QColor arc_color = QColor::fromRgbF(0.545 - 0.445 * s->engaged(),
|
||||
0.545 + 0.4 * s->engaged(),
|
||||
0.545 - 0.285 * s->engaged(),
|
||||
0.4 * (1.0 - dm_fade_state));
|
||||
float delta_x = -scene.driver_pose_sins[1] * arc_l / 2;
|
||||
float delta_y = -scene.driver_pose_sins[0] * arc_l / 2;
|
||||
painter.setPen(QPen(arc_color, arc_t_default+arc_t_extend*fmin(1.0, scene.driver_pose_diff[1] * 5.0), Qt::SolidLine, Qt::RoundCap));
|
||||
|
||||
@@ -311,18 +311,6 @@
|
||||
<source>Installing...</source>
|
||||
<translation>กำลังติดตั้ง...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Receiving objects: </source>
|
||||
<translation>กำลังรับข้อมูล: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Resolving deltas: </source>
|
||||
<translation>การแก้ไขเดลต้า: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Updating files: </source>
|
||||
<translation>กำลังอัปเดตไฟล์: </translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MapETA</name>
|
||||
@@ -586,18 +574,10 @@ location set</source>
|
||||
<source>Are you sure you want to reset your device?</source>
|
||||
<translation>คุณแน่ใจหรือไม่ว่าต้องการรีเซ็ตอุปกรณ์?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Resetting device...</source>
|
||||
<translation>กำลังรีเซ็ตอุปกรณ์...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>System Reset</source>
|
||||
<translation>รีเซ็ตระบบ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>System reset triggered. Press confirm to erase all content and settings. Press cancel to resume boot.</source>
|
||||
<translation>มีการสั่งรีเซ็ตระบบ กดยืนยันเพื่อลบข้อมูลและการตั้งค่าทั้งหมด กดยกเลิกเพื่อบูตเข้าระบบตามปกติ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cancel</source>
|
||||
<translation>ยกเลิก</translation>
|
||||
@@ -611,8 +591,18 @@ location set</source>
|
||||
<translation>ยืนยัน</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to mount data partition. Press confirm to reset your device.</source>
|
||||
<translation>ไม่สามารถเมานต์พาร์ติชั่นข้อมูล กดยืนยันเพื่อรีเซ็ตอุปกรณ์ของคุณ</translation>
|
||||
<source>Resetting device...
|
||||
This may take up to a minute.</source>
|
||||
<translation>กำลังรีเซ็ตอุปกรณ์...
|
||||
อาจใช้เวลาถึงหนึ่งนาที</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Press confirm to erase all content and settings. Press cancel to resume boot.</source>
|
||||
<translation>กดยืนยันเพื่อลบข้อมูลและการตั้งค่าทั้งหมด กดยกเลิกเพื่อบูตต่อ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unable to mount data partition. Partition may be corrupted. Press confirm to erase and reset your device.</source>
|
||||
<translation>ไม่สามารถเมานต์พาร์ติชั่นข้อมูลได้ พาร์ติชั่นอาจเสียหาย กดยืนยันเพื่อลบและรีเซ็ตอุปกรณ์ของคุณ</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -684,18 +674,6 @@ location set</source>
|
||||
<source>Waiting for internet</source>
|
||||
<translation>กำลังรอสัญญาณอินเตอร์เน็ต</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose Software to Install</source>
|
||||
<translation>เลือกซอฟต์แวร์ที่จะติดตั้ง</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dashcam</source>
|
||||
<translation>กล้องติดรถยนต์</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Custom Software</source>
|
||||
<translation>ซอฟต์แวร์ที่กำหนดเอง</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Enter URL</source>
|
||||
<translation>ป้อน URL</translation>
|
||||
@@ -724,6 +702,14 @@ location set</source>
|
||||
<source>Start over</source>
|
||||
<translation>เริ่มต้นใหม่</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Something went wrong. Reboot the device.</source>
|
||||
<translation>มีบางอย่างผิดพลาด รีบูตอุปกรณ์</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>No custom software found at this URL.</source>
|
||||
<translation>ไม่พบซอฟต์แวร์ที่กำหนดเองที่ URL นี้</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SetupWidget</name>
|
||||
|
||||
@@ -591,11 +591,14 @@ void ChartView::updateAxisY() {
|
||||
if (it->y() > max) max = it->y();
|
||||
}
|
||||
}
|
||||
axis_y->setTitleText(unit);
|
||||
|
||||
if (min == std::numeric_limits<double>::max()) min = 0;
|
||||
if (max == std::numeric_limits<double>::lowest()) max = 0;
|
||||
|
||||
if (axis_y->titleText() != unit) {
|
||||
axis_y->setTitleText(unit);
|
||||
y_label_width = 0;// recalc width
|
||||
}
|
||||
|
||||
double delta = std::abs(max - min) < 1e-3 ? 1 : (max - min) * 0.05;
|
||||
auto [min_y, max_y, tick_count] = getNiceAxisNumbers(min - delta, max + delta, axis_y->tickCount());
|
||||
if (min_y != axis_y->min() || max_y != axis_y->max() || y_label_width == 0) {
|
||||
@@ -705,14 +708,16 @@ void ChartView::mouseMoveEvent(QMouseEvent *ev) {
|
||||
if (!s.series->isVisible()) continue;
|
||||
|
||||
// use reverse iterator to find last item <= sec.
|
||||
double value = 0;
|
||||
auto it = std::lower_bound(s.vals.rbegin(), s.vals.rend(), sec, [](auto &p, double x) { return p.x() > x; });
|
||||
if (it != s.vals.rend() && it->x() >= axis_x->min()) {
|
||||
value = it->y();
|
||||
s.track_pt = chart()->mapToPosition(*it);
|
||||
x = std::max(x, s.track_pt.x());
|
||||
}
|
||||
text_list.push_back(QString("<span style=\"color:%1;\">■ </span>%2: <b>%3</b>")
|
||||
.arg(s.series->color().name(), s.sig->name,
|
||||
s.track_pt.isNull() ? "--" : QString::number(s.track_pt.y())));
|
||||
s.track_pt.isNull() ? "--" : QString::number(value)));
|
||||
}
|
||||
if (x < 0) {
|
||||
x = ev->pos().x();
|
||||
@@ -776,7 +781,7 @@ void ChartView::drawForeground(QPainter *painter, const QRectF &rect) {
|
||||
painter->setPen(Qt::NoPen);
|
||||
qreal track_line_x = -1;
|
||||
for (auto &s : sigs) {
|
||||
if (!s.track_pt.isNull() && s.series->isVisible()) {
|
||||
if (!s.track_pt.isNull() && s.series->isVisible()) {
|
||||
painter->setBrush(s.series->color().darker(125));
|
||||
painter->drawEllipse(s.track_pt, 5.5, 5.5);
|
||||
track_line_x = std::max(track_line_x, s.track_pt.x());
|
||||
|
||||
@@ -194,6 +194,8 @@ void MainWindow::createStatusBar() {
|
||||
void MainWindow::createShortcuts() {
|
||||
auto shortcut = new QShortcut(QKeySequence(Qt::Key_Space), this, nullptr, nullptr, Qt::ApplicationShortcut);
|
||||
QObject::connect(shortcut, &QShortcut::activated, []() { can->pause(!can->isPaused()); });
|
||||
shortcut = new QShortcut(QKeySequence(QKeySequence::FullScreen), this, nullptr, nullptr, Qt::ApplicationShortcut);
|
||||
QObject::connect(shortcut, &QShortcut::activated, this, &MainWindow::toggleFullScreen);
|
||||
// TODO: add more shortcuts here.
|
||||
}
|
||||
|
||||
@@ -482,6 +484,19 @@ void MainWindow::onlineHelp() {
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::toggleFullScreen() {
|
||||
if (isFullScreen()) {
|
||||
menuBar()->show();
|
||||
statusBar()->show();
|
||||
showNormal();
|
||||
showMaximized();
|
||||
} else {
|
||||
menuBar()->hide();
|
||||
statusBar()->hide();
|
||||
showFullScreen();
|
||||
}
|
||||
}
|
||||
|
||||
// HelpOverlay
|
||||
HelpOverlay::HelpOverlay(MainWindow *parent) : QWidget(parent) {
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
|
||||
@@ -56,6 +56,7 @@ protected:
|
||||
void undoStackCleanChanged(bool clean);
|
||||
void undoStackIndexChanged(int index);
|
||||
void onlineHelp();
|
||||
void toggleFullScreen();
|
||||
void updateStatus();
|
||||
|
||||
VideoWidget *video_widget = nullptr;
|
||||
|
||||
@@ -165,7 +165,10 @@ void ConsoleUI::updateStatus() {
|
||||
sm.update(0);
|
||||
|
||||
if (status != Status::Paused) {
|
||||
status = (sm.updated("carState") || sm.updated("liveParameters")) ? Status::Playing : Status::Waiting;
|
||||
auto events = replay->events();
|
||||
uint64_t current_mono_time = replay->routeStartTime() + replay->currentSeconds() * 1e9;
|
||||
bool playing = !events->empty() && events->back()->mono_time > current_mono_time;
|
||||
status = playing ? Status::Playing : Status::Waiting;
|
||||
}
|
||||
auto [status_str, status_color] = status_text[status];
|
||||
write_item(0, 0, "STATUS: ", status_str, " ", false, status_color);
|
||||
|
||||
Reference in New Issue
Block a user