add exceptions. jinja is nice, but why are its loop indexes starting at 1?

pull/23762/head
Shane Smiskol 4 years ago
parent 262d2b61d4
commit 345ed233e4
  1. 15
      docs/CARS_generated.md
  2. 13
      docs/CARS_template.md
  3. 8
      docs/cars.py

@ -188,16 +188,13 @@ Tier Criteria:
|Volkswagen|Caravelle 2020<sup>6</sup>|Driver Assistance|<img src="assets/icon-star-empty.png" width="22" />|<img src="assets/icon-star-full.png" width="22" />|<img src="assets/icon-star-empty.png" width="22" />|<img src="assets/icon-star-full.png" width="22" />|<img src="assets/icon-star-full.png" width="22" />|
<sup>1</sup>When disconnecting the Driver Support Unit (DSU), openpilot ACC will replace stock ACC. ***NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).*** <br />
<sup>1</sup>When disconnecting the Driver Support Unit (DSU), openpilot Adaptive Cruise Control (ACC) will replace stock Adaptive Cruise Control (ACC). NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB). <br />
<sup>2</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>3</sup>When disabling the radar, openpilot ACC will replace stock ACC. ***NOTE: disabling the radar disables Automatic Emergency Braking (AEB).*** <br />
<sup>4</sup>Requires an [OBD-II car harness](https://comma.ai/shop/products/comma-car-harness) and [community built ASCM harness](https://github.com/commaai/openpilot/wiki/GM#hardware). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
<sup>5</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
<sup>6</sup>Not including the USA/China market Passat, which is based on the (currently) unsupported PQ35/NMS platform. <br />
<sup>7</sup>Model-years 2021 and beyond may have a new camera harness design, which isn't yet available from the comma store. Before ordering,
remove the Lane Assist camera cover and check to see if the connector is black (older design) or light brown (newer design). For the newer design,
in the interim, choose "VW J533 Development" from the vehicle drop-down for a harness that integrates at the CAN gateway inside the dashboard.<br />
Community Maintained Cars and Features are not verified by comma to meet our [safety model](SAFETY.md). Be extra cautious using them.
<sup>3</sup>Requires an [OBD-II](https://comma.ai/shop/products/comma-car-harness) car harness and [community built ASCM harness](https://github.com/commaai/openpilot/wiki/GM#hardware). NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB). <br />
<sup>4</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
<sup>5</sup>Not including the USA/China market Passat, which is based on the (currently) unsupported PQ35/NMS platform. <br />
<sup>6</sup>Model-years 2021 and beyond may have a new camera harness design, which isn't yet available from the comma store. Before ordering, remove the Lane Assist camera cover and check to see if the connector is black (older design) or light brown (newer design). For the newer design, in the interim, choose "VW J533 Development" from the vehicle drop-down for a harness that integrates at the CAN gateway inside the dashboard. <br />
<sup>7</sup>An inaccurate steering wheel angle sensor makes precise control difficult. <br />
## Community Maintained Cars
Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make [on our wiki](https://wiki.comma.ai/).

@ -27,16 +27,9 @@ Tier Criteria:
{% endfor %}
<sup>1</sup>When disconnecting the Driver Support Unit (DSU), openpilot ACC will replace stock ACC. ***NOTE: disconnecting the DSU disables Automatic Emergency Braking (AEB).*** <br />
<sup>2</sup>28mph for Camry 4CYL L, 4CYL LE and 4CYL SE which don't have Full-Speed Range Dynamic Radar Cruise Control. <br />
<sup>3</sup>When disabling the radar, openpilot ACC will replace stock ACC. ***NOTE: disabling the radar disables Automatic Emergency Braking (AEB).*** <br />
<sup>4</sup>Requires an [OBD-II car harness](https://comma.ai/shop/products/comma-car-harness) and [community built ASCM harness](https://github.com/commaai/openpilot/wiki/GM#hardware). ***NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).*** <br />
<sup>5</sup>Not including the China market Kamiq, which is based on the (currently) unsupported PQ34 platform. <br />
<sup>6</sup>Not including the USA/China market Passat, which is based on the (currently) unsupported PQ35/NMS platform. <br />
<sup>7</sup>Model-years 2021 and beyond may have a new camera harness design, which isn't yet available from the comma store. Before ordering,
remove the Lane Assist camera cover and check to see if the connector is black (older design) or light brown (newer design). For the newer design,
in the interim, choose "VW J533 Development" from the vehicle drop-down for a harness that integrates at the CAN gateway inside the dashboard.<br />
Community Maintained Cars and Features are not verified by comma to meet our [safety model](SAFETY.md). Be extra cautious using them.
{% for exception in exceptions %}
<sup>{{loop.index}}</sup>{{exception}} <br />
{% endfor %}
## Community Maintained Cars
Although they're not upstream, the community has openpilot running on other makes and models. See the 'Community Supported Models' section of each make [on our wiki](https://wiki.comma.ai/).

@ -138,8 +138,9 @@ class Car:
def get_tiered_cars():
# Keep track of cars sorted by make, model name, and year
# Keep track of cars while sorting by make, model name, and year
tiered_cars = {tier: SortedList(key=lambda car: car.make + car.model) for tier in Tier}
for _, models in get_interface_attr("CAR_INFO").items():
for model, car_info in models.items():
# Hyundai exception: all have openpilot longitudinal
@ -158,7 +159,7 @@ def get_tiered_cars():
car = Car(_car_info, CP)
tiered_cars[car.tier].add(car)
# Return tier name and car rows
# Return tier name and car rows for each tier
for tier, cars in tiered_cars.items():
yield [tier.name.title(), map(lambda car: car.row, cars)]
@ -168,7 +169,8 @@ def generate_cars_md(tiered_cars):
with open(template_fn, "r") as f:
template = jinja2.Template(f.read(), trim_blocks=True, lstrip_blocks=True) # TODO: remove lstrip_blocks if not needed
return template.render(tiers=tiered_cars, columns=[column.value for column in Column])
exceptions = [exception.text for exception in CAR_EXCEPTIONS]
return template.render(tiers=tiered_cars, columns=[column.value for column in Column], exceptions=exceptions)
if __name__ == "__main__":

Loading…
Cancel
Save