Added comments to ledControlls
All checks were successful
Generate Documentation / build (push) Successful in 15s
All checks were successful
Generate Documentation / build (push) Successful in 15s
This commit is contained in:
@@ -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();
|
||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user