raytac-diy
Sacha Weatherstone 2022-05-02 10:24:28 +10:00
rodzic 8f038ced15
commit 7ae8601ba5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7AB2D7E206124B31
5 zmienionych plików z 25 dodań i 25 usunięć

2
proto

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

Wyświetl plik

@ -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.

Wyświetl plik

@ -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:

Wyświetl plik

@ -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);

Wyświetl plik

@ -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"
@ -51,25 +51,25 @@ void setCPUFast(bool on)
#ifndef NO_ESP32
if (isWifiAvailable()) {
/*
*
* There's a newly introduced bug in the espressif framework where WiFi is
* unstable when the frequency is less than 240mhz.
*
* This mostly impacts WiFi AP mode but we'll bump the frequency for
* all WiFi use cases.
* (Added: Dec 23, 2021 by Jm Casler)
*/
/*
*
* There's a newly introduced bug in the espressif framework where WiFi is
* unstable when the frequency is less than 240mhz.
*
* This mostly impacts WiFi AP mode but we'll bump the frequency for
* all WiFi use cases.
* (Added: Dec 23, 2021 by Jm Casler)
*/
DEBUG_MSG("Setting CPU to 240mhz because WiFi is in use.\n");
setCpuFrequencyMhz(240);
return;
}
// 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
setCpuFrequencyMhz(on ? 240 : 80);
#endif
// 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
setCpuFrequencyMhz(on ? 240 : 80);
#endif
#endif
}
@ -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