Skip to content

Commit

Permalink
added controller endpoints for ledoff and switch state
Browse files Browse the repository at this point in the history
  • Loading branch information
SwindleA committed Nov 15, 2023
1 parent 7803daa commit b441acf
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,25 @@ public LEDController(@Named("Led")DigitalOutput led){
this.ledHelper = new LEDHelper(led);
}

@Get("/LEDOn")
public void checkLed(){
@Get("/LedOn")
public void ledOn(){
/*deviceOff method turns on the LED after checking the output. This
will turn on the LED
*/

ledHelper.deviceOff();
}

@Get("/LedOff")
public void ledOff(){

ledHelper.deviceOn();
}

@Get("/switchState")
public void switchState(){


ledHelper.switchState();
}
}

0 comments on commit b441acf

Please sign in to comment.