development #4

Merged
elduko merged 6 commits from development into main 2025-10-31 15:22:25 +01:00
2 changed files with 30 additions and 0 deletions
Showing only changes of commit 65c4f3d0ba - Show all commits

View File

@@ -1,4 +1,14 @@
#pragma once #pragma once
/**
* @brief This function sets all the LEDs to a default(LOW) state
*
*/
void updateLeds(int volume); 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(); void resetLeds();

View File

@@ -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 <Arduino.h> #include <Arduino.h>
#include <constants.h> #include <constants.h>
#include <ledControlls.h> #include <ledControlls.h>
/**
* @brief This function sets all the LEDs to a default(LOW) state
*
*/
void resetLeds() void resetLeds()
{ {
digitalWrite(LED_HIGH, LOW); digitalWrite(LED_HIGH, LOW);
@@ -9,6 +24,11 @@ void resetLeds()
digitalWrite(LED_LOW, LOW); 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) void updateLeds(int volume)
{ {
switch (volume) switch (volume)