Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
IMAGE_VERSION: v2026.1.1
IMAGE_VERSION: v2026.1.2

jobs:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"supportURL" : "https://limelightvision.io",
"ledPins" : [ 13, 18 ],
"ledsCanDim" : true,
"ledPWMFrequency" : 30000,
"ledPWMFrequency" : 1000,
"vendorFOV" : 75.76079874010732
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class VisionLED implements AutoCloseable {

private VisionLEDMode currentLedMode = VisionLEDMode.kDefault;
private BooleanSupplier pipelineModeSupplier;
private boolean currentOutputState = false;

private float mappedBrightness = 0.0f;

Expand Down Expand Up @@ -85,7 +86,11 @@ public void setPipelineModeSupplier(BooleanSupplier pipelineModeSupplier) {
public void setBrightness(int percentage) {
mappedBrightness =
(float) (MathUtils.map(percentage, 0.0, 100.0, brightnessMin, brightnessMax) / 100.0);
setInternal(currentLedMode, false);
if (currentOutputState) {
for (PwmLed led : dimmableVisionLEDs) {
led.setValue(mappedBrightness);
}
}
}

public void blink(int pulseLengthMillis, int blinkCount) {
Expand All @@ -102,6 +107,7 @@ private void blinkImpl(int pulseLengthMillis, int blinkCount) {
.addTask(
blinkTaskID,
() -> {
currentOutputState = !currentOutputState;
for (LED led : visionLEDs) {
led.toggle();
}
Expand All @@ -117,11 +123,16 @@ private void blinkImpl(int pulseLengthMillis, int blinkCount) {

private void setStateImpl(boolean state) {
TimedTaskManager.getInstance().cancelTask(blinkTaskID);
currentOutputState = state;
for (LED led : visionLEDs) {
led.setOn(state);
}
for (PwmLed led : dimmableVisionLEDs) {
led.setValue(mappedBrightness);
if (state) {
led.setValue(mappedBrightness);
} else {
led.off();
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions photon-lib/src/main/native/cpp/photon/PhotonCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ PhotonCamera::PhotonCamera(nt::NetworkTableInstance instance,
rootTable->GetIntegerTopic("pipelineIndexRequest").Publish()),
pipelineIndexSub(
rootTable->GetIntegerTopic("pipelineIndexState").Subscribe(0)),
ledModePub(mainTable->GetIntegerTopic("ledMode").Publish()),
ledModeSub(mainTable->GetIntegerTopic("ledMode").Subscribe(0)),
ledModePub(mainTable->GetIntegerTopic("ledModeRequest").Publish()),
ledModeSub(mainTable->GetIntegerTopic("ledModeState").Subscribe(0)),
versionEntry(mainTable->GetStringTopic("version").Subscribe("")),
cameraIntrinsicsSubscriber(
rootTable->GetDoubleArrayTopic("cameraIntrinsics").Subscribe({})),
Expand Down
Loading