From 77457219c72dfa1891e7fc35e22d7d908d0f05ae Mon Sep 17 00:00:00 2001 From: Craig Schardt Date: Thu, 29 Jan 2026 23:40:09 -0600 Subject: [PATCH] Remove unused commands from the custom hardware configuration documentation (#2343) ## Description #2255 introduced a new, cross-platform method for monitoring hardware and removed the custom shell commands that had been used previously. This PR updates the documentation to reflect the removal of those commands from hardwareConfig.json. ## 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_, including events that led to this PR - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends) - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com> --- docs/source/docs/hardware/customhardware.md | 20 ++++--------------- .../configuration/SqlConfigProvider.java | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/docs/source/docs/hardware/customhardware.md b/docs/source/docs/hardware/customhardware.md index e4b94e06e..957a7dc75 100644 --- a/docs/source/docs/hardware/customhardware.md +++ b/docs/source/docs/hardware/customhardware.md @@ -73,27 +73,21 @@ If you were using custom LED commands from 2025 or earlier and still need custom ## Hardware Interaction Commands -For Non-Raspberry-Pi hardware, users must provide valid hardware-specific commands for some parts of the UI interaction (including performance metrics, and executing system restarts). +For non-Linux hardware, users must provide the hardware-specific command for executing system restarts. -Leaving a command blank will disable the associated functionality. +Leaving this command blank will disable the restart functionality. ```{eval-rst} .. tab-set-code:: .. code-block:: json { - "cpuTempCommand" : "", - "cpuMemoryCommand" : "", - "cpuUtilCommand" : "", - "gpuMemoryCommand" : "", - "gpuTempCommand" : "", - "ramUtilCommand" : "", "restartHardwareCommand" : "", } ``` :::{note} -These settings have no effect if PhotonVision detects it is running on a Raspberry Pi. See [the MetricsBase class](https://github.com/PhotonVision/photonvision/blob/dbd631da61b7c86b70fa6574c2565ad57d80a91a/photon-core/src/main/java/org/photonvision/common/hardware/metrics/MetricsBase.java) for the commands utilized. +This setting has no effect if PhotonVision detects it is running on Linux. On Linux, the restart is accomplished by executing `reboot now` in a shell. ::: ## Known Camera FOV @@ -150,13 +144,7 @@ Here is a complete example `hardwareConfig.json`: "setGPIOCommand" : "setGPIO {p} {s}", "setPWMCommand" : "setPWM {p} {v}", "setPWMFrequencyCommand" : "setPWMFrequency {p} {f}", - "releaseGPIOCommand" : "releseGPIO {p}", - "cpuTempCommand" : "", - "cpuMemoryCommand" : "", - "cpuUtilCommand" : "", - "gpuMemoryCommand" : "", - "gpuTempCommand" : "", - "ramUtilCommand" : "", + "releaseGPIOCommand" : "releaseGPIO {p}", "restartHardwareCommand" : "", "vendorFOV" : 72.5 } diff --git a/photon-core/src/main/java/org/photonvision/common/configuration/SqlConfigProvider.java b/photon-core/src/main/java/org/photonvision/common/configuration/SqlConfigProvider.java index 847405bd8..25fff4287 100644 --- a/photon-core/src/main/java/org/photonvision/common/configuration/SqlConfigProvider.java +++ b/photon-core/src/main/java/org/photonvision/common/configuration/SqlConfigProvider.java @@ -269,7 +269,7 @@ public class SqlConfigProvider extends ConfigProvider { } else { logger.debug("No " + ref.getSimpleName() + " in database"); } - // either the config entry is empty or Jackson threw and exception + // either the config entry is empty or Jackson threw an exception try { configObj = factory.get(); logger.info("Loaded default " + ref.getSimpleName());