Rename Power.* to PowerManager.* for clarity

This commit is contained in:
2025-02-16 01:10:33 +01:00
parent ff11ad95b0
commit 5efa7a5efd
20 changed files with 152 additions and 152 deletions

View File

@@ -17,7 +17,7 @@
#include <freertos/task.h>
#include "driver/ledc.h"
#include "motionDetection/MotionDetection.h"
#include "../power/Power.h"
#include "../power/PowerManager.h"
#define LEDC_MODE LEDC_LOW_SPEED_MODE
#define TIMER LEDC_TIMER_2
#define CHANNEL_LEFT LEDC_CHANNEL_3

View File

@@ -1,5 +1,5 @@
#include "Motion.h"
#include "power/Power.h"
#include "power/PowerManager.h"
#define MOTOR_LEFT_PIN 12
#define MOTOR_RIGHT_PIN 11
@@ -30,7 +30,7 @@ void Motor::begin(void){
bool Motor::setSpeed(uint16_t duty) {
const float current = this->modelCurrentConsumption(duty);
if (this->pin == MOTOR_LEFT_PIN) {
if (!Power::waitForCurrentAllowance(
if (!PowerManager::waitForCurrentAllowance(
PowerParameters::PowerConsumers::MOTOR_LEFT, current,
MOTOR_MAX_EXECUTION_DELAY_MS, NULL)) {
ESP_LOGW(TAG,
@@ -40,7 +40,7 @@ bool Motor::setSpeed(uint16_t duty) {
return false;
}
} else {
if (!Power::waitForCurrentAllowance(
if (!PowerManager::waitForCurrentAllowance(
PowerParameters::PowerConsumers::MOTOR_RIGHT, current,
MOTOR_MAX_EXECUTION_DELAY_MS, NULL)) {
ESP_LOGW(TAG,