From 65c4f3d0ba9745464421338be92e22144436373a Mon Sep 17 00:00:00 2001 From: Lyubomir Penev Date: Fri, 31 Oct 2025 15:04:11 +0100 Subject: [PATCH] Added comments to ledControlls --- include/ledControlls.h | 10 ++++++++++ src/ledControlls.cpp | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/include/ledControlls.h b/include/ledControlls.h index d1ce3d2..0c1e795 100644 --- a/include/ledControlls.h +++ b/include/ledControlls.h @@ -1,4 +1,14 @@ #pragma once +/** + * @brief This function sets all the LEDs to a default(LOW) state + * + */ void updateLeds(int volume); + +/** + * @brief This function turns on the correct LED depending on the current max(staff) volume + * + * @param volume The current max(staff) volume + */ void resetLeds(); \ No newline at end of file diff --git a/src/ledControlls.cpp b/src/ledControlls.cpp index b9f45a8..87023ae 100644 --- a/src/ledControlls.cpp +++ b/src/ledControlls.cpp @@ -1,7 +1,22 @@ +/** + * @file ledControlls.cpp + * @author Lyubomir Penev (me@lpenev.com) + * @brief This file contains all the functions which control the LEDs used to indicate the current max volume + * @version 0.1 + * @date 2025-10-31 + * + * @copyright Copyright (c) 2025 + * + */ + #include #include #include +/** + * @brief This function sets all the LEDs to a default(LOW) state + * + */ void resetLeds() { digitalWrite(LED_HIGH, LOW); @@ -9,6 +24,11 @@ void resetLeds() digitalWrite(LED_LOW, LOW); } +/** + * @brief This function turns on the correct LED depending on the current max(staff) volume + * + * @param volume The current max(staff) volume + */ void updateLeds(int volume) { switch (volume)