Skip to content

Commit

Permalink
added controller endpoints for ledoff and switch state (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
SwindleA authored Nov 17, 2023
1 parent 7803daa commit a94512b
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 a94512b

Please sign in to comment.