Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

April 9 #105

Merged
merged 21 commits into from
Apr 11, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Change led attention command
Prog694 committed Apr 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 710531c0e522aaa257283d3a2c798ee8be327dc2
Original file line number Diff line number Diff line change
@@ -81,7 +81,7 @@ public interface LEDInstructions {

LEDInstruction AUTO_SWERVE = new LEDPulseColor(SLColor.GREEN);

LEDInstruction ATTENTION = new LED694(0.01);
LEDInstruction ATTENTION = new LED694(0.01, SLColor.BLUE);

LEDInstruction CLIMB_UP = new LEDSection(new SLColor[] {SLColor.PURPLE, SLColor.GREEN}, false);

Original file line number Diff line number Diff line change
@@ -16,18 +16,21 @@
public class LED694 implements LEDInstruction {

private final double pulsingTime;
private final SLColor[] colorMap;
private final ArrayList<Integer> colorArray;
private final StopWatch stopWatch;

public LED694(double pulsingTime) {
public LED694(double pulsingTime, SLColor secondaryColor) {
this.pulsingTime = pulsingTime;
colorMap = new SLColor[] {SLColor.RED, secondaryColor};
colorArray = initColors();
stopWatch = new StopWatch();
}

public LED694() {
this(0.03);
this(0.03, SLColor.WHITE);
}

private SLColor[] colorMap = {SLColor.RED, SLColor.WHITE};
private ArrayList<Integer> colorArray = initColors();
private StopWatch stopWatch = new StopWatch();

@Override
public void setLED(AddressableLEDBuffer ledBuffer) {