From a94512b2c47311e0d81efce9329924409b0398f8 Mon Sep 17 00:00:00 2001 From: Adrian Swindle Date: Fri, 17 Nov 2023 12:05:15 -0600 Subject: [PATCH] added controller endpoints for ledoff and switch state (#117) --- .../components/controllers/LEDController.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/components/src/main/java/com/opensourcewithslu/components/controllers/LEDController.java b/components/src/main/java/com/opensourcewithslu/components/controllers/LEDController.java index 63d2f0b0..793b4b21 100644 --- a/components/src/main/java/com/opensourcewithslu/components/controllers/LEDController.java +++ b/components/src/main/java/com/opensourcewithslu/components/controllers/LEDController.java @@ -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(); + } }