fix warnings

This commit is contained in:
Sacha Weatherstone 2022-05-02 10:24:28 +10:00
parent 8f038ced15
commit 7ae8601ba5
No known key found for this signature in database
GPG Key ID: 7AB2D7E206124B31
5 changed files with 25 additions and 25 deletions

2
proto

@ -1 +1 @@
Subproject commit cb7bf9ac239b87c6a988feb0bb49c8a3e85dea0e Subproject commit 79d24080ff83b0a54bc1619f07f41f17ffedfb99

View File

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

View File

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

View File

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

View File

@ -1,9 +1,9 @@
#include "configuration.h"
#include "sleep.h" #include "sleep.h"
#include "GPS.h" #include "GPS.h"
#include "MeshRadio.h" #include "MeshRadio.h"
#include "MeshService.h" #include "MeshService.h"
#include "NodeDB.h" #include "NodeDB.h"
#include "configuration.h"
#include "error.h" #include "error.h"
#include "main.h" #include "main.h"
#include "target_specific.h" #include "target_specific.h"
@ -11,10 +11,10 @@
#ifndef NO_ESP32 #ifndef NO_ESP32
#include "esp32/pm.h" #include "esp32/pm.h"
#include "esp_pm.h" #include "esp_pm.h"
#include "mesh/http/WiFiAPClient.h"
#include "rom/rtc.h" #include "rom/rtc.h"
#include <driver/rtc_io.h> #include <driver/rtc_io.h>
#include <driver/uart.h> #include <driver/uart.h>
#include "mesh/http/WiFiAPClient.h"
#include "nimble/BluetoothUtil.h" #include "nimble/BluetoothUtil.h"
@ -52,23 +52,23 @@ void setCPUFast(bool on)
if (isWifiAvailable()) { if (isWifiAvailable()) {
/* /*
* *
* There's a newly introduced bug in the espressif framework where WiFi is * There's a newly introduced bug in the espressif framework where WiFi is
* unstable when the frequency is less than 240mhz. * unstable when the frequency is less than 240mhz.
* *
* This mostly impacts WiFi AP mode but we'll bump the frequency for * This mostly impacts WiFi AP mode but we'll bump the frequency for
* all WiFi use cases. * all WiFi use cases.
* (Added: Dec 23, 2021 by Jm Casler) * (Added: Dec 23, 2021 by Jm Casler)
*/ */
DEBUG_MSG("Setting CPU to 240mhz because WiFi is in use.\n"); DEBUG_MSG("Setting CPU to 240mhz because WiFi is in use.\n");
setCpuFrequencyMhz(240); setCpuFrequencyMhz(240);
return; return;
} }
// The Heltec LORA32 V1 runs at 26 MHz base frequency and doesn't react well to switching to 80 MHz... // The Heltec LORA32 V1 runs at 26 MHz base frequency and doesn't react well to switching to 80 MHz...
#ifndef ARDUINO_HELTEC_WIFI_LORA_32 #ifndef ARDUINO_HELTEC_WIFI_LORA_32
setCpuFrequencyMhz(on ? 240 : 80); setCpuFrequencyMhz(on ? 240 : 80);
#endif #endif
#endif #endif
} }
@ -284,12 +284,12 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
*/ */
void enableModemSleep() 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; esp32_config.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ;
config.min_freq_mhz = 20; // 10Mhz is minimum recommended esp32_config.min_freq_mhz = 20; // 10Mhz is minimum recommended
config.light_sleep_enable = false; esp32_config.light_sleep_enable = false;
int rv = esp_pm_configure(&config); int rv = esp_pm_configure(&esp32_config);
DEBUG_MSG("Sleep request result %x\n", rv); DEBUG_MSG("Sleep request result %x\n", rv);
} }
#endif #endif