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