Skip to content

Commit

Permalink
error-handling: Catch situation where Cockpit can't fetch CPU temp fr…
Browse files Browse the repository at this point in the history
…om BlueOS
  • Loading branch information
rafaellehmkuhl committed Nov 25, 2024
1 parent 8cde5dc commit a23d61e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/stores/mainVehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,12 @@ export const useMainVehicleStore = defineStore('main-vehicle', () => {
})

if (usedGenericVariables.value.includes(blueosVariablesAddresses.cpuTemp)) {
getCpuTempCelsius(globalAddress.value).then((temp) => {
try {
const temp = await getCpuTempCelsius(globalAddress.value)
Object.assign(genericVariables, { ...genericVariables, ...{ [blueosVariablesAddresses.cpuTemp]: temp } })
})
} catch (error) {
console.error(error)
}
}
}, 1000)

Expand Down

0 comments on commit a23d61e

Please sign in to comment.