Skip to content

Commit b024d79

Browse files
committed
Revert "simple compatibility sentence (#2912)"
This reverts commit 8953504.
1 parent 5eb7b76 commit b024d79

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

opendbc/car/docs_definitions.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,30 @@ def init_make(self, CP: CarParams):
348348

349349
def get_detail_sentence(self, CP):
350350
if not CP.notCar:
351-
sentence_builder = f"openpilot is compatible with <strong>{self.name}</strong>"
351+
sentence_builder = "openpilot upgrades your <strong>{car_model}</strong> with automated lane centering{alc} and adaptive cruise control{acc}."
352352

353-
if self.package != "All":
354-
sentence_builder += f" if it is equipped with <strong>{self.package}</strong>."
353+
if self.min_steer_speed > self.min_enable_speed:
354+
alc = f" <strong>above {self.min_steer_speed * CV.MS_TO_MPH:.0f} mph</strong>," if self.min_steer_speed > 0 else " <strong>at all speeds</strong>,"
355355
else:
356-
sentence_builder += "."
356+
alc = ""
357+
358+
# Exception for cars which do not auto-resume yet
359+
acc = ""
360+
if self.min_enable_speed > 0:
361+
acc = f" <strong>while driving above {self.min_enable_speed * CV.MS_TO_MPH:.0f} mph</strong>"
362+
elif self.auto_resume:
363+
acc = " <strong>that automatically resumes from a stop</strong>"
364+
365+
if self.row[Column.STEERING_TORQUE] != Star.FULL:
366+
sentence_builder += " This car may not be able to take tight turns on its own."
357367

358368
# experimental mode
359369
exp_link = "<a href='https://blog.comma.ai/090release/#experimental-mode' target='_blank' class='highlight'>Experimental mode</a>"
360370
if CP.openpilotLongitudinalControl and not CP.alphaLongitudinalAvailable:
361-
sentence_builder += f" Traffic light and stop sign handling is available with {exp_link}."
371+
sentence_builder += f" Traffic light and stop sign handling is also available in {exp_link}."
372+
373+
return sentence_builder.format(car_model=f"{self.make} {self.model}", alc=alc, acc=acc)
362374

363-
return sentence_builder
364375
else:
365376
if CP.carFingerprint == "COMMA_BODY":
366377
return "The body is a robotics dev kit that can run openpilot. <a href='https://www.commabody.com' target='_blank' class='highlight'>Learn more.</a>"

0 commit comments

Comments
 (0)