Skip to content

Commit

Permalink
frontend: add 'soc' option when looking for temperature source
Browse files Browse the repository at this point in the history
  • Loading branch information
Williangalvani authored and patrickelectric committed Nov 16, 2024
1 parent 1dd3bf0 commit 966731f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/frontend/src/components/health/HealthTrayMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ export default Vue.extend({
computed: {
cpu_temperature(): string {
const temperature_sensors = system_information.system?.temperature
const main_sensor = temperature_sensors?.find((sensor) => sensor.name.toLowerCase().includes('cpu'))
const main_sensor = temperature_sensors?.find(
(sensor) => sensor.name.toLowerCase().includes('cpu') || sensor.name.toLowerCase().includes('soc'),
)
return main_sensor ? main_sensor.temperature.toFixed(1) : 'Loading..'
},
cpu_throttled() : boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export default Vue.extend({
},
temperature(): Record<string, unknown> {
const temperature_sensors = system_information.system?.temperature
const main_sensor = temperature_sensors?.find((sensor) => sensor.name.toLowerCase().includes('cpu'))
const main_sensor = temperature_sensors?.find((
sensor,
) => sensor.name.toLowerCase().includes('cpu') || sensor.name.toLowerCase().includes('soc'))
const main_temperature = main_sensor?.temperature.toFixed(1) ?? 'Loading..'
console.log(`main_temperature: ${main_temperature}`)
const temperature_text = temperature_sensors?.map(
Expand Down

0 comments on commit 966731f

Please sign in to comment.