Skip to content

Commit

Permalink
added controller comments
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Swindle <[email protected]>
  • Loading branch information
SwindleA authored May 1, 2024
1 parent 6c81710 commit 8e72e00
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MicroSwitchController(@Named("micro-switch") DigitalInput microSwitch,
this.ledHelper1 = new LEDHelper(led1);
this.ledHelper2 = new LEDHelper(led2);
}

//enables the micro switch. The LEDs will switch states as the switch is pressed
@Get("/enable")
public void enableMicroSwitch() {
microSwitchHelper.addEventListener(e -> {
Expand All @@ -40,10 +40,10 @@ public void enableMicroSwitch() {
}
});
}

//disable the micro switch
@Get("/disable")
public void disableMicroSwitch() {
microSwitchHelper.removeEventListener();
}
}
//end::ex[]
//end::ex[]

0 comments on commit 8e72e00

Please sign in to comment.