diff --git a/selfdrive/thermald/thermald.py b/selfdrive/thermald/thermald.py index 9256d0345a..bcd3f18883 100755 --- a/selfdrive/thermald/thermald.py +++ b/selfdrive/thermald/thermald.py @@ -21,7 +21,7 @@ from selfdrive.loggerd.config import get_available_percent from selfdrive.pandad import get_expected_signature from selfdrive.swaglog import cloudlog from selfdrive.thermald.power_monitoring import PowerMonitoring -from selfdrive.version import get_git_branch, terms_version, training_version +from selfdrive.version import tested_branch, terms_version, training_version FW_SIGNATURE = get_expected_signature() @@ -151,7 +151,6 @@ def thermald_thread(): started_seen = False thermal_status = ThermalStatus.green usb_power = True - current_branch = get_git_branch() network_type = NetworkType.none network_strength = NetworkStrength.unknown @@ -333,7 +332,7 @@ def thermald_thread(): last_update_exception = params.get("LastUpdateException", encoding='utf8') if update_failed_count > 15 and last_update_exception is not None: - if current_branch in ["release2", "dashcam"]: + if tested_branch: extra_text = "Ensure the software is correctly installed" else: extra_text = last_update_exception diff --git a/selfdrive/version.py b/selfdrive/version.py index 4289d5ca93..d721ba61e3 100644 --- a/selfdrive/version.py +++ b/selfdrive/version.py @@ -7,6 +7,9 @@ from common.basedir import BASEDIR from selfdrive.swaglog import cloudlog +TESTED_BRANCHES = ['devel', 'release2-staging', 'release3-staging', 'dashcam-staging', 'release2', 'release3', 'dashcam'] + + def run_cmd(cmd: List[str]) -> str: return subprocess.check_output(cmd, encoding='utf8').strip() @@ -60,7 +63,7 @@ commit = get_git_commit() if (origin is not None) and (branch is not None): try: comma_remote = origin.startswith('git@github.com:commaai') or origin.startswith('https://github.com/commaai') - tested_branch = get_git_branch() in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam'] + tested_branch = get_git_branch() in TESTED_BRANCHES dirty = False