Compare commits

..

1 Commits

Author SHA1 Message Date
Tom Fifield
9a404566dd Remove GPS Baudrate locking for Seeed Xiao S3 Kit
The Seeed Xiao S3 Kit's default GPS is an L76K which operates at 9600 baud, so when this variant was defined that baud rate was specified.

However, this is a development board and it is expected that users can attach their own devices. This includes GPS, which may operate at a different baud rate. The current fixed baud rate prevents this, so this patch removes that setting.

This will revert to the regular automatic probe method. This will successfully detect the L76K as before (the same speed as before since 9600 baud is the first baud rate checked), but also allow other GPSes at other baud rates to be detected.

Thanks to @ScarpMarc for the report

Fixes https://github.com/meshtastic/firmware/issues/9373#issuecomment-3774802763
2026-01-21 08:52:59 +11:00
140 changed files with 436 additions and 1088 deletions

View File

@@ -8,7 +8,7 @@
"features": { "features": {
"ghcr.io/devcontainers/features/python:1": { "ghcr.io/devcontainers/features/python:1": {
"installTools": true, "installTools": true,
"version": "3.13" "version": "3.14"
} }
}, },
"customizations": { "customizations": {

View File

@@ -1,9 +1,10 @@
{ {
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [ "recommendations": [
"pioarduino.pioarduino-ide" "platformio.platformio-ide"
], ],
"unwantedRecommendations": [ "unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack", "ms-vscode.cpptools-extension-pack"
"platformio.platformio-ide"
] ]
} }

View File

@@ -33,7 +33,7 @@ echo "Copying ESP32 update bin file"
cp $BUILDDIR/$basename.bin $OUTDIR/$basename.bin cp $BUILDDIR/$basename.bin $OUTDIR/$basename.bin
echo "Copying Filesystem for ESP32 targets" echo "Copying Filesystem for ESP32 targets"
cp $BUILDDIR/littlefs-$1-$VERSION.bin $OUTDIR/littlefs-$1-$VERSION.bin || true cp $BUILDDIR/littlefs-$1-$VERSION.bin $OUTDIR/littlefs-$1-$VERSION.bin
cp bin/device-install.* $OUTDIR/ cp bin/device-install.* $OUTDIR/
cp bin/device-update.* $OUTDIR/ cp bin/device-update.* $OUTDIR/

View File

@@ -32,19 +32,6 @@ if ! command -v jq >/dev/null 2>&1; then
exit 1 exit 1
fi fi
# esptool v5 supports commands with dashes and deprecates commands with
# underscores. Prior versions only support commands with underscores
if ${ESPTOOL_CMD} | grep --quiet write-flash
then
ESPTOOL_WRITE_FLASH=write-flash
ESPTOOL_ERASE_FLASH=erase-flash
ESPTOOL_READ_FLASH_STATUS=read-flash-status
else
ESPTOOL_WRITE_FLASH=write_flash
ESPTOOL_ERASE_FLASH=erase_flash
ESPTOOL_READ_FLASH_STATUS=read_flash_status
fi
set -e set -e
# Usage info # Usage info
@@ -96,8 +83,8 @@ while [ $# -gt 0 ]; do
done done
if [[ $BPS_RESET == true ]]; then if [[ $BPS_RESET == true ]]; then
$ESPTOOL_CMD --baud $RESET_BAUD --after no_reset ${ESPTOOL_READ_FLASH_STATUS} $ESPTOOL_CMD --baud $RESET_BAUD --after no_reset read_flash_status
exit 0 exit 0
fi fi
[ -z "$FILENAME" ] && [ -n "$1" ] && { [ -z "$FILENAME" ] && [ -n "$1" ] && {
@@ -157,12 +144,12 @@ if [[ -f "$FILENAME" && "$FILENAME" == *.factory.bin ]]; then
fi fi
echo "Trying to flash ${FILENAME}, but first erasing and writing system information" echo "Trying to flash ${FILENAME}, but first erasing and writing system information"
$ESPTOOL_CMD ${ESPTOOL_ERASE_FLASH} $ESPTOOL_CMD erase-flash
$ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $FIRMWARE_OFFSET "${FILENAME}" $ESPTOOL_CMD write-flash $FIRMWARE_OFFSET "${FILENAME}"
echo "Trying to flash ${OTAFILE} at offset ${OTA_OFFSET}" echo "Trying to flash ${OTAFILE} at offset ${OTA_OFFSET}"
$ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $OTA_OFFSET "${OTAFILE}" $ESPTOOL_CMD write_flash $OTA_OFFSET "${OTAFILE}"
echo "Trying to flash ${SPIFFSFILE}, at offset ${OFFSET}" echo "Trying to flash ${SPIFFSFILE}, at offset ${OFFSET}"
$ESPTOOL_CMD ${ESPTOOL_WRITE_FLASH} $OFFSET "${SPIFFSFILE}" $ESPTOOL_CMD write_flash $OFFSET "${SPIFFSFILE}"
else else
show_help show_help

View File

@@ -20,17 +20,6 @@ else
exit 1 exit 1
fi fi
# esptool v5 supports commands with dashes and deprecates commands with
# underscores. Prior versions only support commands with underscores
if ${ESPTOOL_CMD} | grep --quiet write-flash
then
ESPTOOL_WRITE_FLASH=write-flash
ESPTOOL_READ_FLASH_STATUS=read-flash-status
else
ESPTOOL_WRITE_FLASH=write_flash
ESPTOOL_READ_FLASH_STATUS=read_flash_status
fi
# Usage info # Usage info
show_help() { show_help() {
cat << EOF cat << EOF
@@ -80,7 +69,7 @@ done
shift "$((OPTIND-1))" shift "$((OPTIND-1))"
if [ "$CHANGE_MODE" = true ]; then if [ "$CHANGE_MODE" = true ]; then
$ESPTOOL_CMD --baud $RESET_BAUD --after no_reset ${ESPTOOL_READ_FLASH_STATUS} $ESPTOOL_CMD --baud $RESET_BAUD --after no_reset read_flash_status
exit 0 exit 0
fi fi
@@ -91,7 +80,7 @@ fi
if [[ -f "$FILENAME" && "$FILENAME" != *.factory.bin ]]; then if [[ -f "$FILENAME" && "$FILENAME" != *.factory.bin ]]; then
echo "Trying to flash update ${FILENAME}" echo "Trying to flash update ${FILENAME}"
$ESPTOOL_CMD --baud $FLASH_BAUD ${ESPTOOL_WRITE_FLASH} $UPDATE_OFFSET "${FILENAME}" $ESPTOOL_CMD --baud $FLASH_BAUD write-flash $UPDATE_OFFSET "${FILENAME}"
else else
show_help show_help
echo "Invalid file: ${FILENAME}" echo "Invalid file: ${FILENAME}"

View File

@@ -87,9 +87,6 @@
</screenshots> </screenshots>
<releases> <releases>
<release version="2.7.19" date="2026-01-22">
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.19</url>
</release>
<release version="2.7.18" date="2026-01-02"> <release version="2.7.18" date="2026-01-02">
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.18</url> <url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.18</url>
</release> </release>

View File

@@ -301,8 +301,7 @@ if not should_skip_manifest and platform.name == "espressif32":
target_lfs = env.DataToBin( target_lfs = env.DataToBin(
join("$BUILD_DIR", "${ESP32_FS_IMAGE_NAME}"), "$PROJECT_DATA_DIR" join("$BUILD_DIR", "${ESP32_FS_IMAGE_NAME}"), "$PROJECT_DATA_DIR"
) )
# prepend the littlefs target to the mtjson dependencies mtjson_deps.append(target_lfs)
# mtjson_deps.insert(0, target_lfs)
if should_skip_manifest: if should_skip_manifest:
def skip_manifest(source, target, env): def skip_manifest(source, target, env):

View File

@@ -7,7 +7,7 @@
"extra_flags": [ "extra_flags": [
"-D CDEBYTE_EORA_S3", "-D CDEBYTE_EORA_S3",
"-D ARDUINO_USB_CDC_ON_BOOT=1", "-D ARDUINO_USB_CDC_ON_BOOT=1",
"-D ARDUINO_USB_MODE=1", "-D ARDUINO_USB_MODE=0",
"-D ARDUINO_RUNNING_CORE=1", "-D ARDUINO_RUNNING_CORE=1",
"-D ARDUINO_EVENT_RUNNING_CORE=1", "-D ARDUINO_EVENT_RUNNING_CORE=1",
"-D BOARD_HAS_PSRAM" "-D BOARD_HAS_PSRAM"

View File

@@ -6,7 +6,7 @@
"core": "esp32", "core": "esp32",
"extra_flags": [ "extra_flags": [
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1", "-DARDUINO_EVENT_RUNNING_CORE=1",
"-DBOARD_HAS_PSRAM" "-DBOARD_HAS_PSRAM"

View File

@@ -8,7 +8,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -9,7 +9,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -9,7 +9,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -9,7 +9,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -8,7 +8,7 @@
"extra_flags": [ "extra_flags": [
"-DHELTEC_WIRELESS_TRACKER", "-DHELTEC_WIRELESS_TRACKER",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -7,7 +7,7 @@
"core": "esp32", "core": "esp32",
"extra_flags": [ "extra_flags": [
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -8,7 +8,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=0" "-DARDUINO_EVENT_RUNNING_CORE=0"
], ],

View File

@@ -8,7 +8,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=0" "-DARDUINO_EVENT_RUNNING_CORE=0"
], ],

View File

@@ -9,7 +9,7 @@
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DLILYGO_TBEAM_1W", "-DLILYGO_TBEAM_1W",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -8,7 +8,7 @@
"extra_flags": [ "extra_flags": [
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -8,7 +8,7 @@
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DLILYGO_TBEAM_S3_CORE", "-DLILYGO_TBEAM_S3_CORE",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

View File

@@ -7,7 +7,7 @@
"extra_flags": [ "extra_flags": [
"-DLILYGO_T3S3_V1", "-DLILYGO_T3S3_V1",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1", "-DARDUINO_EVENT_RUNNING_CORE=1",
"-DBOARD_HAS_PSRAM" "-DBOARD_HAS_PSRAM"

View File

@@ -10,7 +10,7 @@
"-DBOARD_HAS_PSRAM", "-DBOARD_HAS_PSRAM",
"-DUNPHONE_SPIN=9", "-DUNPHONE_SPIN=9",
"-DARDUINO_USB_CDC_ON_BOOT=1", "-DARDUINO_USB_CDC_ON_BOOT=1",
"-DARDUINO_USB_MODE=1", "-DARDUINO_USB_MODE=0",
"-DARDUINO_RUNNING_CORE=1", "-DARDUINO_RUNNING_CORE=1",
"-DARDUINO_EVENT_RUNNING_CORE=1" "-DARDUINO_EVENT_RUNNING_CORE=1"
], ],

6
debian/changelog vendored
View File

@@ -1,9 +1,3 @@
meshtasticd (2.7.19.0) unstable; urgency=medium
* Version 2.7.19
-- GitHub Actions <github-actions[bot]@users.noreply.github.com> Thu, 22 Jan 2026 22:17:40 +0000
meshtasticd (2.7.18.0) unstable; urgency=medium meshtasticd (2.7.18.0) unstable; urgency=medium
* Version 2.7.18 * Version 2.7.18

View File

@@ -1,7 +0,0 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x640000,
app1, app, ota_1, 0x650000,0x640000,
spiffs, data, spiffs, 0xc90000,0x360000,
coredump, data, coredump,0xFF0000,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 0x640000
5 app1 app ota_1 0x650000 0x640000
6 spiffs data spiffs 0xc90000 0x360000
7 coredump data coredump 0xFF0000 0x10000

View File

@@ -1,7 +0,0 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x330000,
app1, app, ota_1, 0x340000,0x330000,
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 0x330000
5 app1 app ota_1 0x340000 0x330000
6 spiffs data spiffs 0x670000 0x180000
7 coredump data coredump 0x7F0000 0x10000

View File

@@ -70,6 +70,17 @@ def esp32_create_combined_bin(source, target, env):
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin) env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", esp32_create_combined_bin)
# Enable Newlib Nano formatting to save space esp32_kind = env.GetProjectOption("custom_esp32_kind")
# ...but allow printf float support (compromise) if esp32_kind == "esp32":
env.Append(LINKFLAGS=["--specs=nano.specs", "-u", "_printf_float"]) # Free up some IRAM by removing auxiliary SPI flash chip drivers.
# Wrapped stub symbols are defined in src/platform/esp32/iram-quirk.c.
env.Append(
LINKFLAGS=[
"-Wl,--wrap=esp_flash_chip_gd",
"-Wl,--wrap=esp_flash_chip_issi",
"-Wl,--wrap=esp_flash_chip_winbond",
]
)
else:
# For newer ESP32 targets, using newlib nano works better.
env.Append(LINKFLAGS=["--specs=nano.specs", "-u", "_printf_float"])

View File

@@ -43,11 +43,13 @@ class Esp32C3ExceptionDecoder(DeviceMonitorFilterBase):
self.enabled = self.setup_paths() self.enabled = self.setup_paths()
if self.config.get("env:" + self.environment, "build_type") != "debug": if self.config.get("env:" + self.environment, "build_type") != "debug":
print(""" print(
"""
Please build project in debug configuration to get more details about an exception. Please build project in debug configuration to get more details about an exception.
See https://docs.platformio.org/page/projectconf/build_configurations.html See https://docs.platformio.org/page/projectconf/build_configurations.html
""") """
)
return self return self

View File

@@ -2,7 +2,7 @@
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
[platformio] [platformio]
default_envs = heltec-v3 default_envs = tbeam
extra_configs = extra_configs =
variants/*/*.ini variants/*/*.ini

View File

@@ -151,8 +151,9 @@ extern "C" void logLegacy(const char *level, const char *fmt, ...);
#include <RAK13800_W5100S.h> #include <RAK13800_W5100S.h>
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#if HAS_WIFI #if HAS_WIFI

View File

@@ -20,13 +20,6 @@
#include "main.h" #include "main.h"
#include "meshUtils.h" #include "meshUtils.h"
#include "sleep.h" #include "sleep.h"
#ifdef ARCH_ESP32
// #include <driver/adc.h>
#include <esp_adc/adc_cali.h>
#include <esp_adc/adc_cali_scheme.h>
#include <esp_adc/adc_oneshot.h>
#include <esp_err.h>
#endif
#if defined(ARCH_PORTDUINO) #if defined(ARCH_PORTDUINO)
#include "api/WiFiServerAPI.h" #include "api/WiFiServerAPI.h"
@@ -45,8 +38,9 @@
#include <WiFi.h> #include <WiFi.h>
#endif #endif
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#endif #endif
@@ -58,86 +52,21 @@
#if defined(BATTERY_PIN) && defined(ARCH_ESP32) #if defined(BATTERY_PIN) && defined(ARCH_ESP32)
#ifndef BAT_MEASURE_ADC_UNIT // ADC1 is default #ifndef BAT_MEASURE_ADC_UNIT // ADC1 is default
static const adc_channel_t adc_channel = ADC_CHANNEL; static const adc1_channel_t adc_channel = ADC_CHANNEL;
static const adc_unit_t unit = ADC_UNIT_1; static const adc_unit_t unit = ADC_UNIT_1;
#else // ADC2 #else // ADC2
static const adc_channel_t adc_channel = ADC_CHANNEL; static const adc2_channel_t adc_channel = ADC_CHANNEL;
static const adc_unit_t unit = ADC_UNIT_2; static const adc_unit_t unit = ADC_UNIT_2;
RTC_NOINIT_ATTR uint64_t RTC_reg_b;
#endif // BAT_MEASURE_ADC_UNIT #endif // BAT_MEASURE_ADC_UNIT
static adc_oneshot_unit_handle_t adc_handle = nullptr; esp_adc_cal_characteristics_t *adc_characs = (esp_adc_cal_characteristics_t *)calloc(1, sizeof(esp_adc_cal_characteristics_t));
static adc_cali_handle_t adc_cali_handle = nullptr;
static bool adc_calibrated = false;
#ifndef ADC_ATTENUATION #ifndef ADC_ATTENUATION
static const adc_atten_t atten = ADC_ATTEN_DB_12; static const adc_atten_t atten = ADC_ATTEN_DB_12;
#else #else
static const adc_atten_t atten = ADC_ATTENUATION; static const adc_atten_t atten = ADC_ATTENUATION;
#endif #endif
#ifdef ADC_BITWIDTH
static const adc_bitwidth_t adc_width = ADC_BITWIDTH;
#else
static const adc_bitwidth_t adc_width = ADC_BITWIDTH_DEFAULT;
#endif
static int adcBitWidthToBits(adc_bitwidth_t width)
{
switch (width) {
case ADC_BITWIDTH_9:
return 9;
case ADC_BITWIDTH_10:
return 10;
case ADC_BITWIDTH_11:
return 11;
case ADC_BITWIDTH_12:
return 12;
#ifdef ADC_BITWIDTH_13
case ADC_BITWIDTH_13:
return 13;
#endif
default:
return 12;
}
}
static bool initAdcCalibration()
{
#if ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED
adc_cali_curve_fitting_config_t cali_config = {
.unit_id = unit,
.atten = atten,
.bitwidth = adc_width,
};
esp_err_t ret = adc_cali_create_scheme_curve_fitting(&cali_config, &adc_cali_handle);
if (ret == ESP_OK) {
LOG_INFO("ADC calibration: curve fitting enabled");
return true;
}
if (ret != ESP_ERR_NOT_SUPPORTED) {
LOG_WARN("ADC calibration: curve fitting failed: %s", esp_err_to_name(ret));
}
#endif
#if ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED
adc_cali_line_fitting_config_t cali_config = {
.unit_id = unit,
.atten = atten,
.bitwidth = adc_width,
.default_vref = DEFAULT_VREF,
};
esp_err_t ret = adc_cali_create_scheme_line_fitting(&cali_config, &adc_cali_handle);
if (ret == ESP_OK) {
LOG_INFO("ADC calibration: line fitting enabled");
return true;
}
if (ret != ESP_ERR_NOT_SUPPORTED) {
LOG_WARN("ADC calibration: line fitting failed: %s", esp_err_to_name(ret));
}
#endif
LOG_INFO("ADC calibration not supported; using approximate scaling");
return false;
}
#endif // BATTERY_PIN && ARCH_ESP32 #endif // BATTERY_PIN && ARCH_ESP32
#ifdef EXT_CHRG_DETECT #ifdef EXT_CHRG_DETECT
@@ -400,20 +329,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
battery_adcEnable(); battery_adcEnable();
#ifdef ARCH_ESP32 // ADC block for espressif platforms #ifdef ARCH_ESP32 // ADC block for espressif platforms
raw = espAdcRead(); raw = espAdcRead();
int voltage_mv = 0; scaled = esp_adc_cal_raw_to_voltage(raw, adc_characs);
if (adc_calibrated && adc_cali_handle) { scaled *= operativeAdcMultiplier;
if (adc_cali_raw_to_voltage(adc_cali_handle, raw, &voltage_mv) != ESP_OK) {
LOG_WARN("ADC calibration read failed; using raw value");
voltage_mv = 0;
}
}
if (voltage_mv == 0) {
// Fallback approximate conversion without calibration
const int bits = adcBitWidthToBits(adc_width);
const float max_code = powf(2.0f, bits) - 1.0f;
voltage_mv = (int)((raw / max_code) * DEFAULT_VREF);
}
scaled = voltage_mv * operativeAdcMultiplier;
#else // block for all other platforms #else // block for all other platforms
for (uint32_t i = 0; i < BATTERY_SENSE_SAMPLES; i++) { for (uint32_t i = 0; i < BATTERY_SENSE_SAMPLES; i++) {
raw += analogRead(BATTERY_PIN); raw += analogRead(BATTERY_PIN);
@@ -451,22 +368,51 @@ class AnalogBatteryLevel : public HasBatteryLevel
uint32_t raw = 0; uint32_t raw = 0;
uint8_t raw_c = 0; // raw reading counter uint8_t raw_c = 0; // raw reading counter
if (!adc_handle) { #ifndef BAT_MEASURE_ADC_UNIT // ADC1
LOG_ERROR("ADC oneshot handle not initialized");
return 0;
}
for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) { for (int i = 0; i < BATTERY_SENSE_SAMPLES; i++) {
int val = 0; int val_ = adc1_get_raw(adc_channel);
esp_err_t err = adc_oneshot_read(adc_handle, adc_channel, &val); if (val_ >= 0) { // save only valid readings
if (err == ESP_OK) { raw += val_;
raw += val;
raw_c++; raw_c++;
}
// delayMicroseconds(100);
}
#else // ADC2
#ifdef CONFIG_IDF_TARGET_ESP32S3 // ESP32S3
// ADC2 wifi bug workaround not required, breaks compile
// On ESP32S3, ADC2 can take turns with Wifi (?)
int32_t 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);
if (read_result == ESP_OK) {
raw += adc_buf;
raw_c++; // Count valid samples
} else { } else {
LOG_DEBUG("ADC read failed: %s", esp_err_to_name(err)); LOG_DEBUG("An attempt to sample ADC2 failed");
} }
} }
#else // Other ESP32
int32_t 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++;
}
#endif // BAT_MEASURE_ADC_UNIT
#endif // End BAT_MEASURE_ADC_UNIT
return (raw / (raw_c < 1 ? 1 : raw_c)); return (raw / (raw_c < 1 ? 1 : raw_c));
} }
#endif #endif
@@ -680,30 +626,40 @@ bool Power::analogInit()
#endif #endif
#ifdef ARCH_ESP32 // ESP32 needs special analog stuff #ifdef ARCH_ESP32 // ESP32 needs special analog stuff
adc_oneshot_unit_init_cfg_t init_config = {
.unit_id = unit,
};
if (!adc_handle) { #ifndef ADC_WIDTH // max resolution by default
esp_err_t err = adc_oneshot_new_unit(&init_config, &adc_handle); static const adc_bits_width_t width = ADC_WIDTH_BIT_12;
if (err != ESP_OK) { #else
LOG_ERROR("ADC oneshot init failed: %s", esp_err_to_name(err)); static const adc_bits_width_t width = ADC_WIDTH;
return false; #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
// 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);
// show ADC characterization base
if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP) {
LOG_INFO("ADC config based on Two Point values stored in eFuse");
} else if (val_type == ESP_ADC_CAL_VAL_EFUSE_VREF) {
LOG_INFO("ADC config based on reference voltage stored in eFuse");
} }
#ifdef CONFIG_IDF_TARGET_ESP32S3
adc_oneshot_chan_cfg_t config = { // ESP32S3
.atten = atten, else if (val_type == ESP_ADC_CAL_VAL_EFUSE_TP_FIT) {
.bitwidth = adc_width, LOG_INFO("ADC config based on Two Point values and fitting curve coefficients stored in eFuse");
}; }
#endif
esp_err_t err = adc_oneshot_config_channel(adc_handle, adc_channel, &config); else {
if (err != ESP_OK) { LOG_INFO("ADC config based on default reference voltage");
LOG_ERROR("ADC channel config failed: %s", esp_err_to_name(err));
return false;
} }
adc_calibrated = initAdcCalibration();
#endif // ARCH_ESP32 #endif // ARCH_ESP32
#ifdef ARCH_NRF52 #ifdef ARCH_NRF52

View File

@@ -155,10 +155,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
// Default system gain to 0 if not defined // Default system gain to 0 if not defined
#ifndef NUM_PA_POINTS
#define NUM_PA_POINTS 1
#endif
#ifndef TX_GAIN_LORA #ifndef TX_GAIN_LORA
#define TX_GAIN_LORA 0 #define TX_GAIN_LORA 0
#endif #endif

View File

@@ -6,6 +6,7 @@
#include "MessageStore.h" #include "MessageStore.h"
#include "NodeDB.h" #include "NodeDB.h"
#include "UIRenderer.h" #include "UIRenderer.h"
#include "configuration.h"
#include "gps/RTC.h" #include "gps/RTC.h"
#include "graphics/Screen.h" #include "graphics/Screen.h"
#include "graphics/ScreenFonts.h" #include "graphics/ScreenFonts.h"
@@ -19,6 +20,7 @@
// External declarations // External declarations
extern bool hasUnreadMessage; extern bool hasUnreadMessage;
extern meshtastic_DeviceState devicestate;
extern graphics::Screen *screen; extern graphics::Screen *screen;
using graphics::Emote; using graphics::Emote;
@@ -47,7 +49,7 @@ static inline size_t utf8CharLen(uint8_t c)
} }
// Remove variation selectors (FE0F) and skin tone modifiers from emoji so they match your labels // Remove variation selectors (FE0F) and skin tone modifiers from emoji so they match your labels
static std::string normalizeEmoji(const std::string &s) std::string normalizeEmoji(const std::string &s)
{ {
std::string out; std::string out;
for (size_t i = 0; i < s.size();) { for (size_t i = 0; i < s.size();) {
@@ -80,7 +82,6 @@ uint32_t pauseStart = 0;
bool waitingToReset = false; bool waitingToReset = false;
bool scrollStarted = false; bool scrollStarted = false;
static bool didReset = false; static bool didReset = false;
static constexpr int MESSAGE_BLOCK_GAP = 6;
void scrollUp() void scrollUp()
{ {
@@ -110,6 +111,22 @@ void scrollDown()
void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount) void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string &line, const Emote *emotes, int emoteCount)
{ {
std::string renderLine;
for (size_t i = 0; i < line.size();) {
uint8_t c = (uint8_t)line[i];
size_t len = utf8CharLen(c);
if (c == 0xEF && i + 2 < line.size() && (uint8_t)line[i + 1] == 0xB8 && (uint8_t)line[i + 2] == 0x8F) {
i += 3;
continue;
}
if (c == 0xF0 && i + 3 < line.size() && (uint8_t)line[i + 1] == 0x9F && (uint8_t)line[i + 2] == 0x8F &&
((uint8_t)line[i + 3] >= 0xBB && (uint8_t)line[i + 3] <= 0xBF)) {
i += 4;
continue;
}
renderLine.append(line, i, len);
i += len;
}
int cursorX = x; int cursorX = x;
const int fontHeight = FONT_HEIGHT_SMALL; const int fontHeight = FONT_HEIGHT_SMALL;
@@ -186,7 +203,8 @@ void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string
// Render the emote (if found) // Render the emote (if found)
if (matchedEmote && i == nextEmotePos) { if (matchedEmote && i == nextEmotePos) {
int iconY = y + (lineHeight - matchedEmote->height) / 2; // Vertically center emote relative to font baseline (not just midline)
int iconY = fontY + (fontHeight - matchedEmote->height) / 2;
display->drawXbm(cursorX, iconY, matchedEmote->width, matchedEmote->height, matchedEmote->bitmap); display->drawXbm(cursorX, iconY, matchedEmote->width, matchedEmote->height, matchedEmote->bitmap);
cursorX += matchedEmote->width + 1; cursorX += matchedEmote->width + 1;
i += emojiLen; i += emojiLen;
@@ -405,102 +423,6 @@ static inline int getRenderedLineWidth(OLEDDisplay *display, const std::string &
return totalWidth; return totalWidth;
} }
struct MessageBlock {
size_t start;
size_t end;
bool mine;
};
static int getDrawnLinePixelBottom(int lineTopY, const std::string &line, bool isHeaderLine)
{
if (isHeaderLine) {
return lineTopY + (FONT_HEIGHT_SMALL - 1);
}
int tallest = FONT_HEIGHT_SMALL;
for (int e = 0; e < numEmotes; ++e) {
if (line.find(emotes[e].label) != std::string::npos) {
if (emotes[e].height > tallest)
tallest = emotes[e].height;
}
}
const int lineHeight = std::max(FONT_HEIGHT_SMALL, tallest);
const int iconTop = lineTopY + (lineHeight - tallest) / 2;
return iconTop + tallest - 1;
}
static void drawRoundedRectOutline(OLEDDisplay *display, int x, int y, int w, int h, int r)
{
if (w <= 1 || h <= 1)
return;
if (r < 0)
r = 0;
int maxR = (std::min(w, h) / 2) - 1;
if (r > maxR)
r = maxR;
if (r == 0) {
display->drawRect(x, y, w, h);
return;
}
const int x0 = x;
const int y0 = y;
const int x1 = x + w - 1;
const int y1 = y + h - 1;
// sides
if (x0 + r <= x1 - r) {
display->drawLine(x0 + r, y0, x1 - r, y0); // top
display->drawLine(x0 + r, y1, x1 - r, y1); // bottom
}
if (y0 + r <= y1 - r) {
display->drawLine(x0, y0 + r, x0, y1 - r); // left
display->drawLine(x1, y0 + r, x1, y1 - r); // right
}
// corner arcs
display->drawCircleQuads(x0 + r, y0 + r, r, 2); // top left
display->drawCircleQuads(x1 - r, y0 + r, r, 1); // top right
display->drawCircleQuads(x1 - r, y1 - r, r, 8); // bottom right
display->drawCircleQuads(x0 + r, y1 - r, r, 4); // bottom left
}
static std::vector<MessageBlock> buildMessageBlocks(const std::vector<bool> &isHeaderVec, const std::vector<bool> &isMineVec)
{
std::vector<MessageBlock> blocks;
if (isHeaderVec.empty())
return blocks;
size_t start = 0;
bool mine = isMineVec[0];
for (size_t i = 1; i < isHeaderVec.size(); ++i) {
if (isHeaderVec[i]) {
MessageBlock b;
b.start = start;
b.end = i - 1;
b.mine = mine;
blocks.push_back(b);
start = i;
mine = isMineVec[i];
}
}
MessageBlock last;
last.start = start;
last.end = isHeaderVec.size() - 1;
last.mine = mine;
blocks.push_back(last);
return blocks;
}
static void drawMessageScrollbar(OLEDDisplay *display, int visibleHeight, int totalHeight, int scrollOffset, int startY) static void drawMessageScrollbar(OLEDDisplay *display, int visibleHeight, int totalHeight, int scrollOffset, int startY)
{ {
if (totalHeight <= visibleHeight) if (totalHeight <= visibleHeight)
@@ -560,14 +482,9 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
constexpr int LEFT_MARGIN = 2; constexpr int LEFT_MARGIN = 2;
constexpr int RIGHT_MARGIN = 2; constexpr int RIGHT_MARGIN = 2;
constexpr int SCROLLBAR_WIDTH = 3; constexpr int SCROLLBAR_WIDTH = 3;
constexpr int BUBBLE_PAD_X = 3;
constexpr int BUBBLE_PAD_Y = 4;
constexpr int BUBBLE_RADIUS = 4;
constexpr int BUBBLE_MIN_W = 24;
constexpr int BUBBLE_TEXT_INDENT = 2;
// Derived widths const int leftTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN;
const int leftTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - (BUBBLE_PAD_X * 2);
const int rightTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - SCROLLBAR_WIDTH; const int rightTextWidth = SCREEN_WIDTH - LEFT_MARGIN - RIGHT_MARGIN - SCROLLBAR_WIDTH;
// Title string depending on mode // Title string depending on mode
@@ -630,28 +547,7 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
char chanType[32] = ""; char chanType[32] = "";
if (currentMode == ThreadMode::ALL) { if (currentMode == ThreadMode::ALL) {
if (m.dest == NODENUM_BROADCAST) { if (m.dest == NODENUM_BROADCAST) {
const char *name = channels.getName(m.channelIndex); snprintf(chanType, sizeof(chanType), "#%s", channels.getName(m.channelIndex));
if (currentResolution == ScreenResolution::Low || currentResolution == ScreenResolution::UltraLow) {
if (strcmp(name, "ShortTurbo") == 0)
name = "ShortT";
else if (strcmp(name, "ShortSlow") == 0)
name = "ShortS";
else if (strcmp(name, "ShortFast") == 0)
name = "ShortF";
else if (strcmp(name, "MediumSlow") == 0)
name = "MedS";
else if (strcmp(name, "MediumFast") == 0)
name = "MedF";
else if (strcmp(name, "LongSlow") == 0)
name = "LongS";
else if (strcmp(name, "LongFast") == 0)
name = "LongF";
else if (strcmp(name, "LongTurbo") == 0)
name = "LongT";
else if (strcmp(name, "LongMod") == 0)
name = "LongM";
}
snprintf(chanType, sizeof(chanType), "#%s", name);
} else { } else {
snprintf(chanType, sizeof(chanType), "(DM)"); snprintf(chanType, sizeof(chanType), "(DM)");
} }
@@ -718,8 +614,8 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
} }
// Shrink Sender name if needed // Shrink Sender name if needed
int availWidth = (mine ? rightTextWidth : leftTextWidth) - display->getStringWidth(timeBuf) - int availWidth = SCREEN_WIDTH - display->getStringWidth(timeBuf) - display->getStringWidth(chanType) -
display->getStringWidth(chanType) - display->getStringWidth(" @..."); display->getStringWidth(" @...") - 10;
if (availWidth < 0) if (availWidth < 0)
availWidth = 0; availWidth = 0;
@@ -771,8 +667,6 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
cachedLines = allLines; cachedLines = allLines;
cachedHeights = calculateLineHeights(cachedLines, emotes, isHeader); cachedHeights = calculateLineHeights(cachedLines, emotes, isHeader);
std::vector<MessageBlock> blocks = buildMessageBlocks(isHeader, isMine);
// Scrolling logic (unchanged) // Scrolling logic (unchanged)
int totalHeight = 0; int totalHeight = 0;
for (size_t i = 0; i < cachedHeights.size(); ++i) for (size_t i = 0; i < cachedHeights.size(); ++i)
@@ -820,123 +714,12 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
int finalScroll = (int)scrollY; int finalScroll = (int)scrollY;
int yOffset = -finalScroll + getTextPositions(display)[1]; int yOffset = -finalScroll + getTextPositions(display)[1];
const int contentTop = getTextPositions(display)[1];
const int contentBottom = scrollBottom; // already excludes nav line
const int rightEdge = SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN;
const int bubbleGapY = std::max(1, MESSAGE_BLOCK_GAP / 2);
std::vector<int> lineTop;
lineTop.resize(cachedLines.size());
{
int acc = 0;
for (size_t i = 0; i < cachedLines.size(); ++i) {
lineTop[i] = yOffset + acc;
acc += cachedHeights[i];
}
}
// Draw bubbles
for (size_t bi = 0; bi < blocks.size(); ++bi) {
const auto &b = blocks[bi];
if (b.start >= cachedLines.size() || b.end >= cachedLines.size() || b.start > b.end)
continue;
int visualTop = lineTop[b.start];
int topY;
if (isHeader[b.start]) {
// Header start
constexpr int BUBBLE_PAD_TOP_HEADER = 1; // try 1 or 2
topY = visualTop - BUBBLE_PAD_TOP_HEADER;
} else {
// Body start
bool thisLineHasEmote = false;
for (int e = 0; e < numEmotes; ++e) {
if (cachedLines[b.start].find(emotes[e].label) != std::string::npos) {
thisLineHasEmote = true;
break;
}
}
if (thisLineHasEmote) {
constexpr int EMOTE_PADDING_ABOVE = 4;
visualTop -= EMOTE_PADDING_ABOVE;
}
topY = visualTop - BUBBLE_PAD_Y;
}
int visualBottom = getDrawnLinePixelBottom(lineTop[b.end], cachedLines[b.end], isHeader[b.end]);
int bottomY = visualBottom + BUBBLE_PAD_Y;
if (bi + 1 < blocks.size()) {
int nextHeaderIndex = (int)blocks[bi + 1].start;
int nextTop = lineTop[nextHeaderIndex];
int maxBottom = nextTop - 1 - bubbleGapY;
if (bottomY > maxBottom)
bottomY = maxBottom;
}
if (bottomY <= topY + 2)
continue;
if (bottomY < contentTop || topY > contentBottom - 1)
continue;
int maxLineW = 0;
for (size_t i = b.start; i <= b.end; ++i) {
int w = 0;
if (isHeader[i]) {
w = display->getStringWidth(cachedLines[i].c_str());
if (b.mine)
w += 12; // room for ACK/NACK/relay mark
} else {
w = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);
}
if (w > maxLineW)
maxLineW = w;
}
int bubbleW = std::max(BUBBLE_MIN_W, maxLineW + (BUBBLE_PAD_X * 2));
int bubbleH = (bottomY - topY) + 1;
int bubbleX = 0;
if (b.mine) {
bubbleX = rightEdge - bubbleW;
} else {
bubbleX = x;
}
if (bubbleX < x)
bubbleX = x;
if (bubbleX + bubbleW > rightEdge)
bubbleW = std::max(1, rightEdge - bubbleX);
if (bubbleW > 1 && bubbleH > 1) {
int r = BUBBLE_RADIUS;
int maxR = (std::min(bubbleW, bubbleH) / 2) - 1;
if (maxR < 0)
maxR = 0;
if (r > maxR)
r = maxR;
drawRoundedRectOutline(display, bubbleX, topY, bubbleW, bubbleH, r);
const int extra = 3;
const int rr = r + extra;
int x1 = bubbleX + bubbleW - 1;
int y1 = topY + bubbleH - 1;
if (!b.mine) {
// top-left corner square
display->drawLine(bubbleX, topY, bubbleX + rr, topY);
display->drawLine(bubbleX, topY, bubbleX, topY + rr);
} else {
// bottom-right corner square
display->drawLine(x1 - rr, y1, x1, y1);
display->drawLine(x1, y1 - rr, x1, y1);
}
}
}
// Render visible lines // Render visible lines
int lineY = yOffset;
for (size_t i = 0; i < cachedLines.size(); ++i) { for (size_t i = 0; i < cachedLines.size(); ++i) {
int lineY = yOffset;
for (size_t j = 0; j < i; ++j)
lineY += cachedHeights[j];
if (lineY > -cachedHeights[i] && lineY < scrollBottom) { if (lineY > -cachedHeights[i] && lineY < scrollBottom) {
if (isHeader[i]) { if (isHeader[i]) {
@@ -945,28 +728,14 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
int headerX; int headerX;
if (isMine[i]) { if (isMine[i]) {
// push header left to avoid overlap with scrollbar // push header left to avoid overlap with scrollbar
headerX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - w - BUBBLE_TEXT_INDENT; headerX = SCREEN_WIDTH - w - SCROLLBAR_WIDTH - RIGHT_MARGIN;
if (headerX < LEFT_MARGIN) if (headerX < LEFT_MARGIN)
headerX = LEFT_MARGIN; headerX = LEFT_MARGIN;
} else { } else {
headerX = x + BUBBLE_PAD_X + BUBBLE_TEXT_INDENT; headerX = x;
} }
display->drawString(headerX, lineY, cachedLines[i].c_str()); display->drawString(headerX, lineY, cachedLines[i].c_str());
// Draw underline just under header text
int underlineY = lineY + FONT_HEIGHT_SMALL;
int underlineW = w;
int maxW = rightEdge - headerX;
if (maxW < 0)
maxW = 0;
if (underlineW > maxW)
underlineW = maxW;
for (int px = 0; px < underlineW; ++px) {
display->setPixel(headerX + px, underlineY);
}
// Draw ACK/NACK mark for our own messages // Draw ACK/NACK mark for our own messages
if (isMine[i]) { if (isMine[i]) {
int markX = headerX - 10; int markX = headerX - 10;
@@ -984,28 +753,32 @@ void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
// AckStatus::NONE → show nothing // AckStatus::NONE → show nothing
} }
// Draw underline just under header text
int underlineY = lineY + FONT_HEIGHT_SMALL;
for (int px = 0; px < w; ++px) {
display->setPixel(headerX + px, underlineY);
}
} else { } else {
// Render message line // Render message line
if (isMine[i]) { if (isMine[i]) {
// Calculate actual rendered width including emotes // Calculate actual rendered width including emotes
int renderedWidth = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes); int renderedWidth = getRenderedLineWidth(display, cachedLines[i], emotes, numEmotes);
int rightX = (SCREEN_WIDTH - SCROLLBAR_WIDTH - RIGHT_MARGIN) - renderedWidth - BUBBLE_TEXT_INDENT; int rightX = SCREEN_WIDTH - renderedWidth - SCROLLBAR_WIDTH - RIGHT_MARGIN;
if (rightX < LEFT_MARGIN) if (rightX < LEFT_MARGIN)
rightX = LEFT_MARGIN; rightX = LEFT_MARGIN;
drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes); drawStringWithEmotes(display, rightX, lineY, cachedLines[i], emotes, numEmotes);
} else { } else {
drawStringWithEmotes(display, x + BUBBLE_PAD_X + BUBBLE_TEXT_INDENT, lineY, cachedLines[i], emotes, drawStringWithEmotes(display, x, lineY, cachedLines[i], emotes, numEmotes);
numEmotes);
} }
} }
} }
lineY += cachedHeights[i];
} }
int totalContentHeight = totalHeight;
int visibleHeight = usableHeight;
// Draw scrollbar // Draw scrollbar
drawMessageScrollbar(display, usableHeight, totalHeight, finalScroll, getTextPositions(display)[1]); drawMessageScrollbar(display, visibleHeight, totalContentHeight, finalScroll, getTextPositions(display)[1]);
graphics::drawCommonHeader(display, x, y, titleStr); graphics::drawCommonHeader(display, x, y, titleStr);
graphics::drawCommonFooter(display, x, y); graphics::drawCommonFooter(display, x, y);
} }
@@ -1068,6 +841,7 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
constexpr int HEADER_UNDERLINE_GAP = 0; // space between underline and first body line constexpr int HEADER_UNDERLINE_GAP = 0; // space between underline and first body line
constexpr int HEADER_UNDERLINE_PIX = 1; // underline thickness (1px row drawn) constexpr int HEADER_UNDERLINE_PIX = 1; // underline thickness (1px row drawn)
constexpr int BODY_LINE_LEADING = -4; // default vertical leading for normal body lines constexpr int BODY_LINE_LEADING = -4; // default vertical leading for normal body lines
constexpr int MESSAGE_BLOCK_GAP = 4; // gap after a message block before a new header
constexpr int EMOTE_PADDING_ABOVE = 4; // space above emote line (added to line above) constexpr int EMOTE_PADDING_ABOVE = 4; // space above emote line (added to line above)
constexpr int EMOTE_PADDING_BELOW = 3; // space below emote line (added to emote line) constexpr int EMOTE_PADDING_BELOW = 3; // space below emote line (added to emote line)
@@ -1077,7 +851,6 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
for (size_t idx = 0; idx < lines.size(); ++idx) { for (size_t idx = 0; idx < lines.size(); ++idx) {
const auto &line = lines[idx]; const auto &line = lines[idx];
const int baseHeight = FONT_HEIGHT_SMALL; const int baseHeight = FONT_HEIGHT_SMALL;
int lineHeight = baseHeight;
// Detect if THIS line or NEXT line contains an emote // Detect if THIS line or NEXT line contains an emote
bool hasEmote = false; bool hasEmote = false;
@@ -1099,6 +872,8 @@ std::vector<int> calculateLineHeights(const std::vector<std::string> &lines, con
} }
} }
int lineHeight = baseHeight;
if (isHeaderVec[idx]) { if (isHeaderVec[idx]) {
// Header line spacing // Header line spacing
lineHeight = baseHeight + HEADER_UNDERLINE_PIX + HEADER_UNDERLINE_GAP; lineHeight = baseHeight + HEADER_UNDERLINE_PIX + HEADER_UNDERLINE_GAP;
@@ -1147,7 +922,7 @@ void handleNewMessage(OLEDDisplay *display, const StoredMessage &sm, const mesht
// Banner logic // Banner logic
const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet.from); const meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(packet.from);
char longName[48] = "?"; char longName[48] = "???";
if (node && node->user.long_name) { if (node && node->user.long_name) {
strncpy(longName, node->user.long_name, sizeof(longName) - 1); strncpy(longName, node->user.long_name, sizeof(longName) - 1);
longName[sizeof(longName) - 1] = '\0'; longName[sizeof(longName) - 1] = '\0';

View File

@@ -50,14 +50,12 @@ void InkHUD::MessageStore::saveToFlash()
// For each message // For each message
for (uint8_t i = 0; i < messages.size() && i < MAX_MESSAGES_SAVED; i++) { for (uint8_t i = 0; i < messages.size() && i < MAX_MESSAGES_SAVED; i++) {
Message &m = messages.at(i); Message &m = messages.at(i);
f.write((uint8_t *)&m.timestamp, sizeof(m.timestamp)); // Write timestamp. 4 bytes f.write((uint8_t *)&m.timestamp, sizeof(m.timestamp)); // Write timestamp. 4 bytes
f.write((uint8_t *)&m.sender, sizeof(m.sender)); // Write sender NodeId. 4 Bytes f.write((uint8_t *)&m.sender, sizeof(m.sender)); // Write sender NodeId. 4 Bytes
f.write((uint8_t *)&m.channelIndex, sizeof(m.channelIndex)); // Write channel index. 1 Byte f.write((uint8_t *)&m.channelIndex, sizeof(m.channelIndex)); // Write channel index. 1 Byte
f.write((uint8_t *)m.text.c_str(), f.write((uint8_t *)m.text.c_str(), min(MAX_MESSAGE_SIZE, m.text.size())); // Write message text. Variable length
std::min<size_t>(MAX_MESSAGE_SIZE, m.text.size())); // Write message text. Variable length f.write('\0'); // Append null term
f.write('\0'); // Append null term LOG_DEBUG("Wrote message %u, length %u, text \"%s\"", (uint32_t)i, min(MAX_MESSAGE_SIZE, m.text.size()), m.text.c_str());
LOG_DEBUG("Wrote message %u, length %u, text \"%s\"", (uint32_t)i, std::min<size_t>(MAX_MESSAGE_SIZE, m.text.size()),
m.text.c_str());
} }
// Release firmware's SPI lock, because SafeFile::close needs it // Release firmware's SPI lock, because SafeFile::close needs it

View File

@@ -13,8 +13,6 @@
#ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE #ifdef INPUTBROKER_EXPRESSLRSFIVEWAY_TYPE
// REVISIT esp_adc_cal.h
// "legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h"
#include <esp_adc_cal.h> #include <esp_adc_cal.h>
#include <soc/adc_channel.h> #include <soc/adc_channel.h>

View File

@@ -68,7 +68,7 @@ TLoraPagerKeyboard::TLoraPagerKeyboard()
: TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(-1), next_key(-1), : TCA8418KeyboardBase(_TCA8418_ROWS, _TCA8418_COLS), modifierFlag(0), last_modifier_time(0), last_key(-1), next_key(-1),
last_tap(0L), char_idx(0), tap_interval(0) last_tap(0L), char_idx(0), tap_interval(0)
{ {
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
ledcAttach(KB_BL_PIN, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH); ledcAttach(KB_BL_PIN, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH);
#else #else
ledcSetup(LEDC_BACKLIGHT_CHANNEL, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH); ledcSetup(LEDC_BACKLIGHT_CHANNEL, LEDC_BACKLIGHT_FREQ, LEDC_BACKLIGHT_BIT_WIDTH);
@@ -108,7 +108,7 @@ void TLoraPagerKeyboard::setBacklight(bool on)
uint32_t _brightness = 0; uint32_t _brightness = 0;
if (on) if (on)
_brightness = brightness; _brightness = brightness;
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
ledcWrite(KB_BL_PIN, _brightness); ledcWrite(KB_BL_PIN, _brightness);
#else #else
ledcWrite(LEDC_BACKLIGHT_CHANNEL, _brightness); ledcWrite(LEDC_BACKLIGHT_CHANNEL, _brightness);

View File

@@ -666,24 +666,18 @@ void RadioInterface::limitPower(int8_t loraMaxPower)
power = maxPower; power = maxPower;
} }
#ifdef ARCH_PORTDUINO #ifndef NUM_PA_POINTS
size_t num_pa_points = portduino_config.num_pa_points; if (TX_GAIN_LORA > 0 && !devicestate.owner.is_licensed) {
const uint16_t *tx_gain = portduino_config.tx_gain_lora; LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, TX_GAIN_LORA);
power -= TX_GAIN_LORA;
}
#else #else
size_t num_pa_points = NUM_PA_POINTS; if (!devicestate.owner.is_licensed) {
const uint16_t tx_gain[NUM_PA_POINTS] = {TX_GAIN_LORA};
#endif
if (num_pa_points == 1) {
if (tx_gain[0] > 0 && !devicestate.owner.is_licensed) {
LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[0]);
power -= tx_gain[0];
}
} else if (!devicestate.owner.is_licensed) {
// we have an array of PA gain values. Find the highest power setting that works. // we have an array of PA gain values. Find the highest power setting that works.
for (int radio_dbm = 0; radio_dbm < num_pa_points; radio_dbm++) { const uint16_t tx_gain[NUM_PA_POINTS] = {TX_GAIN_LORA};
for (int radio_dbm = 0; radio_dbm < NUM_PA_POINTS; radio_dbm++) {
if (((radio_dbm + tx_gain[radio_dbm]) > power) || if (((radio_dbm + tx_gain[radio_dbm]) > power) ||
((radio_dbm == (num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) { ((radio_dbm == (NUM_PA_POINTS - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) {
// we've exceeded the power limit, or hit the max we can do // we've exceeded the power limit, or hit the max we can do
LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[radio_dbm]); LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[radio_dbm]);
power -= tx_gain[radio_dbm]; power -= tx_gain[radio_dbm];
@@ -691,7 +685,7 @@ void RadioInterface::limitPower(int8_t loraMaxPower)
} }
} }
} }
#endif
if (power > loraMaxPower) // Clamp power to maximum defined level if (power > loraMaxPower) // Clamp power to maximum defined level
power = loraMaxPower; power = loraMaxPower;

View File

@@ -3,8 +3,9 @@
#include "ServerAPI.h" #include "ServerAPI.h"
#include <WiFi.h> #include <WiFi.h>
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
/** /**

View File

@@ -12,8 +12,9 @@
#include <WebServer.h> #include <WebServer.h>
#include <WiFi.h> #include <WiFi.h>
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32

View File

@@ -12,8 +12,9 @@
#include <AsyncUDP.h> #include <AsyncUDP.h>
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#define UDP_MULTICAST_DEFAUL_PORT 4403 // Default port for UDP multicast is same as TCP api server #define UDP_MULTICAST_DEFAUL_PORT 4403 // Default port for UDP multicast is same as TCP api server

View File

@@ -10,8 +10,9 @@
#include "target_specific.h" #include "target_specific.h"
#include <WiFi.h> #include <WiFi.h>
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#include <WiFiUdp.h> #include <WiFiUdp.h>

View File

@@ -9,8 +9,9 @@
#include <WiFi.h> #include <WiFi.h>
#endif #endif
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
extern bool needReconnect; extern bool needReconnect;

View File

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

View File

@@ -19,8 +19,9 @@
#include "mesh/wifi/WiFiAPClient.h" #include "mesh/wifi/WiFiAPClient.h"
#include <WiFi.h> #include <WiFi.h>
#endif #endif
#if HAS_ETHERNET && defined(ARCH_ESP32) #if HAS_ETHERNET && defined(USE_WS5500)
#include <ETH.h> #include <ETHClass2.h>
#define ETH ETH2
#endif // HAS_ETHERNET #endif // HAS_ETHERNET
#include "Default.h" #include "Default.h"
#if !defined(ARCH_NRF52) || NRF52_USE_JSON #if !defined(ARCH_NRF52) || NRF52_USE_JSON

View File

@@ -1,11 +0,0 @@
/* Arduino fix: catch esp_event's orphaned .text.handler_execute section and align to 4 bytes */
SECTIONS
{
.text.handler_execute :
{
KEEP(*(.text.handler_execute))
KEEP(*(.text.handler_execute.*))
. = ALIGN(4);
}
}
INSERT AFTER .flash.text;

View File

@@ -160,10 +160,9 @@ void esp32Setup()
// #define APP_WATCHDOG_SECS 45 // #define APP_WATCHDOG_SECS 45
#define APP_WATCHDOG_SECS 90 #define APP_WATCHDOG_SECS 90
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0) #ifdef CONFIG_IDF_TARGET_ESP32C6
esp_task_wdt_config_t *wdt_config = (esp_task_wdt_config_t *)malloc(sizeof(esp_task_wdt_config_t)); 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->timeout_ms = APP_WATCHDOG_SECS * 1000;
wdt_config->idle_core_mask = 1 << 1;
wdt_config->trigger_panic = true; wdt_config->trigger_panic = true;
res = esp_task_wdt_init(wdt_config); res = esp_task_wdt_init(wdt_config);
assert(res == ESP_OK); assert(res == ESP_OK);
@@ -251,10 +250,8 @@ void cpuDeepSleep(uint32_t msecToWake)
#endif // #end ESP32S3_WAKE_TYPE #endif // #end ESP32S3_WAKE_TYPE
#endif #endif
#if SOC_PM_SUPPORT_RTC_PERIPH_PD
// We want RTC peripherals to stay on // We want RTC peripherals to stay on
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
#endif
esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs esp_sleep_enable_timer_wakeup(msecToWake * 1000ULL); // call expects usecs
esp_deep_sleep_start(); // TBD mA sleep current (battery) esp_deep_sleep_start(); // TBD mA sleep current (battery)

View File

@@ -240,14 +240,6 @@ int NRF52Bluetooth::getRssi()
{ {
return 0; // FIXME figure out where to source this return 0; // FIXME figure out where to source this
} }
// Valid BLE TX power levels as per nRF52840 Product Specification are: "-20 to +8 dBm TX power, configurable in 4 dB steps".
// See https://docs.nordicsemi.com/bundle/ps_nrf52840/page/keyfeatures_html5.html
#define VALID_BLE_TX_POWER(x) \
((x) == -20 || (x) == -16 || (x) == -12 || \
(x) == -8 || (x) == -4 || (x) == 0 || \
(x) == 4 || (x) == 8)
void NRF52Bluetooth::setup() void NRF52Bluetooth::setup()
{ {
// Initialise the Bluefruit module // Initialise the Bluefruit module
@@ -259,9 +251,6 @@ void NRF52Bluetooth::setup()
Bluefruit.Advertising.stop(); Bluefruit.Advertising.stop();
Bluefruit.Advertising.clearData(); Bluefruit.Advertising.clearData();
Bluefruit.ScanResponse.clearData(); Bluefruit.ScanResponse.clearData();
#if defined(NRF52_BLE_TX_POWER) && VALID_BLE_TX_POWER(NRF52_BLE_TX_POWER)
Bluefruit.setTxPower(NRF52_BLE_TX_POWER);
#endif
if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) { if (config.bluetooth.mode != meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN) {
configuredPasskey = config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN configuredPasskey = config.bluetooth.mode == meshtastic_Config_BluetoothConfig_PairingMode_FIXED_PIN
? config.bluetooth.fixed_pin ? config.bluetooth.fixed_pin

View File

@@ -61,12 +61,11 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
{ {
switch (key) { switch (key) {
case 'p': case 'p':
if (sscanf(arg, "%d", &TCPPort) < 1) { if (sscanf(arg, "%d", &TCPPort) < 1)
return ARGP_ERR_UNKNOWN; return ARGP_ERR_UNKNOWN;
} else { else
checkConfigPort = false; checkConfigPort = false;
printf("Using config file %d\n", TCPPort); printf("Using config file %d\n", TCPPort);
}
break; break;
case 'c': case 'c':
configPath = arg; configPath = arg;
@@ -650,19 +649,6 @@ bool loadConfig(const char *configPath)
if (yamlConfig["Lora"]["RF95_MAX_POWER"]) if (yamlConfig["Lora"]["RF95_MAX_POWER"])
portduino_config.rf95_max_power = yamlConfig["Lora"]["RF95_MAX_POWER"].as<int>(20); portduino_config.rf95_max_power = yamlConfig["Lora"]["RF95_MAX_POWER"].as<int>(20);
if (yamlConfig["Lora"]["TX_GAIN_LORA"]) {
YAML::Node tx_gain_node = yamlConfig["Lora"]["TX_GAIN_LORA"];
if (tx_gain_node.IsSequence() && tx_gain_node.size() != 0) {
portduino_config.num_pa_points = min(tx_gain_node.size(), std::size(portduino_config.tx_gain_lora));
for (int i = 0; i < portduino_config.num_pa_points; i++) {
portduino_config.tx_gain_lora[i] = tx_gain_node[i].as<int>();
}
} else {
portduino_config.num_pa_points = 1;
portduino_config.tx_gain_lora[0] = tx_gain_node.as<int>(0);
}
}
if (portduino_config.lora_module != use_autoconf && portduino_config.lora_module != use_simradio && if (portduino_config.lora_module != use_autoconf && portduino_config.lora_module != use_simradio &&
!portduino_config.force_simradio) { !portduino_config.force_simradio) {
portduino_config.dio2_as_rf_switch = yamlConfig["Lora"]["DIO2_AS_RF_SWITCH"].as<bool>(false); portduino_config.dio2_as_rf_switch = yamlConfig["Lora"]["DIO2_AS_RF_SWITCH"].as<bool>(false);
@@ -888,8 +874,10 @@ bool loadConfig(const char *configPath)
} }
if (checkConfigPort) { if (checkConfigPort) {
portduino_config.api_port = (yamlConfig["General"]["APIPort"]).as<int>(-1); portduino_config.api_port = (yamlConfig["General"]["APIPort"]).as<int>(-1);
if (portduino_config.api_port != -1 && portduino_config.api_port > 1023 && portduino_config.api_port < 65536) { if (portduino_config.api_port != -1 &&
TCPPort = (portduino_config.api_port); portduino_config.api_port > 1023 &&
portduino_config.api_port < 65536) {
TCPPort = (portduino_config.api_port);
} }
} }
portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>(""); portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>("");

View File

@@ -91,8 +91,6 @@ extern struct portduino_config_struct {
int lora_usb_pid = 0x5512; int lora_usb_pid = 0x5512;
int lora_usb_vid = 0x1A86; int lora_usb_vid = 0x1A86;
int spiSpeed = 2000000; int spiSpeed = 2000000;
int num_pa_points = 1; // default to 1 point, with 0 gain
uint16_t tx_gain_lora[22] = {0};
pinMapping lora_cs_pin = {"Lora", "CS"}; pinMapping lora_cs_pin = {"Lora", "CS"};
pinMapping lora_irq_pin = {"Lora", "IRQ"}; pinMapping lora_irq_pin = {"Lora", "IRQ"};
pinMapping lora_busy_pin = {"Lora", "Busy"}; pinMapping lora_busy_pin = {"Lora", "Busy"};
@@ -233,17 +231,6 @@ extern struct portduino_config_struct {
out << YAML::Key << "LR1120_MAX_POWER" << YAML::Value << lr1120_max_power; out << YAML::Key << "LR1120_MAX_POWER" << YAML::Value << lr1120_max_power;
if (rf95_max_power != 20) if (rf95_max_power != 20)
out << YAML::Key << "RF95_MAX_POWER" << YAML::Value << rf95_max_power; out << YAML::Key << "RF95_MAX_POWER" << YAML::Value << rf95_max_power;
if (num_pa_points > 1) {
out << YAML::Key << "TX_GAIN_LORA" << YAML::Value << YAML::Flow << YAML::BeginSeq;
for (int i = 0; i < num_pa_points; i++) {
out << YAML::Value << tx_gain_lora[i];
}
out << YAML::EndSeq;
} else if (tx_gain_lora[0] != 0) {
out << YAML::Key << "TX_GAIN_LORA" << YAML::Value << tx_gain_lora[0];
}
out << YAML::Key << "DIO2_AS_RF_SWITCH" << YAML::Value << dio2_as_rf_switch; out << YAML::Key << "DIO2_AS_RF_SWITCH" << YAML::Value << dio2_as_rf_switch;
if (dio3_tcxo_voltage != 0) if (dio3_tcxo_voltage != 0)
out << YAML::Key << "DIO3_TCXO_VOLTAGE" << YAML::Value << YAML::Precision(3) << (float)dio3_tcxo_voltage / 1000; out << YAML::Key << "DIO3_TCXO_VOLTAGE" << YAML::Value << YAML::Precision(3) << (float)dio3_tcxo_voltage / 1000;

View File

@@ -4,10 +4,8 @@
#include "configuration.h" #include "configuration.h"
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
// #include <driver/adc.h> // "legacy adc calibration driver is deprecated, please migrate to use esp_adc/adc_cali.h and esp_adc/adc_cali_scheme.h
#include <esp_adc/adc_cali.h> #include <esp_adc_cal.h>
#include <esp_adc/adc_cali_scheme.h>
#include <esp_adc/adc_oneshot.h>
#include <soc/adc_channel.h> #include <soc/adc_channel.h>
#endif #endif
@@ -37,6 +35,11 @@
#define NUM_CELLS 1 #define NUM_CELLS 1
#endif #endif
#ifdef BAT_MEASURE_ADC_UNIT
extern RTC_NOINIT_ATTR uint64_t RTC_reg_b;
#include "soc/sens_reg.h" // needed for adc pin reset
#endif
#if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR #if HAS_TELEMETRY && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
#include "modules/Telemetry/Sensor/nullSensor.h" #include "modules/Telemetry/Sensor/nullSensor.h"
#if __has_include(<Adafruit_INA219.h>) #if __has_include(<Adafruit_INA219.h>)

View File

@@ -17,6 +17,8 @@
#include "target_specific.h" #include "target_specific.h"
#ifdef ARCH_ESP32 #ifdef ARCH_ESP32
// "esp_pm_config_esp32_t is deprecated, please include esp_pm.h and use esp_pm_config_t instead"
#include "esp32/pm.h"
#include "esp_pm.h" #include "esp_pm.h"
#if HAS_WIFI #if HAS_WIFI
#include "mesh/wifi/WiFiAPClient.h" #include "mesh/wifi/WiFiAPClient.h"
@@ -387,10 +389,8 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
// NOTE! ESP docs say we must disable bluetooth and wifi before light sleep // NOTE! ESP docs say we must disable bluetooth and wifi before light sleep
#if SOC_PM_SUPPORT_RTC_PERIPH_PD
// We want RTC peripherals to stay on // We want RTC peripherals to stay on
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
#endif
#if defined(BUTTON_PIN) && defined(BUTTON_NEED_PULLUP) #if defined(BUTTON_PIN) && defined(BUTTON_NEED_PULLUP)
gpio_pullup_en((gpio_num_t)BUTTON_PIN); gpio_pullup_en((gpio_num_t)BUTTON_PIN);
@@ -512,7 +512,11 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
*/ */
void enableModemSleep() void enableModemSleep()
{ {
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
static esp_pm_config_t esp32_config; // filled with zeros because bss static esp_pm_config_t esp32_config; // filled with zeros because bss
#else
static esp_pm_config_esp32_t esp32_config; // filled with zeros because bss
#endif
#if CONFIG_IDF_TARGET_ESP32S3 #if CONFIG_IDF_TARGET_ESP32S3
esp32_config.max_freq_mhz = CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ; esp32_config.max_freq_mhz = CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ;
#elif CONFIG_IDF_TARGET_ESP32S2 #elif CONFIG_IDF_TARGET_ESP32S2

View File

@@ -10,4 +10,4 @@ build_flags =
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.19 lovyan03/LovyanGFX@1.2.7

View File

@@ -72,7 +72,7 @@
// Battery // Battery
#define BATTERY_PIN 34 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 34 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO34_CHANNEL
#define ADC_ATTENUATION \ #define ADC_ATTENUATION \
ADC_ATTEN_DB_2_5 // 2_5-> 100mv-1250mv, 11-> 150mv-3100mv for ESP32 ADC_ATTEN_DB_2_5 // 2_5-> 100mv-1250mv, 11-> 150mv-3100mv for ESP32
// ESP32-S2/C3/S3 are different // ESP32-S2/C3/S3 are different

View File

@@ -30,7 +30,7 @@
// Battery sense // Battery sense
#define BATTERY_PIN 35 #define BATTERY_PIN 35
#define ADC_MULTIPLIER 2.01 // 100k + 100k, and add 1% tolerance #define ADC_MULTIPLIER 2.01 // 100k + 100k, and add 1% tolerance
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION #define BATTERY_SENSE_RESOLUTION_BITS ADC_RESOLUTION
// SPI // SPI

View File

@@ -3,7 +3,7 @@
#define I2C_SDA 4 #define I2C_SDA 4
#define I2C_SCL 5 #define I2C_SCL 5
#define BATTERY_PIN 34 #define BATTERY_PIN 34
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO34_CHANNEL
// GPS // GPS
#undef GPS_RX_PIN #undef GPS_RX_PIN

View File

@@ -11,7 +11,7 @@
// Note: On the ESP32 base version, gpio34-39 are input-only, and do not have internal pull-ups. // Note: On the ESP32 base version, gpio34-39 are input-only, and do not have internal pull-ups.
// If 39 is not being used for a button, it is suggested to remove the #define. // If 39 is not being used for a button, it is suggested to remove the #define.
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k) #define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards #define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975). #define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).

View File

@@ -11,7 +11,7 @@
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam #define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k) #define ADC_MULTIPLIER 1.85 // (R1 = 470k, R2 = 680k)
#define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards #define EXT_PWR_DETECT 4 // Pin to detect connected external power source for LILYGO® TTGO T-Energy T18 and other DIY boards
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975). #define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).

View File

@@ -4,9 +4,8 @@ extends = arduino_base
custom_esp32_kind = custom_esp32_kind =
custom_mtjson_part = custom_mtjson_part =
platform = platform =
# TODO renovate # renovate: datasource=custom.pio depName=platformio/espressif32 packageName=platformio/platform/espressif32
https://github.com/pioarduino/platform-espressif32/releases/download/55.03.36/platform-espressif32.zip platformio/espressif32@6.12.0
; https://github.com/pioarduino/platform-espressif32.git#develop
extra_scripts = extra_scripts =
${env.extra_scripts} ${env.extra_scripts}
@@ -25,10 +24,10 @@ board_build.filesystem = littlefs
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging. # Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h # See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h # This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
build_unflags = build_unflags = -fno-lto
-fno-lto
build_flags = build_flags =
${arduino_base.build_flags} ${arduino_base.build_flags}
-flto
-Wall -Wall
-Wextra -Wextra
-Isrc/platform/esp32 -Isrc/platform/esp32
@@ -37,6 +36,11 @@ build_flags =
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG -DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
-DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL
-DAXP_DEBUG_PORT=Serial -DAXP_DEBUG_PORT=Serial
-DCONFIG_BT_NIMBLE_ENABLED
-DCONFIG_BT_NIMBLE_MAX_BONDS=6 # default is 3
-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 -DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
-DSERIAL_BUFFER_SIZE=4096 -DSERIAL_BUFFER_SIZE=4096
-DSERIAL_HAS_ON_RECEIVE -DSERIAL_HAS_ON_RECEIVE
@@ -50,45 +54,24 @@ build_flags =
lib_deps = lib_deps =
${arduino_base.lib_deps} ${arduino_base.lib_deps}
${networking_base.lib_deps} ${networking_base.lib_deps}
${networking_extra.lib_deps}
${environmental_base.lib_deps} ${environmental_base.lib_deps}
${environmental_extra.lib_deps} ${environmental_extra.lib_deps}
${radiolib_base.lib_deps} ${radiolib_base.lib_deps}
# TODO renovate # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
https://github.com/jackjansen/esp32_idf5_https_server/archive/v1.1.1.zip https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
h2zero/NimBLE-Arduino@1.4.3 h2zero/NimBLE-Arduino@^1.4.3
# TODO renovate # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
https://github.com/mverch67/libpax/archive/6f52ee989301cdabaeef00bcbf93bff55708ce2f.zip https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib # renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
lewisxhe/XPowersLib@0.3.2 https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
rweather/Crypto@0.4.0 rweather/Crypto@0.4.0
lib_ignore = lib_ignore =
segger_rtt segger_rtt
ESP32 BLE Arduino ESP32 BLE Arduino
; Ignore builtin NimBLE libs
BLE
BluetoothSerial
SimpleBLE
WiFiProv
ArduinoOTA
; Ignore pioarduino esp32 libs we don't use
ESP_I2S
ESP_NOW
ESP_SR
Insights
Matter
OpenThread
RainMaker
;SPIFFS
USB
;NetworkClientSecure
Zigbee
Micro-RTSP
; testing below
mqtt
esp-mqtt
; leave this commented out to avoid breaking Windows ; leave this commented out to avoid breaking Windows
;upload_port = /dev/ttyUSB0 ;upload_port = /dev/ttyUSB0
@@ -101,224 +84,3 @@ lib_ignore =
; customize the partition table ; customize the partition table
; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables ; http://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables
board_build.partitions = partition-table.csv board_build.partitions = partition-table.csv
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
espressif/esp-tflite-micro
espressif/esp-sr
espressif/esp_matter
espressif/esp-zboss-lib
espressif/esp-zigbee-lib
espressif/mqtt
custom_sdkconfig =
; CONFIG_LOG_DEFAULT_LEVEL=4
; CONFIG_LOG_MAXIMUM_LEVEL=4
; CONFIG_BT_NIMBLE_CPP_LOG_LEVEL=1
CONFIG_LOG_COLORS=y
CONFIG_ARDUHAL_LOG_COLORS=y
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_IDF_EXPERIMENTAL_FEATURES=y
;
; Compiler options
;
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=n
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
CONFIG_COMPILER_CXX_EXCEPTIONS=n
CONFIG_COMPILER_STACK_CHECK_MODE_NORM=n
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
CONFIG_COMPILER_DISABLE_GCC12_WARNINGS=y
CONFIG_COMPILER_DISABLE_GCC13_WARNINGS=y
CONFIG_COMPILER_DISABLE_GCC14_WARNINGS=y
CONFIG_COMPILER_ORPHAN_SECTIONS_WARNING=n
CONFIG_COMPILER_ORPHAN_SECTIONS_PLACE=y
CONFIG_ESP_GDBSTUB_ENABLED=n
CONFIG_ESP_TASK_WDT_INIT=n
CONFIG_NEWLIB_NANO_FORMAT=y
; LIBC_NEWLIB_NANO_FORMAT is enabled via 'esp32_extra.py' to allow float support
CONFIG_ESP_COREDUMP_ENABLE=n
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=n
CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y
CONFIG_ESP32_ENABLE_COREDUMP=n
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=n
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=n
CONFIG_FREERTOS_USE_TRACE_FACILITY=n
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_UNITY_ENABLE_FLOAT=n
CONFIG_UNITY_ENABLE_DOUBLE=n
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=n
CONFIG_SUPPORT_TERMIOS=n
CONFIG_VFS_SUPPORT_TERMIOS=n
CONFIG_VFS_SUPPORT_SELECT=n
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=n
CONFIG_WS_TRANSPORT=n
CONFIG_PPP_SUPPORT=n
CONFIG_NETWORK_PROV_NETWORK_TYPE_WIFI=n
; CONFIG_LWIP_DHCPS=n
CONFIG_LWIP_PPP_SUPPORT=n
CONFIG_LWIP_IP_FORWARD=n
CONFIG_LWIP_IPV4_NAPT=n
;
; MBEDTLS
;
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y
; Switch to custom CA bundle (for Meshtastic MQTT/etc) in the future
; https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/kconfig-reference.html#certificate-bundle-configuration
; CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
; CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH=""
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_MAX_CERTS=1
; #shame
CONFIG_MBEDTLS_ALLOW_WEAK_CERTIFICATE_VERIFICATION=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=n
CONFIG_MBEDTLS_SSL_PROTO_DTLS=n
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=n
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=n
CONFIG_MBEDTLS_PKCS7_C=n
CONFIG_MBEDTLS_CAMELLIA_C=n
CONFIG_MBEDTLS_CCM_C=n
CONFIG_MBEDTLS_CMAC_C=n
CONFIG_MBEDTLS_SHA512_C=n
CONFIG_MBEDTLS_X509_CRL_PARSE_C=n
CONFIG_MBEDTLS_X509_CSR_PARSE_C=n
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=n
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=n
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=n
CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=n
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=n
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=n
CONFIG_MDNS_ENABLE_CONSOLE_CLI=n
CONFIG_MDNS_PREDEF_NETIF_AP=n
; CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT=n
CONFIG_ESP_WIFI_ENABLE_WPA3_SAE=n
CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA=n
CONFIG_ESP_WIFI_ENABLE_SAE_H2E=n
CONFIG_OPENTHREAD_ENABLED=n
CONFIG_ZB_ENABLED=n
CONFIG_IEEE802154_ENABLED=n
CONFIG_ESP_INSIGHTS_ENABLED=n
CONFIG_HTTPD_WS_SUPPORT=n
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=n
CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=n
; using esp-idf5-https_server library instead, for now?
CONFIG_ESP_HTTPS_SERVER_ENABLE=n
;
; Builtin ESP-MQTT, we don't use this (yet?)
;
CONFIG_MQTT_TRANSPORT_SSL=n
CONFIG_MQTT_TRANSPORT_WEBSOCKET=n
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=n
CONFIG_MQTT_PROTOCOL_311=n
;
; Ethernet
; Disabled in esp32_common, re-enable on variants that need it
;
CONFIG_ETH_ENABLED=n
CONFIG_ARDUINO_SELECTIVE_Ethernet=n
;
; Bluetooth
;
CONFIG_BLE_MESH=n
CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_NVS_PERSIST=y
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
CONFIG_BT_CONTROLLER_ENABLED=y
CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=8192
CONFIG_BT_NIMBLE_MAX_CCCDS=20
CONFIG_BT_NIMBLE_MAX_BONDS=6
CONFIG_BT_NIMBLE_ENABLE_PERIODIC_SYNC=n
CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV=n
CONFIG_BT_NIMBLE_EXT_SCAN=n
CONFIG_BT_NIMBLE_PERIODIC_ADV_SYNC_TRANSFER=n
CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY=n
CONFIG_BT_NIMBLE_BLUFI_ENABLE=n
CONFIG_BT_NIMBLE_PROX_SERVICE=n
CONFIG_BT_NIMBLE_ANS_SERVICE=n
CONFIG_BT_NIMBLE_CTS_SERVICE=n
CONFIG_BT_NIMBLE_HTP_SERVICE=n
CONFIG_BT_NIMBLE_IPSS_SERVICE=n
CONFIG_BT_NIMBLE_TPS_SERVICE=n
CONFIG_BT_NIMBLE_IAS_SERVICE=n
CONFIG_BT_NIMBLE_LLS_SERVICE=n
CONFIG_BT_NIMBLE_SPS_SERVICE=n
CONFIG_BT_NIMBLE_HR_SERVICE=n
CONFIG_BT_NIMBLE_HID_SERVICE=n
CONFIG_BT_NIMBLE_BAS_SERVICE=n
CONFIG_BT_NIMBLE_DIS_SERVICE=n
;
; Arduino selective compilation
; Disable unused Arduino libraries to save space
;
CONFIG_ARDUINO_SELECTIVE_COMPILATION=y
CONFIG_ARDUINO_SELECTIVE_SPI=y
CONFIG_ARDUINO_SELECTIVE_Wire=y
CONFIG_ARDUINO_SELECTIVE_ESP_SR=n
CONFIG_ARDUINO_SELECTIVE_EEPROM=y
CONFIG_ARDUINO_SELECTIVE_Preferences=y
CONFIG_ARDUINO_SELECTIVE_Ticker=y
CONFIG_ARDUINO_SELECTIVE_Update=y
CONFIG_ARDUINO_SELECTIVE_Zigbee=n
CONFIG_ARDUINO_SELECTIVE_FS=y
CONFIG_ARDUINO_SELECTIVE_SD=y
CONFIG_ARDUINO_SELECTIVE_SD_MMC=y
CONFIG_ARDUINO_SELECTIVE_SPIFFS=y
CONFIG_ARDUINO_SELECTIVE_FFat=n
CONFIG_ARDUINO_SELECTIVE_LittleFS=y
CONFIG_ARDUINO_SELECTIVE_Network=y
; CONFIG_ARDUINO_SELECTIVE_Ethernet=n
CONFIG_ARDUINO_SELECTIVE_PPP=n
CONFIG_ARDUINO_SELECTIVE_Hash=y
CONFIG_ARDUINO_SELECTIVE_ArduinoOTA=n
CONFIG_ARDUINO_SELECTIVE_AsyncUDP=y
CONFIG_ARDUINO_SELECTIVE_DNSServer=n
CONFIG_ARDUINO_SELECTIVE_ESPmDNS=y
CONFIG_ARDUINO_SELECTIVE_HTTPClient=n
CONFIG_ARDUINO_SELECTIVE_Matter=n
CONFIG_ARDUINO_SELECTIVE_NetBIOS=n
CONFIG_ARDUINO_SELECTIVE_WebServer=n
CONFIG_ARDUINO_SELECTIVE_WiFi=y
CONFIG_ARDUINO_SELECTIVE_NetworkClientSecure=y
CONFIG_ARDUINO_SELECTIVE_WiFiProv=n
CONFIG_ARDUINO_SELECTIVE_BLE=n
CONFIG_ARDUINO_SELECTIVE_BluetoothSerial=n
CONFIG_ARDUINO_SELECTIVE_SimpleBLE=n
CONFIG_ARDUINO_SELECTIVE_RainMaker=n
CONFIG_ARDUINO_SELECTIVE_OpenThread=n
CONFIG_ARDUINO_SELECTIVE_Insights=n

View File

@@ -6,12 +6,7 @@ custom_esp32_kind = esp32
build_flags = build_flags =
${esp32_common.build_flags} ${esp32_common.build_flags}
-mtext-section-literals
-DMESHTASTIC_EXCLUDE_AUDIO=1 -DMESHTASTIC_EXCLUDE_AUDIO=1
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
; Override lib_deps to use environmental_extra_no_bsec instead of environmental_extra ; Override lib_deps to use environmental_extra_no_bsec instead of environmental_extra
; BSEC library uses ~3.5KB DRAM which causes overflow on original ESP32 targets ; BSEC library uses ~3.5KB DRAM which causes overflow on original ESP32 targets
lib_deps = lib_deps =
@@ -21,13 +16,13 @@ lib_deps =
${environmental_base.lib_deps} ${environmental_base.lib_deps}
${environmental_extra_no_bsec.lib_deps} ${environmental_extra_no_bsec.lib_deps}
${radiolib_base.lib_deps} ${radiolib_base.lib_deps}
# TODO renovate # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
https://github.com/jackjansen/esp32_idf5_https_server/archive/v1.1.1.zip https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
h2zero/NimBLE-Arduino@1.4.3 h2zero/NimBLE-Arduino@^1.4.3
# TODO renovate # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
https://github.com/mverch67/libpax/archive/6f52ee989301cdabaeef00bcbf93bff55708ce2f.zip https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib # renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
lewisxhe/XPowersLib@0.3.2 https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto # renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
rweather/Crypto@0.4.0 rweather/Crypto@0.4.0

View File

@@ -12,7 +12,7 @@
#define ADC_CTRL 21 #define ADC_CTRL 21
#define ADC_CTRL_ENABLED LOW #define ADC_CTRL_ENABLED LOW
#define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 37 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_1 #define ADC_CHANNEL ADC1_CHANNEL_1
// ratio of voltage divider = 3.20 (R1=100k, R2=220k) // ratio of voltage divider = 3.20 (R1=100k, R2=220k)
#define ADC_MULTIPLIER 3.2 #define ADC_MULTIPLIER 3.2

View File

@@ -34,4 +34,4 @@ lib_ignore =
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.19 lovyan03/LovyanGFX@1.2.7

View File

@@ -93,7 +93,7 @@
#define PIN_EINK_MOSI 23 // EPD_MOSI #define PIN_EINK_MOSI 23 // EPD_MOSI
#define BATTERY_PIN 35 #define BATTERY_PIN 35
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
// https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/m5paper/M5_PAPER_SCH.pdf // https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/schematic/Core/m5paper/M5_PAPER_SCH.pdf
// https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58 // https://github.com/m5stack/M5Core-Ink/blob/master/examples/Basics/FactoryTest/FactoryTest.ino#L58
// VBAT // VBAT

View File

@@ -33,7 +33,7 @@
#endif #endif
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity. #define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
#define ADC_MULTIPLIER 2 #define ADC_MULTIPLIER 2

View File

@@ -7,7 +7,7 @@ build_flags =
-DVTABLES_IN_FLASH=1 -DVTABLES_IN_FLASH=1
-DCONFIG_DISABLE_HAL_LOCKS=1 -DCONFIG_DISABLE_HAL_LOCKS=1
-DHAS_STK8XXX=1 -DHAS_STK8XXX=1
; -O2 -O2
-I variants/esp32/radiomaster_900_bandit -I variants/esp32/radiomaster_900_bandit
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool

View File

@@ -49,7 +49,7 @@ static const uint8_t SCK = 33;
#define PIN_VBAT WB_A0 #define PIN_VBAT WB_A0
#define BATTERY_PIN PIN_VBAT #define BATTERY_PIN PIN_VBAT
#define ADC_CHANNEL ADC_CHANNEL_0 #define ADC_CHANNEL ADC1_GPIO36_CHANNEL
// https://docs.rakwireless.com/Product-Categories/WisBlock/RAK13300/ // https://docs.rakwireless.com/Product-Categories/WisBlock/RAK13300/

View File

@@ -32,7 +32,7 @@
#endif #endif
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_SAMPLES 30 // Set the number of samples, It has an effect of increasing sensitivity. #define BATTERY_SENSE_SAMPLES 30 // Set the number of samples, It has an effect of increasing sensitivity.
#define ADC_MULTIPLIER 6.45 #define ADC_MULTIPLIER 6.45
#define CELL_TYPE_LION // same curve for liion/lipo #define CELL_TYPE_LION // same curve for liion/lipo

View File

@@ -6,7 +6,7 @@
#define BUTTON_PIN 39 #define BUTTON_PIN 39
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module.
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define USE_RF95 #define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module #define LORA_DIO0 26 // a No connect on the SX1262 module

View File

@@ -1,5 +1,5 @@
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define I2C_SDA 21 // I2C pins for this board #define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22 #define I2C_SCL 22

View File

@@ -1,5 +1,5 @@
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define I2C_SDA 21 // I2C pins for this board #define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22 #define I2C_SCL 22

View File

@@ -1,5 +1,5 @@
#define BATTERY_PIN 35 #define BATTERY_PIN 35
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define BATTERY_SENSE_SAMPLES 30 #define BATTERY_SENSE_SAMPLES 30
// ratio of voltage divider = 2.0 (R42=100k, R43=100k) // ratio of voltage divider = 2.0 (R42=100k, R43=100k)

View File

@@ -1,7 +1,7 @@
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// ratio of voltage divider = 2.0 (R42=100k, R43=100k) // ratio of voltage divider = 2.0 (R42=100k, R43=100k)
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define I2C_SDA 21 // I2C pins for this board #define I2C_SDA 21 // I2C pins for this board
#define I2C_SCL 22 #define I2C_SCL 22

View File

@@ -23,7 +23,7 @@
#undef BAT_MEASURE_ADC_UNIT #undef BAT_MEASURE_ADC_UNIT
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_MULTIPLIER 1.34 // tracked resistance divider is 100k+470k, so it can not fillfull well on esp32 adc #define ADC_MULTIPLIER 1.34 // tracked resistance divider is 100k+470k, so it can not fillfull well on esp32 adc
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO35_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_12 // lower dB for high resistance voltage divider #define ADC_ATTENUATION ADC_ATTEN_DB_12 // lower dB for high resistance voltage divider
#undef GPS_RX_PIN #undef GPS_RX_PIN

View File

@@ -11,7 +11,7 @@ build_flags =
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.19 lovyan03/LovyanGFX@1.2.7
# renovate: datasource=custom.pio depName=SX1509 IO Expander packageName=sparkfun/library/SX1509 IO Expander # renovate: datasource=custom.pio depName=SX1509 IO Expander packageName=sparkfun/library/SX1509 IO Expander
sparkfun/SX1509 IO Expander@3.0.6 sparkfun/SX1509 IO Expander@3.0.6
# renovate: datasource=custom.pio depName=APA102 packageName=pololu/library/APA102 # renovate: datasource=custom.pio depName=APA102 packageName=pololu/library/APA102

View File

@@ -5,19 +5,6 @@ custom_esp32_kind = esp32c3
monitor_speed = 115200 monitor_speed = 115200
monitor_filters = esp32_c3_exception_decoder monitor_filters = esp32_c3_exception_decoder
build_flags =
${esp32_common.build_flags}
; Linker script to align text.handler_execute section to 4 bytes
-Wl,-Tsrc/platform/esp32/align-text.handler_execute-4.ld
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
; ESP32c3 doesn't support SD_MMC
CONFIG_ARDUINO_SELECTIVE_SD_MMC=n
CONFIG_BT_NIMBLE_EXT_ADV=y
CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=257
CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=2
lib_deps = lib_deps =
${esp32_common.lib_deps} ${esp32_common.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master

View File

@@ -1,34 +1,48 @@
[esp32c6_base] [esp32c6_base]
extends = esp32_common extends = esp32_common
custom_esp32_kind = esp32c6 platform =
# Do not renovate until we have switched to pioarduino tagged builds
https://github.com/Jason2866/platform-espressif32/archive/22faa566df8c789000f8136cd8d0aca49617af55.zip
build_flags = build_flags =
${esp32_common.build_flags} ${arduino_base.build_flags}
; Linker script to align text.handler_execute section to 4 bytes -Wall
-Wl,-Tsrc/platform/esp32/align-text.handler_execute-4.ld -Wextra
; Exclude Paxcounter, it uses 'esp_vhci_host_send_packet' whch is not available on ESP32-C6 -Isrc/platform/esp32
; https://github.com/espressif/arduino-esp32/issues/11716 -std=c++11
-DESP_OPENSSL_SUPPRESS_LEGACY_WARNING
-DSERIAL_BUFFER_SIZE=4096
-DLIBPAX_ARDUINO
-DLIBPAX_WIFI
-DLIBPAX_BLE
-DMESHTASTIC_EXCLUDE_WEBSERVER
;-DDEBUG_HEAP
; TEMP
-DHAS_BLUETOOTH=0
-DMESHTASTIC_EXCLUDE_PAXCOUNTER -DMESHTASTIC_EXCLUDE_PAXCOUNTER
-DMESHTASTIC_EXCLUDE_BLUETOOTH
lib_deps =
${arduino_base.lib_deps}
${networking_base.lib_deps}
${environmental_base.lib_deps}
${environmental_extra.lib_deps}
${radiolib_base.lib_deps}
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
lewisxhe/XPowersLib@0.3.2
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
rweather/Crypto@0.4.0
build_src_filter = build_src_filter =
${esp32_common.build_src_filter} ${esp32_common.build_src_filter} -<mesh/http>
monitor_speed = 460800 monitor_speed = 460800
monitor_filters = esp32_c3_exception_decoder monitor_filters = esp32_c3_exception_decoder
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
; ESP32c6 doesn't support SD_MMC
CONFIG_ARDUINO_SELECTIVE_SD_MMC=n
CONFIG_BT_NIMBLE_EXT_ADV=y
CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=257
CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=2
lib_ignore = lib_ignore =
${esp32_common.lib_ignore} ${esp32_common.lib_ignore}
NonBlockingRTTTL
NimBLE-Arduino
libpax libpax
lib_deps =
${esp32_common.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip

View File

@@ -17,16 +17,30 @@ board_build.partitions = default_16MB.csv
;Normal method ;Normal method
upload_protocol = esptool upload_protocol = esptool
;upload_port = /dev/ttyACM2 ;upload_port = /dev/ttyACM2
build_unflags =
-D HAS_BLUETOOTH
-D MESHTASTIC_EXCLUDE_BLUETOOTH
-D HAS_WIFI
lib_deps = lib_deps =
${esp32c6_base.lib_deps} ${esp32c6_base.lib_deps}
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2 adafruit/Adafruit NeoPixel@1.15.2
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
h2zero/NimBLE-Arduino@2.3.7
build_flags = build_flags =
${esp32c6_base.build_flags} ${esp32c6_base.build_flags}
-D M5STACK_UNITC6L -D M5STACK_UNITC6L
-I variants/esp32c6/m5stack_unitc6l -I variants/esp32c6/m5stack_unitc6l
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1
-D HAS_BLUETOOTH=1
-DCONFIG_BT_NIMBLE_EXT_ADV=1
-DCONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=2
-D NIMBLE_TWO
monitor_speed=115200 monitor_speed=115200
lib_ignore =
NonBlockingRTTTL
libpax
build_src_filter = build_src_filter =
${esp32c6_base.build_src_filter} +<../variants/esp32c6/m5stack_unitc6l> ${esp32c6_base.build_src_filter} +<../variants/esp32c6/m5stack_unitc6l>

View File

@@ -8,10 +8,3 @@ build_flags =
-I variants/esp32c6/tlora_c6 -I variants/esp32c6/tlora_c6
-DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1
; Disable audio.
; ESP32-C6 with 4MB flash is TIGHT on space.
-DMESHTASTIC_EXCLUDE_AUDIO=1
lib_ignore =
${esp32c6_base.lib_ignore}
ESP32 Codec2

View File

@@ -1,43 +0,0 @@
[esp32p4_base]
extends = esp32_common
custom_esp32_kind = esp32p4
build_flags =
${esp32_common.build_flags}
-DHAS_BLUETOOTH=0
-DHAS_WIFI=0
-DMESHTASTIC_EXCLUDE_BLUETOOTH=1
-DMESHTASTIC_EXCLUDE_WIFI=1
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1 ; BME680Sensor
build_src_filter =
${esp32_common.build_src_filter} -<libpax/> -<nimble/> -<platform/stm32wl> -<mesh/wifi/> -<mesh/api/> -<mesh/http/> -<platform/rp2xx0> -<mesh/eth/> -<mesh/raspihttp> -<serialization/>
monitor_speed = 460800
monitor_filters = esp32_c3_exception_decoder
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
CONFIG_ARDUINO_SELECTIVE_SD_MMC=y
CONFIG_BT_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=n
CONFIG_BT_NIMBLE_EXT_ADV=n
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y ; remove for production version
;CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y ; for target debugging
lib_ignore =
${esp32_common.lib_ignore}
libpax
esp8266-oled-ssd1306
NimBLE-Arduino
bsec2
esp32_idf5_https_server
esp_driver_cam
esp_http_server
esp_lcd
lib_deps =
${esp32_common.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip

View File

@@ -12,18 +12,13 @@ build_flags =
-DHAS_BLUETOOTH=0 -DHAS_BLUETOOTH=0
-DMESHTASTIC_EXCLUDE_PAXCOUNTER -DMESHTASTIC_EXCLUDE_PAXCOUNTER
-DMESHTASTIC_EXCLUDE_BLUETOOTH -DMESHTASTIC_EXCLUDE_BLUETOOTH
-mtext-section-literals
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
lib_ignore =
${esp32_common.lib_ignore}
NimBLE-Arduino
libpax
lib_deps = lib_deps =
${esp32_common.lib_deps} ${esp32_common.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master
https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip https://github.com/meshtastic/ESP32_Codec2/archive/633326c78ac251c059ab3a8c430fcdf25b41672f.zip
lib_ignore =
${esp32_common.lib_ignore}
NimBLE-Arduino
libpax

View File

@@ -8,8 +8,7 @@
// DIO6 -> RFSW1_V2 // DIO6 -> RFSW1_V2
// DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible. // DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible.
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC, static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC, RADIOLIB_NC};
RADIOLIB_NC};
static const Module::RfSwitchMode_t rfswitch_table[] = { static const Module::RfSwitchMode_t rfswitch_table[] = {
// mode DIO5 DIO6 DIO7 // mode DIO5 DIO6 DIO7

View File

@@ -18,7 +18,7 @@
// Battery voltage monitoring - TODO: test, currently untested, copied from T3S3 variant // Battery voltage monitoring - TODO: test, currently untested, copied from T3S3 variant
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_0 #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define ADC_MULTIPLIER \ #define ADC_MULTIPLIER \
2.11 // ratio of voltage divider = 2.0 (R10=1M, R13=1M), plus some undervoltage correction - TODO: this was carried over from 2.11 // ratio of voltage divider = 2.0 (R10=1M, R13=1M), plus some undervoltage correction - TODO: this was carried over from
// the T3S3, test to see if the undervoltage correction is needed. // the T3S3, test to see if the undervoltage correction is needed.

View File

@@ -43,8 +43,8 @@
// Battery // Battery
// #define BATTERY_PIN 2 // #define BATTERY_PIN 2
#define BATTERY_PIN 17 #define BATTERY_PIN 17
// #define ADC_CHANNEL ADC_CHANNEL_1 // #define ADC_CHANNEL ADC1_GPIO2_CHANNEL
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC2_GPIO17_CHANNEL
#define BATTERY_SENSE_RESOLUTION_BITS 12 #define BATTERY_SENSE_RESOLUTION_BITS 12
#define BATTERY_SENSE_RESOLUTION 4096.0 #define BATTERY_SENSE_RESOLUTION 4096.0
#undef AREF_VOLTAGE #undef AREF_VOLTAGE

View File

@@ -12,7 +12,7 @@
// USB_CHECK // USB_CHECK
#define EXT_PWR_DETECT 12 #define EXT_PWR_DETECT 12
#define BATTERY_PIN 8 #define BATTERY_PIN 8
#define ADC_CHANNEL ADC_CHANNEL_7 #define ADC_CHANNEL ADC1_GPIO8_CHANNEL
#define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.

View File

@@ -17,7 +17,7 @@
// #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to // #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to
// measure battery voltage ratio of voltage divider = 2.0 (assumption) // measure battery voltage ratio of voltage divider = 2.0 (assumption)
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. // #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
// #define ADC_CHANNEL ADC_CHANNEL_0 // #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define I2C_SDA SDA // 21 #define I2C_SDA SDA // 21
#define I2C_SCL SCL // 15 #define I2C_SCL SCL // 15

View File

@@ -14,6 +14,9 @@ lib_deps =
zinggjm/GxEPD2@1.6.5 zinggjm/GxEPD2@1.6.5
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2 adafruit/Adafruit NeoPixel@1.15.2
build_unflags =
${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
@@ -25,4 +28,3 @@ build_flags =
-DBOARD_HAS_PSRAM -DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-issue
-DARDUINO_USB_MODE=0 -DARDUINO_USB_MODE=0
-DARDUINO_USB_CDC_ON_BOOT=1

View File

@@ -12,9 +12,13 @@ lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2 adafruit/Adafruit NeoPixel@1.15.2
build_unflags =
${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32s3/diy/my_esp32s3_diy_oled -I variants/esp32s3/diy/my_esp32s3_diy_oled
-DBOARD_HAS_PSRAM -DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-issue
-DARDUINO_USB_MODE=0

View File

@@ -6,10 +6,13 @@ board_build.partitions = default_16MB.csv
board_level = extra board_level = extra
board_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB board_upload.flash_size = 16MB ;Specify the FLASH capacity as 16MB
board_build.arduino.memory_type = qio_opi ;Enable internal PSRAM board_build.arduino.memory_type = qio_opi ;Enable internal PSRAM
build_unflags =
${esp32s3_base.build_unflags}
-D ARDUINO_USB_MODE=1
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-D EBYTE_ESP32_S3 -D EBYTE_ESP32_S3
-D BOARD_HAS_PSRAM -D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MODE=0
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_CDC_ON_BOOT=1
-I variants/esp32s3/diy/t-energy-s3_e22 -I variants/esp32s3/diy/t-energy-s3_e22

View File

@@ -4,7 +4,7 @@
// Battery // Battery
#define BATTERY_PIN 3 #define BATTERY_PIN 3
#define ADC_MULTIPLIER 2.0 #define ADC_MULTIPLIER 2.0
#define ADC_CHANNEL ADC_CHANNEL_2 #define ADC_CHANNEL ADC1_GPIO3_CHANNEL
// Button on NanoVHF PCB // Button on NanoVHF PCB
#define BUTTON_PIN 39 #define BUTTON_PIN 39

View File

@@ -13,7 +13,7 @@ build_flags =
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266Audio@2.4.1 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0 earlephilhower/ESP8266SAM@1.1.0

View File

@@ -15,9 +15,9 @@ static const uint8_t MOSI = 48;
static const uint8_t MISO = 47; static const uint8_t MISO = 47;
static const uint8_t SCK = 41; static const uint8_t SCK = 41;
// static const uint8_t SPI_MOSI = 6; static const uint8_t SPI_MOSI = 6;
// static const uint8_t SPI_SCK = 5; static const uint8_t SPI_SCK = 5;
// static const uint8_t SPI_MISO = 4; static const uint8_t SPI_MISO = 4;
static const uint8_t A0 = 1; static const uint8_t A0 = 1;
static const uint8_t A1 = 2; static const uint8_t A1 = 2;

View File

@@ -38,21 +38,16 @@ build_flags = ${esp32s3_base.build_flags} -Os
-D USE_PACKET_API -D USE_PACKET_API
-D HAS_SDCARD -D HAS_SDCARD
-D SD_SPI_FREQUENCY=75000000 -D SD_SPI_FREQUENCY=75000000
-D SPI_MISO=4
-D SPI_MOSI=6
-D SPI_SCK=5
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
${device-ui_base.lib_deps} ${device-ui_base.lib_deps}
# renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266Audio@2.4.1 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM # renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0 earlephilhower/ESP8266SAM@1.1.0
# renovate: datasource=custom.pio depName=TCA9534 packageName=hideakitai/library/TCA9534 # renovate: datasource=custom.pio depName=TCA9534 packageName=hideakitai/library/TCA9534
hideakitai/TCA9534@0.1.1 hideakitai/TCA9534@0.1.1
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX lovyan03/LovyanGFX@1.2.0 ; note: v1.2.7 breaks the elecrow 7" display functionality
lovyan03/LovyanGFX@1.2.19
; REVISIT note: v1.2.7 breaks the elecrow 7" display functionality
[crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch [crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch
extends = crowpanel_base extends = crowpanel_base

View File

@@ -22,8 +22,8 @@
// https://www.waveshare.com/img/devkit/ESP32-S3-Pico/ESP32-S3-Pico-details-inter-1.jpg // https://www.waveshare.com/img/devkit/ESP32-S3-Pico/ESP32-S3-Pico-details-inter-1.jpg
// digram is incorrect labeled as battery pin is getting readings on GPIO7_CH1? // digram is incorrect labeled as battery pin is getting readings on GPIO7_CH1?
#define BATTERY_PIN 7 #define BATTERY_PIN 7
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO7_CHANNEL
// #define ADC_CHANNEL ADC_CHANNEL_5 // #define ADC_CHANNEL ADC1_GPIO6_CHANNEL
// ratio of voltage divider = 3.0 (R17=200k, R18=100k) // ratio of voltage divider = 3.0 (R17=200k, R18=100k)
#define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic #define ADC_MULTIPLIER 3.1 // 3.0 + a bit for being optimistic

View File

@@ -4,16 +4,6 @@ custom_esp32_kind = esp32s3
monitor_speed = 115200 monitor_speed = 115200
build_flags =
${esp32_common.build_flags}
-mtext-section-literals
custom_sdkconfig =
${esp32_common.custom_sdkconfig}
CONFIG_BT_NIMBLE_EXT_ADV=y
CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=257
CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=2
lib_deps = lib_deps =
${esp32_common.lib_deps} ${esp32_common.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-ESP32_Codec2 packageName=https://github.com/meshtastic/ESP32_Codec2 gitBranch=master

View File

@@ -22,7 +22,7 @@
// #define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage // #define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// ratio of voltage divider = 2.0 (RD2=100k, RD3=100k) // ratio of voltage divider = 2.0 (RD2=100k, RD3=100k)
// #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage. // #define ADC_MULTIPLIER 2.11 // 2.0 + 10% for correction of display undervoltage.
// #define ADC_CHANNEL ADC_CHANNEL_3 // #define ADC_CHANNEL ADC1_GPIO4_CHANNEL
// keyboard // keyboard
#define I2C_SDA 47 // I2C pins for this board #define I2C_SDA 47 // I2C pins for this board

View File

@@ -7,7 +7,7 @@
#define BUTTON_ACTIVE_PULLUP false #define BUTTON_ACTIVE_PULLUP false
#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO7_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
#define ADC_MULTIPLIER (4.9 * 1.045) #define ADC_MULTIPLIER (4.9 * 1.045)
#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1 #define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1

View File

@@ -5,7 +5,7 @@
#define BUTTON_ACTIVE_PULLUP false #define BUTTON_ACTIVE_PULLUP false
#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO7_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
#define ADC_MULTIPLIER (4.9 * 1.045) #define ADC_MULTIPLIER (4.9 * 1.045)
#define ADC_CTRL 34 // active HIGH, powers the voltage divider. Only on 1.1 #define ADC_CTRL 34 // active HIGH, powers the voltage divider. Only on 1.1

View File

@@ -16,7 +16,7 @@
#define ADC_CTRL 37 #define ADC_CTRL 37
#define ADC_CTRL_ENABLED LOW #define ADC_CTRL_ENABLED LOW
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_0 #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
#define ADC_MULTIPLIER 4.9 * 1.045 #define ADC_MULTIPLIER 4.9 * 1.045

View File

@@ -126,7 +126,7 @@ build_flags =
lib_deps = ${heltec_v4_base.lib_deps} lib_deps = ${heltec_v4_base.lib_deps}
; ${device-ui_base.lib_deps} ; ${device-ui_base.lib_deps}
# renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.19 lovyan03/LovyanGFX@1.2.0
# renovate: datasource=git-refs depName=Quency-D_chsc6x packageName=https://github.com/Quency-D/chsc6x gitBranch=master # renovate: datasource=git-refs depName=Quency-D_chsc6x packageName=https://github.com/Quency-D/chsc6x gitBranch=master
https://github.com/Quency-D/chsc6x/archive/5cbead829d6b432a8d621ed1aafd4eb474fd4f27.zip https://github.com/Quency-D/chsc6x/archive/5cbead829d6b432a8d621ed1aafd4eb474fd4f27.zip
; TODO revert to official device-ui (when merged) ; TODO revert to official device-ui (when merged)

View File

@@ -4,7 +4,7 @@
#define ADC_CTRL 37 #define ADC_CTRL 37
#define ADC_CTRL_ENABLED HIGH #define ADC_CTRL_ENABLED HIGH
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage #define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC_CHANNEL_0 #define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider #define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
#define ADC_MULTIPLIER 4.9 * 1.045 #define ADC_MULTIPLIER 4.9 * 1.045

View File

@@ -15,7 +15,6 @@ board = heltec_vision_master_e213
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-DBOARD_HAS_PSRAM
-Ivariants/esp32s3/heltec_vision_master_e213 -Ivariants/esp32s3/heltec_vision_master_e213
-DHELTEC_VISION_MASTER_E213 -DHELTEC_VISION_MASTER_E213
-DUSE_EINK -DUSE_EINK
@@ -44,7 +43,6 @@ build_src_filter =
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
${inkhud.build_flags} ${inkhud.build_flags}
-D BOARD_HAS_PSRAM
-I variants/esp32s3/heltec_vision_master_e213 -I variants/esp32s3/heltec_vision_master_e213
-D HELTEC_VISION_MASTER_E213 -D HELTEC_VISION_MASTER_E213
lib_deps = lib_deps =

View File

@@ -28,7 +28,7 @@
#define ADC_CTRL 46 #define ADC_CTRL 46
#define ADC_CTRL_ENABLED HIGH #define ADC_CTRL_ENABLED HIGH
#define BATTERY_PIN 7 #define BATTERY_PIN 7
#define ADC_CHANNEL ADC_CHANNEL_6 #define ADC_CHANNEL ADC1_GPIO7_CHANNEL
#define ADC_MULTIPLIER 4.9 * 1.03 #define ADC_MULTIPLIER 4.9 * 1.03
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 #define ADC_ATTENUATION ADC_ATTEN_DB_2_5

Some files were not shown because too many files have changed in this diff Show More