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

@@ -45,7 +45,7 @@ void nodeTimeAdjustedCallback(int32_t offset) {
void vTaskUpdate(void *pvParameters) {
for (;;) {
if (Power::waitForCurrentAllowance(
if (PowerManager::waitForCurrentAllowance(
PowerParameters::PowerConsumers::WIFI,
PowerParameters::CurrentConsumptions::CURRENT_WIFI_PEAK +
PowerParameters::CurrentConsumptions::CURRENT_WIFI_BASE,
@@ -54,7 +54,7 @@ void vTaskUpdate(void *pvParameters) {
} else {
ESP_LOGW(TAG, "Skipping mesh update after not being granted power");
}
Power::waitForCurrentAllowance(
PowerManager::waitForCurrentAllowance(
PowerParameters::PowerConsumers::WIFI,
PowerParameters::CurrentConsumptions::CURRENT_WIFI_BASE,
MESH_MAX_EXECUTION_DELAY_MS, NULL);
@@ -76,7 +76,7 @@ void Communication::begin(void) {
mesh.setDebugMsgTypes(
ERROR |
STARTUP); // set before init() so that you can see startup messages
if (!Power::waitForCurrentAllowance(
if (!PowerManager::waitForCurrentAllowance(
PowerParameters::PowerConsumers::WIFI,
PowerParameters::CurrentConsumptions::CURRENT_WIFI_BASE,
MESH_MAX_EXECUTION_DELAY_MS, NULL)) {
@@ -95,4 +95,4 @@ void Communication::begin(void) {
xTaskCreate(vTaskUpdate, "vTaskMeshUpdate", 4096, &ucParameterToPass,
tskIDLE_PRIORITY, &xHandle);
configASSERT(xHandle);
};
};

View File

@@ -1,7 +1,7 @@
#ifndef Communication_h
#define Communication_h
#include "../power/Power.h"
#include "../power/PowerManager.h"
#include <Arduino.h>
#include <painlessMesh.h>
#include <stdint.h>