mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
The old GPIO abstraction was replaced with [`diozero`](https://www.diozero.com), which supports most hardware running Linux due to its use of GPIO character devices provided by the Linux kernel. `diozero` also supports [alternate providers](https://www.diozero.com/concepts/providers.html#providers) if for some reason the character device API is insufficient. Certain capabilities outside of the character device API is also implemented for common hardware. Custom GPIO commands are implemented via a custom `diozero` provider. The configuration for custom GPIO will need manually updated according to the Hardware Config documentation page. The status LED class was also reworked to support additional statuses or LED indication types, although none have been added yet. This was tested on a RPi 5 with LL3 illumination LEDs and an RGB status led attached. All capabilities worked as expected. All 8 status LED colors were tested and functional via modifying the code. Basic functionality of custom GPIO was tested with dummy commands.
20 lines
609 B
JSON
20 lines
609 B
JSON
{
|
|
"deviceName": "PhotonVision",
|
|
"deviceLogoPath": "photonvision.png",
|
|
"supportURL": "https://support.photonvision.com",
|
|
"ledPins" : [2, 13],
|
|
"statusRGBPins" : [-1, -1, -1],
|
|
"ledsCanDim" : true,
|
|
"getGPIOCommand": "cat /tmp/GPIO{p}",
|
|
"setGPIOCommand": "echo {s} > /tmp/GPIO{p}",
|
|
"setPWMCommand": "echo {v} > /tmp/GPIO{p}",
|
|
"releaseGPIOCommand": "rm /tmp/GPIO{p}",
|
|
"cpuTempCommand" : "echo 10",
|
|
"cpuMemoryCommand" : "echo 10",
|
|
"cpuUtilCommand" : "echo 10",
|
|
"gpuMemoryCommand" : "echo 10",
|
|
"ramUtilCommand" : "echo 10",
|
|
"restartHardwareCommand" : "echo 10",
|
|
"vendorFOV" : 40.0
|
|
}
|