54e6124925
version: sunnypilot v2026.001.000 (dev) date: 2026-05-07T23:07:19 master commit: c28eb958740187620f2282023b8f1997cf90f583
19 lines
556 B
Python
19 lines
556 B
Python
"""
|
|
Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors.
|
|
|
|
This file is part of sunnypilot and is licensed under the MIT License.
|
|
See the LICENSE.md file in the root directory for more details.
|
|
"""
|
|
|
|
|
|
def get_highlighted_description(params, param_name: str, descriptions: list[str]) -> str:
|
|
index = int(params.get(param_name, return_default=True))
|
|
lines = []
|
|
for i, desc in enumerate(descriptions):
|
|
if i == index:
|
|
lines.append(f"<b>{desc}</b>")
|
|
else:
|
|
lines.append(f"{desc}")
|
|
|
|
return "<br>".join(lines)
|