Skip to content
Open
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
3 changes: 0 additions & 3 deletions docs/source/docs/additional-resources/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ The directory structure is outlined below.
- Contains images saved with the input/output save commands.
- logs
- Contains timestamped logs in the format {code}`photonvision-YYYY-MM-D_HH-MM-SS.log`. These timestamps will likely be significantly behind the real time. Coprocessors on the robot have no way to get current time.
- hardwareSettings.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not delete the hardwareConfig.json then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's that do again?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As of right now just LEDs. If we added support for gyros (ie canandgyro over usb or LL4 gyro) it make sense to add it back but we can cross that bridge when we come to it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, yoink

- Contains hardware settings. Currently this includes only the LED brightness.
- networkSettings.json
- Contains network settings, including team number (or remote network tables address), static/dynamic settings, and hostname.

Expand All @@ -45,7 +43,6 @@ A variety of files can be imported back into PhotonVision:
- Single Config File
- Currently-supported Files
- {code}`hardwareConfig.json`
- {code}`hardwareSettings.json`
- {code}`networkSettings.json`
- Useful for simple hardware or network configuration tasks without overwriting all settings.

Expand Down
14 changes: 0 additions & 14 deletions docs/source/docs/additional-resources/nt-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,3 @@ Images are returned as part of the .zip package from the "Export" operation in t
:::{warning}
If you manage to make calls to these commands faster than 500ms (between calls), additional photos will not be captured.
:::

### Global Entries

These entries are global, meaning that they should be called on the main `photonvision` table.

| Key | Type | Description |
| --------- | ----- | -------------------------------------------------------- |
| `ledMode` | `int` | Sets the LED Mode (-1: default, 0: off, 1: on, 2: blink) |

:::{warning}
Setting the LED mode to -1 (default) when `multiple` cameras are connected may result in unexpected behavior. {ref}`This is a known limitation of PhotonVision. <docs/troubleshooting/common-errors:LED Control>`

Single camera operation should work without issue.
:::
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"deviceName" : "Limelight 2+",
"supportURL" : "https://limelightvision.io",
"ledPins" : [ 13, 18 ],
"ledsCanDim" : true,
"ledPWMRange" : [ 0, 100 ],
"ledPWMFrequency" : 30000,
"vendorFOV" : 75.76079874010732
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"deviceName" : "Limelight 2",
"supportURL" : "https://limelightvision.io",
"ledPins" : [ 17, 18 ],
"ledsCanDim" : false,
"vendorFOV" : 75.76079874010732
}
36 changes: 1 addition & 35 deletions docs/source/docs/hardware/customhardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,10 @@

## Configuration

By default, PhotonVision attempts to make minimal assumptions of the hardware it runs on. However, it may be configured to enable custom LED control, branding, and other functionality.
By default, PhotonVision attempts to make minimal assumptions of the hardware it runs on. However, it may be configured to enable branding and other functionality.

`hardwareConfig.json` is the location for this configuration. It is included when settings are exported, and can be uploaded as part of a .zip, or on its own.

## LED Support

For Raspberry-Pi based hardware, PhotonVision can use [PiGPIO](https://abyz.me.uk/rpi/pigpio/) to control IO pins. The mapping of which pins control which LED's is part of the hardware config. The pins are active-high: set high when LED's are commanded on, and set low when commanded off.

```{eval-rst}
.. tab-set-code::
.. code-block:: json
{
"ledPins" : [ 13 ],
"ledSetCommand" : "",
"ledsCanDim" : true,
"ledPWMRange" : [ 0, 100 ],
"ledPWMSetRange" : "",
"ledPWMFrequency" : 0,
"ledDimCommand" : "",
"ledBlinkCommand" : "",
"statusRGBPins" : [ ],
}
```

:::{note}
No hardware boards with status RGB LED pins or non-dimming LED's have been tested yet. Please reach out to the development team if these features are desired, they can assist with configuration and testing.
:::

## 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).
Expand Down Expand Up @@ -100,15 +75,6 @@ Here is a complete example `hardwareConfig.json`:
"deviceName" : "Blinky McBlinkface",
"deviceLogoPath" : "",
"supportURL" : "https://www.youtube.com/watch?v=b-CvLWbfZhU",
"ledPins" : [2, 13],
"ledSetCommand" : "",
"ledsCanDim" : true,
"ledPWMRange" : [ 0, 100 ],
"ledPWMSetRange" : "",
"ledPWMFrequency" : 0,
"ledDimCommand" : "",
"ledBlinkCommand" : "",
"statusRGBPins" : [ ],
"cpuTempCommand" : "",
"cpuMemoryCommand" : "",
"cpuUtilCommand" : "",
Expand Down
20 changes: 0 additions & 20 deletions docs/source/docs/programming/photonlib/controlling-led.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/docs/programming/photonlib/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ getting-target-data
using-target-data
robot-pose-estimator
driver-mode-pipeline-index
controlling-led
```
6 changes: 0 additions & 6 deletions docs/source/docs/troubleshooting/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ All known issues can be found on our [GitHub page](https://github.com/PhotonVisi

Due to an issue with Linux kernels, the drivers for the PS3Eye are no longer supported. If you would still like to use the PS3Eye, you can downgrade your kernel with the following command: `sudo CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt rpi-update 866751bfd023e72bd96a8225cf567e03c334ecc4`. Note: You must be connected to the internet to run the command.

### LED Control

The logic for controlling LED mode when `multiple cameras are connected` is not fully fleshed out. In its current state, LED control is only enabled when a Pi Camera Module is not in driver mode—meaning a USB camera on its own is unable to control the LEDs.

For now, if you are using multiple cameras, it is recommended that teams set the value of the NetworkTables entry {code}`photonvision/ledMode` from the robot code to control LED state.

## Commonly Seen Issues

### Networking Issues
Expand Down
4 changes: 0 additions & 4 deletions photon-client/src/components/settings/DeviceControlCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ const openExportSettingsPrompt = () => {
enum ImportType {
AllSettings,
HardwareConfig,
HardwareSettings,
NetworkConfig,
ApriltagFieldLayout
}
Expand All @@ -151,9 +150,6 @@ const handleSettingsImport = () => {
case ImportType.HardwareConfig:
settingsEndpoint = "/hardwareConfig";
break;
case ImportType.HardwareSettings:
settingsEndpoint = "/hardwareSettings";
break;
case ImportType.NetworkConfig:
settingsEndpoint = "/networkConfig";
break;
Expand Down
19 changes: 0 additions & 19 deletions photon-client/src/components/settings/LEDControlCard.vue

This file was deleted.

26 changes: 1 addition & 25 deletions photon-client/src/stores/settings/GeneralSettingsStore.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
import { defineStore } from "pinia";
import type {
ConfigurableNetworkSettings,
GeneralSettings,
LightingSettings,
MetricData,
NetworkSettings
} from "@/types/SettingTypes";
import type { ConfigurableNetworkSettings, GeneralSettings, MetricData, NetworkSettings } from "@/types/SettingTypes";
import { NetworkConnectionType } from "@/types/SettingTypes";
import { useStateStore } from "@/stores/StateStore";
import axios from "axios";
import type { WebsocketSettingsUpdate } from "@/types/WebsocketDataTypes";

interface GeneralSettingsStore {
general: GeneralSettings;
network: NetworkSettings;
lighting: LightingSettings;
metrics: MetricData;
currentFieldLayout;
}
Expand Down Expand Up @@ -49,10 +41,6 @@ export const useSettingsStore = defineStore("settings", {
],
networkingDisabled: false
},
lighting: {
supported: true,
brightness: 0
},
metrics: {
cpuTemp: undefined,
cpuUtil: undefined,
Expand Down Expand Up @@ -113,23 +101,11 @@ export const useSettingsStore = defineStore("settings", {
conflictingHostname: data.general.conflictingHostname || false,
conflictingCameras: data.general.conflictingCameras || ""
};
this.lighting = data.lighting;
this.network = data.networkSettings;
this.currentFieldLayout = data.atfl;
},
updateGeneralSettings(payload: Required<ConfigurableNetworkSettings>) {
return axios.post("/settings/general", payload);
},
/**
* Modify the brightness of the LEDs.
*
* @param brightness brightness to set [0, 100]
*/
changeLEDBrightness(brightness: number) {
const payload = {
enabledLEDPercentage: brightness
};
useStateStore().websocket?.send(payload, true);
}
}
});
10 changes: 1 addition & 9 deletions photon-client/src/types/PipelineTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export interface PipelineSettings {
offsetDualPointA: { x: number; y: number };
offsetDualPointB: { x: number; y: number };
hsvHue: WebsocketNumberPair | [number, number];
ledMode: boolean;
hueInverted: boolean;
outputShowMultipleTargets: boolean;
contourSortMode: number;
Expand Down Expand Up @@ -93,7 +92,6 @@ export type ConfigurablePipelineSettings = Partial<
| "cornerDetectionUseConvexHulls"
| "offsetDualPointA"
| "offsetDualPointB"
| "ledMode"
| "offsetSinglePoint"
| "offsetDualPointBArea"
| "cornerDetectionExactSideCount"
Expand All @@ -103,7 +101,7 @@ export type ConfigurablePipelineSettings = Partial<
// Omitted settings are changed for all pipeline types
export const DefaultPipelineSettings: Omit<
PipelineSettings,
"cameraGain" | "targetModel" | "ledMode" | "outputShowMultipleTargets" | "cameraExposureRaw" | "pipelineType"
"cameraGain" | "targetModel" | "outputShowMultipleTargets" | "cameraExposureRaw" | "pipelineType"
> = {
offsetRobotOffsetMode: RobotOffsetPointMode.None,
streamingFrameDivisor: 0,
Expand Down Expand Up @@ -159,7 +157,6 @@ export const DefaultReflectivePipelineSettings: ReflectivePipelineSettings = {
...DefaultPipelineSettings,
cameraGain: 20,
targetModel: TargetModel.InfiniteRechargeHighGoalOuter,
ledMode: true,
outputShowMultipleTargets: false,
cameraExposureRaw: 6,
pipelineType: PipelineType.Reflective,
Expand Down Expand Up @@ -190,7 +187,6 @@ export const DefaultColoredShapePipelineSettings: ColoredShapePipelineSettings =
...DefaultPipelineSettings,
cameraGain: 75,
targetModel: TargetModel.InfiniteRechargeHighGoalOuter,
ledMode: true,
outputShowMultipleTargets: false,
cameraExposureRaw: 20,
pipelineType: PipelineType.ColoredShape,
Expand Down Expand Up @@ -230,7 +226,6 @@ export const DefaultAprilTagPipelineSettings: AprilTagPipelineSettings = {
...DefaultPipelineSettings,
cameraGain: 75,
targetModel: TargetModel.AprilTag6p5in_36h11,
ledMode: false,
outputShowMultipleTargets: true,
cameraExposureRaw: 20,
pipelineType: PipelineType.AprilTag,
Expand Down Expand Up @@ -276,7 +271,6 @@ export const DefaultArucoPipelineSettings: ArucoPipelineSettings = {
targetModel: TargetModel.AprilTag6p5in_36h11,
cameraExposureRaw: -1,
cameraAutoExposure: true,
ledMode: false,
pipelineType: PipelineType.Aruco,

tagFamily: AprilTagFamily.Family36h11,
Expand Down Expand Up @@ -309,7 +303,6 @@ export const DefaultObjectDetectionPipelineSettings: ObjectDetectionPipelineSett
pipelineType: PipelineType.ObjectDetection,
cameraGain: 20,
targetModel: TargetModel.InfiniteRechargeHighGoalOuter,
ledMode: true,
outputShowMultipleTargets: false,
cameraExposureRaw: 6,
confidence: 0.9,
Expand All @@ -328,7 +321,6 @@ export const DefaultCalibration3dPipelineSettings: Calibration3dPipelineSettings
pipelineType: PipelineType.ObjectDetection,
cameraGain: 20,
targetModel: TargetModel.InfiniteRechargeHighGoalOuter,
ledMode: true,
outputShowMultipleTargets: false,
cameraExposureRaw: 6,
drawAllSnapshots: false
Expand Down
5 changes: 0 additions & 5 deletions photon-client/src/types/SettingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ export interface VsmState {
allConnectedCameras: PVCameraInfo[];
}

export interface LightingSettings {
supported: boolean;
brightness: number;
}

export enum LogLevel {
ERROR = 0,
WARN = 1,
Expand Down
2 changes: 0 additions & 2 deletions photon-client/src/types/WebsocketDataTypes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {
CameraCalibrationResult,
GeneralSettings,
LightingSettings,
LogLevel,
MetricData,
NetworkSettings,
Expand All @@ -20,7 +19,6 @@ export interface WebsocketLogMessage {
}
export interface WebsocketSettingsUpdate {
general: Required<GeneralSettings>;
lighting: Required<LightingSettings>;
networkSettings: NetworkSettings;
atfl: AprilTagFieldLayout;
}
Expand Down
2 changes: 0 additions & 2 deletions photon-client/src/views/GeneralSettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import MetricsCard from "@/components/settings/MetricsCard.vue";
import DeviceControlCard from "@/components/settings/DeviceControlCard.vue";
import ObjectDetectionCard from "@/components/settings/ObjectDetectionCard.vue";
import NetworkingCard from "@/components/settings/NetworkingCard.vue";
import LightingControlCard from "@/components/settings/LEDControlCard.vue";
import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
import ApriltagControlCard from "@/components/settings/ApriltagControlCard.vue";
</script>
Expand All @@ -14,7 +13,6 @@ import ApriltagControlCard from "@/components/settings/ApriltagControlCard.vue";
<DeviceControlCard />
<NetworkingCard />
<ObjectDetectionCard v-if="useSettingsStore().general.supportedBackends.length > 0" />
<LightingControlCard v-if="useSettingsStore().lighting.supported" />
<Suspense>
<!-- Allows us to import three js when it's actually needed -->
<ApriltagControlCard />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class ConfigManager {
private static ConfigManager INSTANCE;

public static final String HW_CFG_FNAME = "hardwareConfig.json";
public static final String HW_SET_FNAME = "hardwareSettings.json";
public static final String NET_SET_FNAME = "networkSettings.json";

final File configDirectoryFile;
Expand Down Expand Up @@ -311,10 +310,6 @@ public boolean saveUploadedHardwareConfig(Path uploadPath) {
return m_provider.saveUploadedHardwareConfig(uploadPath);
}

public boolean saveUploadedHardwareSettings(Path uploadPath) {
return m_provider.saveUploadedHardwareSettings(uploadPath);
}

public boolean saveUploadedNetworkConfig(Path uploadPath) {
return m_provider.saveUploadedNetworkConfig(uploadPath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public void clearConfig() {

public abstract boolean saveUploadedHardwareConfig(Path uploadPath);

public abstract boolean saveUploadedHardwareSettings(Path uploadPath);

public abstract boolean saveUploadedNetworkConfig(Path uploadPath);

public abstract boolean saveUploadedAprilTagFieldLayout(Path uploadPath);
Expand Down
Loading
Loading