Auto-generate star descriptions

pull/24809/head
Shane Smiskol 3 years ago
parent 60aa553b8c
commit 5aae8bc6ab
  1. 27
      selfdrive/car/CARS_template.md
  2. 4
      selfdrive/car/docs.py
  3. 26
      selfdrive/car/docs_definitions.py

@ -14,28 +14,13 @@ Cars are organized into three tiers:
How We Rate The Cars
---
### openpilot Adaptive Cruise Control (ACC)
- {{star_icon.format(Star.FULL.value)}} - openpilot is able to control the gas and brakes.
- {{star_icon.format(Star.HALF.value)}} - openpilot is able to control the gas and brakes with some restrictions.
- {{star_icon.format(Star.EMPTY.value)}} - The gas and brakes are controlled by the car's stock Adaptive Cruise Control (ACC) system.
### Stop and Go
- {{star_icon.format(Star.FULL.value)}} - Adaptive Cruise Control (ACC) operates down to 0 mph.
- {{star_icon.format(Star.EMPTY.value)}} - Adaptive Cruise Control (ACC) available only above certain speeds. See your car's manual for the minimum speed.
### Steer to 0
- {{star_icon.format(Star.FULL.value)}} - openpilot can control the steering wheel down to 0 mph.
- {{star_icon.format(Star.EMPTY.value)}} - No steering control below certain speeds.
### Steering Torque
- {{star_icon.format(Star.FULL.value)}} - Car has enough steering torque to take tighter turns.
- {{star_icon.format(Star.HALF.value)}} - Car has enough steering torque for comfortable highway driving.
- {{star_icon.format(Star.EMPTY.value)}} - Limited ability to make turns.
### Actively Maintained
- {{star_icon.format(Star.FULL.value)}} - Mainline software support, harness hardware sold by comma, lots of users, primary development target.
- {{star_icon.format(Star.EMPTY.value)}} - Low user count, community maintained, harness hardware not sold by comma.
{% for name, stars in star_descriptions.items() %}
### {{name}}
{% for star, description in stars %}
- {{star_icon.format(star.value)}} - {{description}}
{% endfor %}
{% endfor %}
**All supported cars can move between the tiers as support changes.**
{% for tier, cars in tiers.items() %}

@ -7,7 +7,7 @@ from natsort import natsorted
from typing import Dict, List
from common.basedir import BASEDIR
from selfdrive.car.docs_definitions import CarInfo, Column, Star, Tier
from selfdrive.car.docs_definitions import STAR_DESCRIPTIONS, CarInfo, Column, Star, Tier
from selfdrive.car.car_helpers import interfaces, get_interface_attr
from selfdrive.car.hyundai.radar_interface import RADAR_START_ADDR as HKG_RADAR_START_ADDR
from selfdrive.car.tests.routes import non_tested_cars
@ -65,7 +65,7 @@ def generate_cars_md(all_car_info: List[CarInfo], template_fn: str) -> str:
footnotes = [fn.value.text for fn in ALL_FOOTNOTES]
cars_md: str = template.render(tiers=sort_by_tier(all_car_info), all_car_info=all_car_info,
footnotes=footnotes, Star=Star, Column=Column)
footnotes=footnotes, Star=Star, Column=Column, star_descriptions=STAR_DESCRIPTIONS)
return cars_md

@ -150,3 +150,29 @@ class Harness(Enum):
nissan_b = "Nissan B"
mazda = "Mazda"
none = "None"
STAR_DESCRIPTIONS = {
"openpilot Adaptive Cruise Control (ACC)": [
(Star.FULL, "openpilot is able to control the gas and brakes."),
(Star.HALF, "openpilot is able to control the gas and brakes with some restrictions."),
(Star.EMPTY, "The gas and brakes are controlled by the car's stock Adaptive Cruise Control (ACC) system."),
],
"Stop and Go": [
(Star.FULL, "Adaptive Cruise Control (ACC) operates down to 0 mph."),
(Star.EMPTY, "Adaptive Cruise Control (ACC) available only above certain speeds. See your car's manual for the minimum speed."),
],
"Steer to 0": [
(Star.FULL, "openpilot can control the steering wheel down to 0 mph."),
(Star.EMPTY, "No steering control below certain speeds."),
],
"Steering Torque": [
(Star.FULL, "Car has enough steering torque to take tighter turns."),
(Star.HALF, "Car has enough steering torque for comfortable highway driving."),
(Star.EMPTY, "Limited ability to make turns."),
],
"Actively Maintained": [
(Star.FULL, "Mainline software support, harness hardware sold by comma, lots of users, primary development target."),
(Star.EMPTY, "Low user count, community maintained, harness hardware not sold by comma."),
],
}

Loading…
Cancel
Save