From ed03d6960473cb1a5956ca6bc695e232226bab07 Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Tue, 12 Nov 2019 11:00:19 +1000 Subject: [PATCH] add dragon_is_eon param --- common/params.py | 1 + selfdrive/dragonpilot/dragonconf/__init__.py | 1 + selfdrive/thermald.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/params.py b/common/params.py index f23afa1dc..15e3eb0da 100755 --- a/common/params.py +++ b/common/params.py @@ -147,6 +147,7 @@ keys = { "DragonEnableSlowOnCurve": [TxType.PERSISTENT], "DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT], "DragonToyotaSnGMod": [TxType.PERSISTENT], + "DragonIsEON": [TxType.PERSISTENT], } diff --git a/selfdrive/dragonpilot/dragonconf/__init__.py b/selfdrive/dragonpilot/dragonconf/__init__.py index b55f1f35e..67383f762 100644 --- a/selfdrive/dragonpilot/dragonconf/__init__.py +++ b/selfdrive/dragonpilot/dragonconf/__init__.py @@ -54,6 +54,7 @@ default_conf = { 'DragonEnableSlowOnCurve': '1', 'DragonEnableLeadCarMovingAlert': '0', 'DragonToyotaSnGMod': '0', + 'DragonIsEON': '1', } deprecated_conf = { diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index 23d1fa0d0..a9d693862 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -166,6 +166,7 @@ def thermald_thread(): dragon_charging_max = int(params.get('DragonCharging')) dragon_discharging_min = int(params.get('DragonDisCharging')) charging_disabled = False + dragon_is_eon = False if params.get('DragonIsEON', encoding='utf8') == "0" else True while 1: health = messaging.recv_sock(health_sock, wait=True) @@ -217,7 +218,7 @@ def thermald_thread(): max_comp_temp = max(max_cpu_temp, msg.thermal.mem / 10., msg.thermal.gpu / 10.) bat_temp = msg.thermal.bat/1000. - if health is not None and health.health.hwType == log.HealthData.HwType.uno: + if not dragon_is_eon and (health is not None and health.health.hwType == log.HealthData.HwType.uno): fan_speed = handle_fan_uno(max_cpu_temp, bat_temp, fan_speed) else: fan_speed = handle_fan_eon(max_cpu_temp, bat_temp, fan_speed)