mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Drop deviceLogoPath and supportURL from HardwareConfig (#2389)
Removed the `deviceLogoPath` and `supportURL` fields from `HardwareConfig` due to low (no) usage, and updates the docs to reflect this.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"deviceName" : "Limelight 2+",
|
||||
"supportURL" : "https://limelightvision.io",
|
||||
"ledPins" : [ 13, 18 ],
|
||||
"ledsCanDim" : true,
|
||||
"ledPWMFrequency" : 1000,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"deviceName" : "Limelight 2",
|
||||
"supportURL" : "https://limelightvision.io",
|
||||
"ledPins" : [ 17, 18 ],
|
||||
"ledsCanDim" : false,
|
||||
"vendorFOV" : 75.76079874010732
|
||||
|
||||
@@ -103,9 +103,9 @@ If your hardware contains a camera with a known field of vision, it can be enter
|
||||
}
|
||||
```
|
||||
|
||||
## Cosmetic & Branding
|
||||
## Device Name Branding
|
||||
|
||||
To help differentiate your hardware from other solutions, some customization is allowed.
|
||||
To help differentiate your hardware from other solutions, a device name may be set.
|
||||
|
||||
```{eval-rst}
|
||||
.. tab-set-code::
|
||||
@@ -113,8 +113,6 @@ To help differentiate your hardware from other solutions, some customization is
|
||||
|
||||
{
|
||||
"deviceName" : "Super Cool Custom Hardware",
|
||||
"deviceLogoPath" : "",
|
||||
"supportURL" : "https://cat-bounce.com/",
|
||||
}
|
||||
```
|
||||
|
||||
@@ -132,8 +130,6 @@ Here is a complete example `hardwareConfig.json`:
|
||||
|
||||
{
|
||||
"deviceName" : "Blinky McBlinkface",
|
||||
"deviceLogoPath" : "",
|
||||
"supportURL" : "https://www.youtube.com/watch?v=b-CvLWbfZhU",
|
||||
"ledPins" : [2, 13],
|
||||
"ledsCanDim" : true,
|
||||
"ledBrightnessRange" : [ 0, 100 ],
|
||||
|
||||
@@ -23,8 +23,6 @@ import java.util.ArrayList;
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class HardwareConfig {
|
||||
public final String deviceName;
|
||||
public final String deviceLogoPath;
|
||||
public final String supportURL;
|
||||
|
||||
// LED control
|
||||
public final ArrayList<Integer> ledPins;
|
||||
@@ -47,8 +45,6 @@ public class HardwareConfig {
|
||||
|
||||
public HardwareConfig(
|
||||
String deviceName,
|
||||
String deviceLogoPath,
|
||||
String supportURL,
|
||||
ArrayList<Integer> ledPins,
|
||||
boolean ledsCanDim,
|
||||
ArrayList<Integer> ledBrightnessRange,
|
||||
@@ -63,8 +59,6 @@ public class HardwareConfig {
|
||||
String restartHardwareCommand,
|
||||
double vendorFOV) {
|
||||
this.deviceName = deviceName;
|
||||
this.deviceLogoPath = deviceLogoPath;
|
||||
this.supportURL = supportURL;
|
||||
this.ledPins = ledPins;
|
||||
this.ledsCanDim = ledsCanDim;
|
||||
this.ledBrightnessRange = ledBrightnessRange;
|
||||
@@ -82,8 +76,6 @@ public class HardwareConfig {
|
||||
|
||||
public HardwareConfig() {
|
||||
deviceName = "";
|
||||
deviceLogoPath = "";
|
||||
supportURL = "";
|
||||
ledPins = new ArrayList<>();
|
||||
ledsCanDim = false;
|
||||
ledBrightnessRange = new ArrayList<>();
|
||||
@@ -121,10 +113,6 @@ public class HardwareConfig {
|
||||
public String toString() {
|
||||
return "HardwareConfig[deviceName="
|
||||
+ deviceName
|
||||
+ ", deviceLogoPath="
|
||||
+ deviceLogoPath
|
||||
+ ", supportURL="
|
||||
+ supportURL
|
||||
+ ", ledPins="
|
||||
+ ledPins
|
||||
+ ", ledsCanDim="
|
||||
|
||||
@@ -38,8 +38,6 @@ public class HardwareConfigTest {
|
||||
var config =
|
||||
new ObjectMapper().readValue(TestUtils.getHardwareConfigJson(), HardwareConfig.class);
|
||||
assertEquals(config.deviceName, "PhotonVision");
|
||||
assertEquals(config.deviceLogoPath, "photonvision.png");
|
||||
assertEquals(config.supportURL, "https://support.photonvision.com");
|
||||
// Ensure defaults are not null
|
||||
assertArrayEquals(config.ledPins.stream().mapToInt(i -> i).toArray(), new int[] {2, 13});
|
||||
NativeDeviceFactoryInterface deviceFactory = HardwareManager.configureCustomGPIO(config);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"deviceName": "PhotonVision",
|
||||
"deviceLogoPath": "photonvision.png",
|
||||
"supportURL": "https://support.photonvision.com",
|
||||
"ledPins" : [2, 13],
|
||||
"statusRGBPins" : [-1, -1, -1],
|
||||
"ledsCanDim" : true,
|
||||
|
||||
Reference in New Issue
Block a user