mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-16 23:41:40 +02:00
Rename Power.* to PowerManager.* for clarity
This commit is contained in:
@ -6,15 +6,15 @@ MultiColorLight::MultiColorLight()
|
||||
};
|
||||
|
||||
void MultiColorLight::begin(void) {
|
||||
if (!Power::waitForCurrentAllowance(
|
||||
if (!PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_TOP_LEFT,
|
||||
PowerParameters::CurrentConsumptions::CURRENT_LED_RGB_BASE,
|
||||
MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL) &&
|
||||
Power::waitForCurrentAllowance(
|
||||
PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_TOP_RIGHT,
|
||||
PowerParameters::CurrentConsumptions::CURRENT_LED_RGB_BASE,
|
||||
MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL) &&
|
||||
Power::waitForCurrentAllowance(
|
||||
PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_BOTTOM,
|
||||
PowerParameters::CurrentConsumptions::CURRENT_LED_RGB_BASE,
|
||||
MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL)) {
|
||||
@ -33,7 +33,7 @@ void MultiColorLight::setLed(uint8_t index, uint32_t color) {
|
||||
float totalConsumption = modelCurrentConsumption(normalizedColor);
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (!Power::waitForCurrentAllowance(
|
||||
if (!PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_TOP_RIGHT,
|
||||
totalConsumption, MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL)) {
|
||||
ESP_LOGW(TAG,
|
||||
@ -44,7 +44,7 @@ void MultiColorLight::setLed(uint8_t index, uint32_t color) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (!Power::waitForCurrentAllowance(
|
||||
if (!PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_TOP_LEFT, totalConsumption,
|
||||
MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL)) {
|
||||
ESP_LOGW(TAG,
|
||||
@ -55,7 +55,7 @@ void MultiColorLight::setLed(uint8_t index, uint32_t color) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (!Power::waitForCurrentAllowance(
|
||||
if (!PowerManager::waitForCurrentAllowance(
|
||||
PowerParameters::PowerConsumers::LED_RGB_BOTTOM, totalConsumption,
|
||||
MULTI_COLOR_LIGHT_MAX_EXECUTION_DELAY_MS, NULL)) {
|
||||
ESP_LOGW(TAG,
|
||||
@ -235,7 +235,7 @@ float MultiColorLight::modelChargeConsumption(leds leds, uint32_t color,
|
||||
// TODO logging
|
||||
break;
|
||||
}
|
||||
return ledsConsumption;
|
||||
return ledsConsumption;
|
||||
};
|
||||
|
||||
float MultiColorLight::modelChargeConsumption(leds leds, uint8_t red,
|
||||
@ -243,4 +243,4 @@ float MultiColorLight::modelChargeConsumption(leds leds, uint8_t red,
|
||||
uint16_t durationMs) {
|
||||
return MultiColorLight::modelChargeConsumption(
|
||||
leds, MultiColorLight::color(red, green, blue), durationMs);
|
||||
};
|
||||
};
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
#ifndef MultiColorLight_h
|
||||
#define MultiColorLight_h
|
||||
#include "../power/Power.h"
|
||||
#include "../power/PowerManager.h"
|
||||
#include "ColorConstants.h"
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
|
||||
|
Reference in New Issue
Block a user