This commit is contained in:
Manuel 2025-07-31 21:50:14 +02:00 committed by GitHub
commit d9dac5d702
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 129 additions and 27 deletions

9
.gitignore vendored
View File

@ -39,5 +39,14 @@ release/
src/mesh/raspihttp/certificate.pem
src/mesh/raspihttp/private_key.pem
# pioarduino platform
managed_components/*
arduino-lib-builder*
dependencies.lock
idf_component.yml
CMakeLists.txt
sdkconfig.*
.dummy/*
# Ignore logo (set at build time with platformio-custom.py)
data/boot/logo.*

6
8MB_no_ota.csv Normal file
View File

@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x660000,
spiffs, data, spiffs, 0x670000,0x180000,
coredump, data, coredump,0x7F0000,0x10000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x660000
5 spiffs data spiffs 0x670000 0x180000
6 coredump data coredump 0x7F0000 0x10000

View File

@ -4,7 +4,7 @@ extends = arduino_base
custom_esp32_kind = esp32
platform =
# renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32
platformio/espressif32@6.11.0
# platformio/espressif32@6.11.0
build_src_filter =
${arduino_base.build_src_filter} -<platform/nrf52/> -<platform/stm32wl> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp>
@ -30,10 +30,10 @@ build_flags =
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
-DAXP_DEBUG_PORT=Serial
-DCONFIG_BT_NIMBLE_ENABLED
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
;-DCONFIG_BT_NIMBLE_ENABLED
;-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
;-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
;-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
-DSERIAL_BUFFER_SIZE=4096
-DLIBPAX_ARDUINO
@ -52,8 +52,8 @@ lib_deps =
https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
h2zero/NimBLE-Arduino@^1.4.3
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/mverch67/libpax gitBranch=master
https://github.com/mverch67/libpax/archive/6f52ee989301cdabaeef00bcbf93bff55708ce2f.zip
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
https://github.com/lewisxhe/XPowersLib/archive/v0.3.0.zip
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master

View File

@ -2,7 +2,7 @@
"build": {
"arduino": {
"ldscript": "esp32s3_out.ld",
"partitions": "default_8MB.csv",
"partitions": "8MB_no_ota.csv",
"memory_type": "qio_opi"
},
"core": "esp32",
@ -16,6 +16,7 @@
"f_cpu": "240000000L",
"f_flash": "80000000L",
"f_boot": "120000000L",
"boot_freq": "120000000L",
"boot": "qio",
"flash_mode": "qio",
"psram_type": "opi",

View File

@ -87,8 +87,9 @@ check_flags =
framework = arduino
lib_deps =
${env.lib_deps}
# renovate: datasource=custom.pio depName=NonBlockingRTTTL packageName=end2endzone/library/NonBlockingRTTTL
end2endzone/NonBlockingRTTTL@1.3.0
# renovate: datasource=custom.pio depName=NonBlockingRTTTL packageName=mverch67/library/NonBlockingRTTTL
https://github.com/mverch67/NonBlockingRTTTL/archive/ad1c2fb12bc81db546c6a94e963acb3382d3689e.zip ; TODO
build_flags = ${env.build_flags} -Os
build_src_filter = ${env.build_src_filter} -<platform/portduino/> -<graphics/niche/>

View File

@ -495,10 +495,12 @@ void menuHandler::positionBaseMenu()
static int optionsEnumArray[enumEnd] = {Back, GPSToggle, CompassMenu};
int options = 3;
#if !MESHTASTIC_EXCLUDE_I2C
if (accelerometerThread) {
optionsArray[options] = "Compass Calibrate";
optionsEnumArray[options++] = CompassCalibrate;
}
#endif
BannerOverlayOptions bannerOptions;
bannerOptions.message = "Position Action";
bannerOptions.optionsArrayPtr = optionsArray;
@ -511,8 +513,10 @@ void menuHandler::positionBaseMenu()
} else if (selected == CompassMenu) {
menuQueue = compass_point_north_menu;
screen->runNow();
#if !MESHTASTIC_EXCLUDE_I2C
} else if (selected == CompassCalibrate) {
accelerometerThread->calibrate(30);
#endif
}
};
screen->showOverlayBanner(bannerOptions);

View File

@ -163,7 +163,7 @@ void setupModules()
#endif
// Example: Put your module here
// new ReplyModule();
#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER
#if (HAS_BUTTON || ARCH_PORTDUINO) && !MESHTASTIC_EXCLUDE_INPUTBROKER && !MESHTASTIC_EXCLUDE_I2C
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
rotaryEncoderInterruptImpl1 = new RotaryEncoderInterruptImpl1();
if (!rotaryEncoderInterruptImpl1->init()) {

View File

@ -90,8 +90,6 @@ int32_t PaxcounterModule::runOnce()
configuration.blecounter = 1;
configuration.blescantime = 0; // infinite
configuration.wificounter = 1;
configuration.wifi_channel_map = WIFI_CHANNEL_ALL;
configuration.wifi_channel_switch_interval = 50;
configuration.wifi_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.wifi_threshold, -80);
configuration.ble_rssi_threshold = Default::getConfiguredOrDefault(moduleConfig.paxcounter.ble_threshold, -80);
libpax_update_config(&configuration);

View File

@ -25,6 +25,8 @@
#include <nvs.h>
#include <nvs_flash.h>
#include "esp_idf_version.h"
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH
void setBluetoothEnable(bool enable)
{
@ -169,18 +171,19 @@ void esp32Setup()
// #define APP_WATCHDOG_SECS 45
#define APP_WATCHDOG_SECS 90
#ifdef CONFIG_IDF_TARGET_ESP32C6
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t));
wdt_config->timeout_ms = APP_WATCHDOG_SECS * 1000;
wdt_config->idle_core_mask = 0;
wdt_config->trigger_panic = true;
res = esp_task_wdt_init(wdt_config);
assert(res == ESP_OK);
// assert(res == ESP_OK);
#else
res = esp_task_wdt_init(APP_WATCHDOG_SECS, true);
assert(res == ESP_OK);
#endif
res = esp_task_wdt_add(NULL);
assert(res == ESP_OK);
// assert(res == ESP_OK);
#ifdef HAS_32768HZ
enableSlowCLK();
@ -190,7 +193,9 @@ void esp32Setup()
/// loop code specific to ESP32 targets
void esp32Loop()
{
esp_task_wdt_reset(); // service our app level watchdog
if (esp_task_wdt_reset() != ESP_OK) {
LOG_ERROR("Failed to reset task watchdog");
}
// for debug printing
// radio.radioIf.canSleep();

View File

@ -1,18 +1,34 @@
; Seeed Studio SenseCAP Indicator
; note: does not work with vscode platformio plugin; needs pioarduino IDE plugin instead
[env:seeed-sensecap-indicator]
extends = esp32s3_base
platform =
;https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
https://github.com/pioarduino/platform-espressif32.git#55.03.30-1
;symlink:///home/manuel/Documents/PlatformIO/Projects/platform-espressif32
platform_packages =
platformio/framework-arduinoespressif32 @ https://github.com/mverch67/arduino-esp32/archive/aef7fef6de3329ed6f75512d46d63bba12b09bb5.zip ; add_tca9535 (based on 2.0.16)
;platformio/framework-arduinoespressif32-libs@https://dl.espressif.com/AE/esp-arduino-libs/esp32-3.2.0-h.zip
platformio/framework-arduinoespressif32 @ https://github.com/mverch67/arduino-esp32#509bd10c6c71f70f1a22a1be00fec45f47682f32
;platformio/framework-arduinoespressif32 @ symlink:///home/manuel/Documents/PlatformIO/Projects/arduino-esp32
board = seeed-sensecap-indicator
board_check = true
board_build.partitions = default_8MB.csv
board_build.partitions = 8MB_no_ota.csv
upload_protocol = esptool
build_flags = ${esp32_base.build_flags}
build_unflags =
-DCONFIG_BT_NIMBLE_ENABLED
-DCONFIG_NIMBLE_CPP_LOG_LEVEL=2
-DCONFIG_BT_NIMBLE_MAX_CCCDS=20
-DCONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
build_flags = ${esp32_base.build_flags} -D lcd_periph_signals=lcd_periph_rgb_signals -mtext-section-literals -ffat-lto-objects
-Ivariants/esp32s3/seeed-sensecap-indicator
-DSENSECAP_INDICATOR
-DCONFIG_ARDUHAL_LOG_COLORS
-DARDUINO_HAL_LOG_LEVEL=5
-DARDUHAL_LOG_MAXIMUM_LEVEL=5
-DARDUHAL_LOG_COLORS=1
-DUSE_ARDUINO_HAL_GPIO
-DRADIOLIB_DEBUG_SPI=0
-DRADIOLIB_DEBUG_PROTOCOL=0
-DRADIOLIB_DEBUG_BASIC=0
@ -20,13 +36,68 @@ build_flags = ${esp32_base.build_flags}
-DRADIOLIB_SPI_PARANOID=0
-DIO_EXPANDER=0x40
-DIO_EXPANDER_IRQ=42
;-DIO_EXPANDER_DEBUG
-DUSE_ARDUINO_HAL_GPIO
-DIO_EXPANDER_DEBUG
; -DARDUINO_SKIP_IDF_VERSION_CHECK=1
lib_deps = ${esp32s3_base.lib_deps}
https://github.com/mverch67/LovyanGFX/archive/4c76238c1344162a234ae917b27651af146d6fb2.zip
earlephilhower/ESP8266Audio@^1.9.9
earlephilhower/ESP8266SAM@^1.0.1
https://github.com/mverch67/LovyanGFX/archive/a1c1278fc9116d1c6cb15a7bb14565aef59a9a97.zip
custom_component_remove =
espressif/esp_hosted
espressif/esp_wifi_remote
espressif/esp_modem
espressif/esp-dsp
espressif/esp32-camera
espressif/libsodium
espressif/esp-modbus
espressif/qrcode
espressif/esp_insights
espressif/esp_diag_data_store
espressif/esp_diagnostics
espressif/esp_rainmaker
espressif/rmaker_common
espressif/network_provisioning
chmorgan/esp-libhelix-mp3
custom_sdkconfig =
CONFIG_LOG_DEFAULT_LEVEL=5
CONFIG_LOG_MAXIMUM_LEVEL=5
CONFIG_LOG_COLORS=y
CONFIG_ARDUHAL_LOG_COLORS=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_SPEED_120M=y
CONFIG_LCD_RGB_ISR_IRAM_SAFE=y
CONFIG_GDMA_CTRL_FUNC_IN_IRAM=y
CONFIG_I2S_ISR_IRAM_SAFE=y
CONFIG_GDMA_ISR_IRAM_SAFE=y
CONFIG_SPIRAM_XIP_FROM_PSRAM=y
CONFIG_SPIRAM_FETCH_INSTRUCTIONS=y
CONFIG_SPIRAM_RODATA=y
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32S3_DATA_CACHE_64KB=y
CONFIG_ESP32S3_DATA_CACHE_LINE_64B=y
CONFIG_I2C_SKIP_LEGACY_CONFLICT_CHECK=y
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM=y
CONFIG_ESP_WIFI_IRAM_OPT=n
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n
CONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM=n
CONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM=n
CONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM=n
CONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM=n
CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=0
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=y
CONFIG_BT_CONTROLLER_ENABLED=y
CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
CONFIG_BT_NIMBLE_MAX_CCCDS=20
CONFIG_BT_NIMBLE_CPP_LOG_LEVEL=2
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
[env:seeed-sensecap-indicator-tft]
@ -37,6 +108,13 @@ upload_speed = 460800
build_flags =
${env:seeed-sensecap-indicator.build_flags}
-D INPUTDRIVER_BUTTON_TYPE=38
-D MESHTASTIC_EXCLUDE_I2C=1
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
-D MESHTASTIC_EXCLUDE_SERIAL=1
-D MESHTASTIC_EXCLUDE_SOCKETAPI=1
-D MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
-D MESHTASTIC_EXCLUDE_WIFI=1 ; workaround due to duplicated definitions of Syslog
-D HAS_TELEMETRY=0
-D CONFIG_DISABLE_HAL_LOCKS=1
-D HAS_SCREEN=1
-D HAS_TFT=1

View File

@ -4,7 +4,7 @@
// This board has a serial coprocessor for sensor readings
#define SENSOR_RP2040_TXD 19
#define SENSOR_RP2040_RXD 20
#define SENSOR_PORT_NUM 2
#define SENSOR_PORT_NUM UART_NUM_2
#define SENSOR_BAUD_RATE 115200
#define BUTTON_PIN 38