Rename Power.* to PowerManager.* for clarity
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user