thermal: Update vskin-speaker model

- Use dvt data to train the model
- Fall back to vskin-speaker-legacy:
	- if all samples not collected
	- if vskin-speaker-model temp < 20degC
	- if vskin-speaker-model temp >= 57degC
- Add timeResolution to avoid duplicate readings issue.

Bug: 343157242
Test: Push config and tflite model to verify lshal and logcat
Change-Id: I2140a92ae3b19825ec9542e3ec65a365bec2e66f
This commit is contained in:
sashwinbalaji 2024-05-28 20:45:10 +08:00
parent f29dae4163
commit 8d517a9b49
2 changed files with 37 additions and 5 deletions

View file

@ -899,7 +899,8 @@
"Combination": ["soc_therm", "rffe_therm", "charger_therm", "usb_conn_therm", "modem_therm", "inner_display_therm", "display_therm", "gnss_tcxo_therm", "maxfg_base", "maxfg_secondary", "inner_brightness"],
"Multiplier": 0.001,
"PreviousSampleCount": 3,
"SupportUnderSampling": true
"BackupSensor" : "VIRTUAL-SKIN-SPEAKER-LEGACY",
"TimeResolution": 7000
},
{
"Name": "VIRTUAL-SKIN-SPEAKER-MODEL-LEGACY-DIFF",
@ -911,15 +912,46 @@
"Coefficient": [1.0, -1.0],
"Multiplier": 1
},
{
"Name": "IS_VSKIN_SPEAKER_MODEL_WITHIN_RANGE_CHECK",
"Type": "UNKNOWN",
"Hidden": true,
"VirtualSensor": true,
"Formula":"COUNT_THRESHOLD",
"Combination":["VIRTUAL-SKIN-SPEAKER-MODEL", "VIRTUAL-SKIN-SPEAKER-MODEL"],
"Coefficient":[20000, -57000],
"Multiplier":1
},
{
"Name":"IS_VSKIN_SPEAKER_MODEL_WITHIN_RANGE",
"Type":"UNKNOWN",
"Hidden":true,
"VirtualSensor":true,
"Formula":"COUNT_THRESHOLD",
"Combination":["IS_VSKIN_SPEAKER_MODEL_WITHIN_RANGE_CHECK"],
"Coefficient":[2],
"Multiplier":1
},
{
"Name":"NO_VSKIN_SPEAKER_MODEL_WITHIN_RANGE",
"Type":"UNKNOWN",
"Hidden":true,
"VirtualSensor":true,
"Formula":"COUNT_THRESHOLD",
"Combination":["IS_VSKIN_SPEAKER_MODEL_WITHIN_RANGE_CHECK"],
"Coefficient":[-2],
"Multiplier":1
},
{
"Name": "VIRTUAL-SKIN-SPEAKER",
"Type": "UNKNOWN",
"Version": "1.0",
"Version": "2.0",
"VirtualSensor": true,
"TriggerSensor": "usb_conn_therm",
"Formula": "MAXIMUM",
"Combination": ["VIRTUAL-SKIN-SPEAKER-MODEL"],
"Coefficient": [1.0],
"Formula": "WEIGHTED_AVG",
"Combination": ["VIRTUAL-SKIN-SPEAKER-MODEL", "VIRTUAL-SKIN-SPEAKER-LEGACY"],
"Coefficient": ["IS_VSKIN_SPEAKER_MODEL_WITHIN_RANGE", "NO_VSKIN_SPEAKER_MODEL_WITHIN_RANGE"],
"CoefficientType": ["SENSOR", "SENSOR"],
"HotThreshold": ["NAN", 37.0, "NAN", "NAN", "NAN", "NAN", "NAN"],
"HotHysteresis": [0.0, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0],
"Multiplier": 0.001,