Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"deviceName" : "Limelight 2+",
"supportURL" : "https://limelightvision.io",
"ledPins" : [ 13, 18 ],
"ledsCanDim" : true,
"ledPWMFrequency" : 1000,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"deviceName" : "Limelight 2",
"supportURL" : "https://limelightvision.io",
"ledPins" : [ 17, 18 ],
"ledsCanDim" : false,
"vendorFOV" : 75.76079874010732
Expand Down
8 changes: 2 additions & 6 deletions docs/source/docs/hardware/customhardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,16 @@ 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::
.. code-block:: json

{
"deviceName" : "Super Cool Custom Hardware",
"deviceLogoPath" : "",
"supportURL" : "https://cat-bounce.com/",
}
```

Expand All @@ -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 ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
@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;
Expand All @@ -47,8 +45,6 @@ public class HardwareConfig {

public HardwareConfig(
String deviceName,
String deviceLogoPath,
String supportURL,
ArrayList<Integer> ledPins,
boolean ledsCanDim,
ArrayList<Integer> ledBrightnessRange,
Expand All @@ -63,8 +59,6 @@ public HardwareConfig(
String restartHardwareCommand,
double vendorFOV) {
this.deviceName = deviceName;
this.deviceLogoPath = deviceLogoPath;
this.supportURL = supportURL;
this.ledPins = ledPins;
this.ledsCanDim = ledsCanDim;
this.ledBrightnessRange = ledBrightnessRange;
Expand All @@ -82,8 +76,6 @@ public HardwareConfig(

public HardwareConfig() {
deviceName = "";
deviceLogoPath = "";
supportURL = "";
ledPins = new ArrayList<>();
ledsCanDim = false;
ledBrightnessRange = new ArrayList<>();
Expand Down Expand Up @@ -121,10 +113,6 @@ public final boolean hasGPIOCommandsConfigured() {
public String toString() {
return "HardwareConfig[deviceName="
+ deviceName
+ ", deviceLogoPath="
+ deviceLogoPath
+ ", supportURL="
+ supportURL
+ ", ledPins="
+ ledPins
+ ", ledsCanDim="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public void loadJson() {
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);
Expand Down
2 changes: 0 additions & 2 deletions test-resources/hardware/HardwareConfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"deviceName": "PhotonVision",
"deviceLogoPath": "photonvision.png",
"supportURL": "https://support.photonvision.com",
"ledPins" : [2, 13],
"statusRGBPins" : [-1, -1, -1],
"ledsCanDim" : true,
Expand Down
Loading