Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to arduino-esp32 v3.0.x (esp-idf v5.1) #3960

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
27acc2e
Upgrade to arduino-esp32 v3.0.0
mskvortsov May 21, 2024
48838e2
Work around BLE initialization failure on esp32s3
mskvortsov May 25, 2024
57bca80
Fix emoji compilation error
mskvortsov May 27, 2024
d315936
Bump framework version to the released 3.0.0
mskvortsov May 27, 2024
5f1afed
Merge branch 'master' into esp-idf5
mskvortsov Jun 2, 2024
9d8b352
Make abort() simpler to free up more iram
mskvortsov Jun 2, 2024
6fc7b9c
Merge remote-tracking branch 'upstream/master' into esp-idf5
mskvortsov Jun 4, 2024
0c758ca
Merge remote-tracking branch 'upstream/master' into esp-idf5
mskvortsov Jun 7, 2024
41a357b
Bump to 3.0.1
mskvortsov Jun 7, 2024
0c889bb
Fix getting ADC channel and refactoring
mskvortsov Jun 10, 2024
bb0c8b2
Merge branch 'master' into esp-idf5
mskvortsov Jun 10, 2024
dfb9778
Merge remote-tracking branch 'upstream/master' into esp-idf5
mskvortsov Jun 19, 2024
791c545
Bump ESP8266Audio to 1.9.8 and remove no longer needed quirks
mskvortsov Jun 19, 2024
050f443
Put LovyanGFX quirk under a condition
mskvortsov Jun 19, 2024
2774606
Merge branch 'master' into esp-idf5
mskvortsov Jun 19, 2024
e654754
Merge branch 'master' into esp-idf5
mskvortsov Jun 21, 2024
72b7049
Merge branch 'master' into esp-idf5
mskvortsov Jul 22, 2024
aa6daa9
Bump to 3.0.3
mskvortsov Jul 22, 2024
4236bdd
Revert "Bump to 3.0.3"
mskvortsov Jul 22, 2024
f06f0a8
Merge branch 'master' into esp-idf5
thebentern Jul 24, 2024
18046b3
Merge branch 'master' into esp-idf5
mskvortsov Aug 17, 2024
33ea97b
Use custom libs; up arduino to 3.0.4, platformio to 6.8.1
mskvortsov Aug 17, 2024
bb5cc04
Merge branch 'master' into esp-idf5
mskvortsov Aug 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions arch/esp32/esp32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
[esp32_base]
extends = arduino_base
custom_esp32_kind = esp32
platform = platformio/[email protected]
platform = platformio/[email protected]
platform_packages =
platformio/framework-arduinoespressif32@https://github.com/espressif/arduino-esp32/releases/download/3.0.4/esp32-3.0.4.zip
platformio/framework-arduinoespressif32-libs@https://github.com/mskvortsov/meshtastic-esp32-arduino-libs/releases/download/3.0.4/esp32-arduino-libs.zip
espressif/[email protected]
espressif/[email protected]
espressif/[email protected]

build_src_filter =
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2040> -<mesh/eth/> -<mesh/raspihttp>
Expand All @@ -19,7 +25,7 @@ board_build.filesystem = littlefs
build_unflags = -fno-lto
build_flags =
${arduino_base.build_flags}
-flto
-flto=auto
-Wall
-Wextra
-Isrc/platform/esp32
Expand All @@ -32,18 +38,18 @@ build_flags =
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=5120
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
-DSERIAL_BUFFER_SIZE=4096
-DLIBPAX_ARDUINO
-DLIBPAX_WIFI
-DLIBPAX_BLE
;-DDEBUG_HEAP
-include src/platform/esp32/quirks.h

lib_deps =
${arduino_base.lib_deps}
${networking_base.lib_deps}
${environmental_base.lib_deps}
https://github.com/meshtastic/esp32_https_server.git#23665b3adc080a311dcbb586ed5941b5f94d6ea2
https://github.com/mskvortsov/esp32_https_server.git#mbedtls
h2zero/NimBLE-Arduino@^1.4.2
https://github.com/dbSuS/libpax.git#7bcd3fcab75037505be9b122ab2b24cc5176b587
https://github.com/lewisxhe/XPowersLib.git#84b7373faea3118b6c37954d52f98b8a337148d6
Expand Down
4 changes: 4 additions & 0 deletions arch/esp32/esp32s3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ custom_esp32_kind = esp32s3

monitor_speed = 115200

# Work around BLE initialization failure
build_flags =
${esp32_base.build_flags}
-DCONFIG_BT_NIMBLE_PINNED_TO_CORE=1
11 changes: 10 additions & 1 deletion bin/platformio-custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,21 @@ def esp32_create_combined_bin(source, target, env):
"-Wl,--wrap=esp_flash_chip_gd",
"-Wl,--wrap=esp_flash_chip_issi",
"-Wl,--wrap=esp_flash_chip_winbond",
# For IDF5 build
"-Wl,--wrap=abort",
]
)
else:
# For newer ESP32 targets, using newlib nano works better.
env.Append(LINKFLAGS=["--specs=nano.specs", "-u", "_printf_float"])

# XXX
for lb in env.GetLibBuilders():
if lb.name == "NonBlockingRTTTL":
lb.env.Append(CPPDEFINES=[("QUIRK_RTTTL", 1)])
elif lb.name == "LovyanGFX":
lb.env.Append(CPPDEFINES=[("QUIRK_LOVYAN", 1)])

if platform.name == "nordicnrf52":
env.AddPostAction("$BUILD_DIR/${PROGNAME}.hex",
env.VerboseAction(f"{sys.executable} ./bin/uf2conv.py $BUILD_DIR/firmware.hex -c -f 0xADA52840 -o $BUILD_DIR/firmware.uf2",
Expand All @@ -96,4 +105,4 @@ def esp32_create_combined_bin(source, target, env):
"-DAPP_VERSION=" + verObj["long"],
"-DAPP_VERSION_SHORT=" + verObj["short"],
]
)
)
120 changes: 79 additions & 41 deletions src/Power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@

#if defined(BATTERY_PIN) && defined(ARCH_ESP32)

#ifndef BAT_MEASURE_ADC_UNIT // ADC1 is default
static const adc1_channel_t adc_channel = ADC_CHANNEL;
static const adc_unit_t unit = ADC_UNIT_1;
#else // ADC2
static const adc2_channel_t adc_channel = ADC_CHANNEL;
static const adc_unit_t unit = ADC_UNIT_2;
static adc_channel_t adc_channel;
#ifdef BAT_MEASURE_ADC_UNIT
RTC_NOINIT_ATTR uint64_t RTC_reg_b;
#endif

#endif // BAT_MEASURE_ADC_UNIT

esp_adc_cal_characteristics_t *adc_characs = (esp_adc_cal_characteristics_t *)calloc(1, sizeof(esp_adc_cal_characteristics_t));
static adc_oneshot_unit_handle_t adc_unit_handle;
static adc_cali_handle_t adc_cali_handle;
#ifndef ADC_ATTENUATION
static const adc_atten_t atten = ADC_ATTEN_DB_12;
#else
Expand Down Expand Up @@ -228,8 +224,12 @@ class AnalogBatteryLevel : public HasBatteryLevel

#ifdef ARCH_ESP32 // ADC block for espressif platforms
raw = espAdcRead();
scaled = esp_adc_cal_raw_to_voltage(raw, adc_characs);
scaled *= operativeAdcMultiplier;
int millivolts = 0;
esp_err_t res = adc_cali_raw_to_voltage(adc_cali_handle, raw, &millivolts);
if (res != ESP_OK) {
LOG_ERROR("Failed to convert ADC raw data to calibrated voltage\n");
}
scaled = millivolts * operativeAdcMultiplier;
#else // block for all other platforms
#ifdef ADC_CTRL // enable adc voltage divider when we need to read
pinMode(ADC_CTRL, OUTPUT);
Expand Down Expand Up @@ -280,9 +280,11 @@ class AnalogBatteryLevel : public HasBatteryLevel
digitalWrite(ADC_CTRL, ADC_CTRL_ENABLED);
delay(10);
#endif

int val_;
for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {
int val_ = adc1_get_raw(adc_channel);
if (val_ >= 0) { // save only valid readings
esp_err_t res = adc_oneshot_read(adc_unit_handle, adc_channel, &val_);
if (res == ESP_OK) { // save only valid readings
raw += val_;
raw_c++;
}
Expand All @@ -304,15 +306,15 @@ class AnalogBatteryLevel : public HasBatteryLevel
// ADC2 wifi bug workaround not required, breaks compile
// On ESP32S3, ADC2 can take turns with Wifi (?)

int32_t adc_buf;
int adc_buf;
esp_err_t read_result;

// Multiple samples
for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {
adc_buf = 0;
read_result = -1;

read_result = adc2_get_raw(adc_channel, ADC_WIDTH_BIT_12, &adc_buf);
read_result = adc_oneshot_read(adc_unit_handle, adc_channel, &adc_buf);
if (read_result == ESP_OK) {
raw += adc_buf;
raw_c++; // Count valid samples
Expand All @@ -322,15 +324,17 @@ class AnalogBatteryLevel : public HasBatteryLevel
}

#else // Other ESP32
int32_t adc_buf = 0;
int adc_buf = 0;
for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {
// ADC2 wifi bug workaround, see
// https://github.com/espressif/arduino-esp32/issues/102
WRITE_PERI_REG(SENS_SAR_READ_CTRL2_REG, RTC_reg_b);
SET_PERI_REG_MASK(SENS_SAR_READ_CTRL2_REG, SENS_SAR2_DATA_INV);
adc2_get_raw(adc_channel, ADC_WIDTH_BIT_12, &adc_buf);
raw += adc_buf;
raw_c++;
esp_err_t res = adc_oneshot_read(adc_unit_handle, adc_channel, &adc_buf);
if (res == ESP_OK) { // save only valid readings
raw += adc_buf;
raw_c++;
}
}
#endif // BAT_MEASURE_ADC_UNIT

Expand Down Expand Up @@ -493,40 +497,74 @@ bool Power::analogInit()
#endif

#ifdef ARCH_ESP32 // ESP32 needs special analog stuff

adc_unit_t adc_unit;
esp_err_t res = adc_oneshot_io_to_channel(BATTERY_PIN, &adc_unit, &adc_channel);
if (res != ESP_OK) {
LOG_ERROR("Failed to get ADC unit and channel from the given GPIO number %d\n", BATTERY_PIN);
}
adc_oneshot_unit_init_cfg_t adc_unit_config = {
.unit_id = adc_unit,
};
res = adc_oneshot_new_unit(&adc_unit_config, &adc_unit_handle);
if (res != ESP_OK) {
LOG_ERROR("Failed to create a handle to a specific ADC unit\n");
}
#ifndef ADC_WIDTH // max resolution by default
static const adc_bits_width_t width = ADC_WIDTH_BIT_12;
static const adc_bitwidth_t width = ADC_BITWIDTH_12;
#else
static const adc_bits_width_t width = ADC_WIDTH;
static const adc_bitwidth_t width = ADC_WIDTH;
#endif
#ifndef BAT_MEASURE_ADC_UNIT // ADC1
adc1_config_width(width);
adc1_config_channel_atten(adc_channel, atten);
#else // ADC2
adc2_config_channel_atten(adc_channel, atten);
#ifndef CONFIG_IDF_TARGET_ESP32S3
adc_oneshot_chan_cfg_t chan_config = {
.atten = atten,
.bitwidth = width,
};
res = adc_oneshot_config_channel(adc_unit_handle, adc_channel, &chan_config);
if (res != ESP_OK) {
LOG_ERROR("Failed to set ADC oneshot mode\n");
}
#if defined(BAT_MEASURE_ADC_UNIT) && !defined(CONFIG_IDF_TARGET_ESP32S3)
// ADC2 wifi bug workaround
// Not required with ESP32S3, breaks compile
RTC_reg_b = READ_PERI_REG(SENS_SAR_READ_CTRL2_REG);
#endif
#endif
// calibrate ADC
esp_adc_cal_value_t val_type = esp_adc_cal_characterize(unit, atten, width, DEFAULT_VREF, adc_characs);

#if ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED
adc_cali_line_fitting_config_t cali_config = {
.unit_id = adc_unit,
.atten = atten,
.bitwidth = ADC_BITWIDTH_DEFAULT,
.default_vref = DEFAULT_VREF,
};
res = adc_cali_create_scheme_line_fitting(&cali_config, &adc_cali_handle);
if (res != ESP_OK) {
LOG_ERROR("Failed to create ADC calibration scheme\n");
}
adc_cali_line_fitting_efuse_val_t val_type;
adc_cali_scheme_line_fitting_check_efuse(&val_type);
// show ADC characterization base
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
LOG_INFO("ADCmod: ADC characterization based on Two Point values stored in eFuse\n");
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
switch (val_type) {
case ADC_CALI_LINE_FITTING_EFUSE_VAL_EFUSE_VREF:
LOG_INFO("ADCmod: ADC characterization based on reference voltage stored in eFuse\n");
break;
case ADC_CALI_LINE_FITTING_EFUSE_VAL_EFUSE_TP:
LOG_INFO("ADCmod: ADC characterization based on Two Point values stored in eFuse\n");
break;
case ADC_CALI_LINE_FITTING_EFUSE_VAL_DEFAULT_VREF:
LOG_INFO("ADCmod: ADC characterization based on default reference voltage\n");
break;
}
#ifdef CONFIG_IDF_TARGET_ESP32S3
// ESP32S3
else if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP_FIT) {
LOG_INFO("ADCmod: ADC Characterization based on Two Point values and fitting curve coefficients stored in eFuse\n");
#else
adc_cali_curve_fitting_config_t cali_config = {
.unit_id = adc_unit,
.chan = adc_channel,
.atten = atten,
.bitwidth = ADC_BITWIDTH_DEFAULT,
};
res = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_cali_handle);
if (res != ESP_OK) {
LOG_ERROR("Failed to create ADC calibration scheme\n");
}
#endif
else {
LOG_INFO("ADCmod: ADC characterization based on default reference voltage\n");
}
#endif // ARCH_ESP32

#ifdef ARCH_NRF52
Expand Down
2 changes: 1 addition & 1 deletion src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int GPS::getACK(uint8_t *buffer, uint16_t size, uint8_t requestedClass, uint8_t
{
uint16_t ubxFrameCounter = 0;
uint32_t startTime = millis();
uint16_t needRead;
uint16_t needRead = 0;

while (millis() - startTime < waitMillis) {
if (_serial_gps->available()) {
Expand Down
28 changes: 14 additions & 14 deletions src/graphics/Screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,55 +1004,55 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state

display->setColor(WHITE);
#ifndef EXCLUDE_EMOJI
if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F44D") == 0) {
if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44D") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
thumbup);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F44E") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44E") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
thumbdown);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"❓") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "❓") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height,
question);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"‼️") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "‼️") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - bang_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - bang_height) / 2 + 2 + 5,
bang_width, bang_height, bang);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F4A9") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F4A9") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - poo_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - poo_height) / 2 + 2 + 5,
poo_width, poo_height, poo);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xf0\x9f\xa4\xa3") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - haha_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - haha_height) / 2 + 2 + 5,
haha_width, haha_height, haha);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F44B") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F44B") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - wave_icon_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - wave_icon_height) / 2 + 2 + 5, wave_icon_width,
wave_icon_height, wave_icon);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F920") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F920") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - cowboy_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cowboy_height) / 2 + 2 + 5, cowboy_width, cowboy_height,
cowboy);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\U0001F42D") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F42D") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - deadmau5_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - deadmau5_height) / 2 + 2 + 5, deadmau5_width, deadmau5_height,
deadmau5);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\xE2\x98\x80\xEF\xB8\x8F") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xE2\x98\x80\xEF\xB8\x8F") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - sun_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - sun_height) / 2 + 2 + 5,
sun_width, sun_height, sun);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\u2614") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\u2614") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - rain_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - rain_height) / 2 + 2 + 10,
rain_width, rain_height, rain);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"☁️") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "☁️") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - cloud_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - cloud_height) / 2 + 2 + 5, cloud_width, cloud_height, cloud);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"🌫️") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "🌫️") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - fog_width) / 2, y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - fog_height) / 2 + 2 + 5,
fog_width, fog_height, fog);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"\xf0\x9f\x98\x88") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\xf0\x9f\x98\x88") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - devil_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - devil_height) / 2 + 2 + 5, devil_width, devil_height, devil);
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), u8"♥️") == 0) {
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "♥️") == 0) {
display->drawXbm(x + (SCREEN_WIDTH - heart_width) / 2,
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5, heart_width, heart_height, heart);
} else {
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
// #include <driver/rtc_io.h>

#ifdef ARCH_ESP32
#include "driver/gpio.h"
#if !MESHTASTIC_EXCLUDE_WEBSERVER
#include "mesh/http/WebServer.h"
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "modules/esp32/StoreForwardModule.h"
#include <Preferences.h>
#include <nvs_flash.h>
#undef EXT_RAM_ATTR
#define EXT_RAM_ATTR EXT_RAM_BSS_ATTR
#endif

#ifdef ARCH_PORTDUINO
Expand Down
4 changes: 2 additions & 2 deletions src/mesh/TypedQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
template <class T> class TypedQueue
{
static_assert(std::is_pod<T>::value, "T must be pod");
static_assert(std::is_standard_layout<T>::value && std::is_trivial<T>::value, "T must be pod");
QueueHandle_t h;
concurrency::OSThread *reader = NULL;

Expand Down Expand Up @@ -112,4 +112,4 @@ template <class T> class TypedQueue

void setReader(concurrency::OSThread *t) { reader = t; }
};
#endif
#endif
Loading
Loading