hocclk: better aotag

This commit is contained in:
souldbminersmwc
2026-05-02 22:05:15 -04:00
parent 5bf7fdf60e
commit 2f830bac53
10 changed files with 83 additions and 35 deletions

View File

@@ -34,7 +34,7 @@
#include "../soctherm.hpp"
#include "bq24193.hpp"
#include "../aotag.hpp"
#include "../config.hpp"
namespace board {
s32 GetTemperatureMilli(HocClkThermalSensor sensor) {
@@ -50,8 +50,7 @@ namespace board {
break;
}
case HocClkThermalSensor_PCB: {
millis = aotag::getTemp();
// = tmp451TempPcb();
millis = tmp451TempPcb();
break;
}
case HocClkThermalSensor_Skin: {
@@ -80,7 +79,11 @@ namespace board {
break;
}
case HocClkThermalSensor_MEM: {
millis = board::GetSocType() == HocClkSocType_Mariko ? temps.pllx : temps.mem;
if(board::GetSocType() == HocClkSocType_Mariko && aotag::isInitialized() && aotag::getTemp() > 0) {
millis = (temps.gpu * 0.45f) + (temps.pllx * 0.30f) + (temps.cpu * 0.15f) + (aotag::getTemp() * 0.10f) + 3000;
} else {
millis = board::GetSocType() == HocClkSocType_Mariko ? temps.pllx : temps.mem;
}
break;
}
case HocClkThermalSensor_PLLX: {
@@ -91,6 +94,10 @@ namespace board {
millis = bq24193::getBQTemp();
break;
}
case HocClkThermalSensor_AO: {
millis = aotag::getTemp();
break;
}
default: {
ASSERT_ENUM_VALID(HocClkThermalSensor, sensor);
}