From 010bf934290fb5a371558796b7da250ba025467e Mon Sep 17 00:00:00 2001 From: sashwinbalaji Date: Fri, 19 Apr 2024 10:50:15 +0800 Subject: [PATCH] thermal: Add step ratio for IS_WLC Since vskin-wired and vskin-wlc equation are different and both control the same cooling device, add step ratio to ensure smooth transition when user switches charging mode. Bug: 331904373 Test: Push locally and verify thermal log Change-Id: Ibda3e8dfd87dbb0bd5d72adef3cead51f48e45af --- thermal/thermal_info_config_charge_comet.json | 13 ++++++++----- thermal/thermal_info_config_comet.json | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/thermal/thermal_info_config_charge_comet.json b/thermal/thermal_info_config_charge_comet.json index 8ab9979..88f9098 100644 --- a/thermal/thermal_info_config_charge_comet.json +++ b/thermal/thermal_info_config_charge_comet.json @@ -123,18 +123,21 @@ "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "COUNT_THRESHOLD", + "StepRatio": 0.2, "Combination": ["WLC_CHECK"], "Coefficient": [2], - "Multiplier": 1 + "Multiplier": 1, + "PassiveDelay": 7000 }, { "Name": "NO_WLC", "Type": "UNKNOWN", "Hidden": true, "VirtualSensor": true, - "Formula": "COUNT_THRESHOLD", - "Combination": ["WLC_CHECK"], - "Coefficient": [-2], + "Formula": "WEIGHTED_AVG", + "Combination": ["1", "IS_WLC"], + "CombinationType": ["CONSTANT", "SENSOR"], + "Coefficient": [1.0, -1.0], "Multiplier": 1 }, { @@ -231,7 +234,7 @@ "Version": "2.0", "VirtualSensor": true, "TriggerSensor": ["soc_therm", "rffe_therm", "charger_therm", "modem_therm", "gnss_tcxo_therm"], - "Formula": "MAXIMUM", + "Formula": "WEIGHTED_AVG", "Combination":["VIRTUAL-SKIN-CHARGE-WLC-EQ", "VIRTUAL-SKIN-CHARGE-WIRED-EQ"], "Coefficient":["IS_WLC", "NO_WLC"], "CoefficientType": ["SENSOR", "SENSOR"], diff --git a/thermal/thermal_info_config_comet.json b/thermal/thermal_info_config_comet.json index 290607c..143d4a8 100644 --- a/thermal/thermal_info_config_comet.json +++ b/thermal/thermal_info_config_comet.json @@ -709,18 +709,21 @@ "Type": "UNKNOWN", "VirtualSensor": true, "Formula": "COUNT_THRESHOLD", + "StepRatio": 0.2, "Combination": ["WLC_CHECK"], "Coefficient": [2], - "Multiplier": 1 + "Multiplier": 1, + "PassiveDelay": 7000 }, { "Name": "NO_WLC", "Type": "UNKNOWN", "Hidden": true, "VirtualSensor": true, - "Formula": "COUNT_THRESHOLD", - "Combination": ["WLC_CHECK"], - "Coefficient": [-2], + "Formula": "WEIGHTED_AVG", + "Combination": ["1", "IS_WLC"], + "CombinationType": ["CONSTANT", "SENSOR"], + "Coefficient": [1.0, -1.0], "Multiplier": 1 }, { @@ -817,7 +820,7 @@ "Version": "2.0", "VirtualSensor": true, "TriggerSensor": ["soc_therm", "rffe_therm", "charger_therm", "modem_therm", "gnss_tcxo_therm"], - "Formula": "MAXIMUM", + "Formula": "WEIGHTED_AVG", "Combination":["VIRTUAL-SKIN-CHARGE-WLC-EQ", "VIRTUAL-SKIN-CHARGE-WIRED-EQ"], "Coefficient":["IS_WLC", "NO_WLC"], "CoefficientType": ["SENSOR", "SENSOR"],