mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
## Description Monitoring CPU Temperature on Windows is challenging because most vendors don't publish this data to WMI. As a work-around, OSHI tries to use [LibreHardwareMonitor](https://github.com/LibreHardwareMonitor/LibreHardwareMonitor) via [jLibreHardwareMonitor](https://github.com/pandalxb/jLibreHardwareMonitor). If the temperature isn't found in WMI and jLibreHardwareMonitor isn't present, OSHI issues warnings every time `getCpuTemperature()` is called. This clogs the console with useless information when running on Windows and makes testing difficult. We could include jLibreHardwareMonitor as a dependency for our Windows jar, but LibreHardwareMonitor installs Winring0.sys, which is a kernel level driver with an unfixed severe vulnerability. Windows defender flags Winring0 as a vulnuratble driver and blocks it from installing. Rather than messing with it, this PR prevents Windows systems from calling the `getCpuTemperature()` method in OSHI. Fixes #2280 ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ --------- Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>