fix warnings

This commit is contained in:
Sacha Weatherstone
2022-05-02 10:24:28 +10:00
parent 8f038ced15
commit 7ae8601ba5
5 changed files with 25 additions and 25 deletions

2
proto

Submodule proto updated: cb7bf9ac23...79d24080ff

View File

@@ -5,9 +5,9 @@
#define PB_ADMIN_PB_H_INCLUDED
#include <pb.h>
#include "channel.pb.h"
#include "config.pb.h"
#include "mesh.pb.h"
#include "radioconfig.pb.h"
#include "config.pb.h"
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.

View File

@@ -307,7 +307,7 @@ void AdminModule::handleSetRadio(RadioConfig &r)
service.reloadConfig();
}
void AdminModule::handleSetConfig(Config &c)
void AdminModule::handleSetConfig(const Config &c)
{
switch (c.which_payloadVariant) {
case AdminMessage_ConfigType_ALL:

View File

@@ -23,7 +23,7 @@ class AdminModule : public ProtobufModule<AdminMessage>
void handleSetOwner(const User &o);
void handleSetChannel(const Channel &cc);
void handleSetRadio(RadioConfig &r);
void handleSetConfig(Config &c);
void handleSetConfig(const Config &c);
void handleGetChannel(const MeshPacket &req, uint32_t channelIndex);
void handleGetRadio(const MeshPacket &req);

View File

@@ -1,9 +1,9 @@
#include "configuration.h"
#include "sleep.h"
#include "GPS.h"
#include "MeshRadio.h"
#include "MeshService.h"
#include "NodeDB.h"
#include "configuration.h"
#include "error.h"
#include "main.h"
#include "target_specific.h"
@@ -11,10 +11,10 @@
#ifndef NO_ESP32
#include "esp32/pm.h"
#include "esp_pm.h"
#include "mesh/http/WiFiAPClient.h"
#include "rom/rtc.h"
#include <driver/rtc_io.h>
#include <driver/uart.h>
#include "mesh/http/WiFiAPClient.h"
#include "nimble/BluetoothUtil.h"
@@ -284,12 +284,12 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
*/
void enableModemSleep()
{
static esp_pm_config_esp32_t config; // filled with zeros because bss
static esp_pm_config_esp32_t esp32_config; // filled with zeros because bss
config.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
config.min_freq_mhz = 20; // 10Mhz is minimum recommended
config.light_sleep_enable = false;
int rv = esp_pm_configure(&config);
esp32_config.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
esp32_config.min_freq_mhz = 20; // 10Mhz is minimum recommended
esp32_config.light_sleep_enable = false;
int rv = esp_pm_configure(&esp32_config);
DEBUG_MSG("Sleep request result %x\n", rv);
}
#endif