From c896a1350c208da233c3043746a3dcfc159a6aa0 Mon Sep 17 00:00:00 2001 From: tekomula Date: Thu, 4 Dec 2025 07:38:35 +0200 Subject: [PATCH] Added EdgeFastLow-settings for modem --- src/DisplayFormatters.cpp | 5 ++++- src/graphics/draw/MenuHandler.cpp | 7 +++++-- src/mesh/RadioInterface.cpp | 5 +++++ src/mesh/generated/meshtastic/config.pb.h | 12 +++++++++--- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/DisplayFormatters.cpp b/src/DisplayFormatters.cpp index 246cf00223f..100a93e7163 100644 --- a/src/DisplayFormatters.cpp +++ b/src/DisplayFormatters.cpp @@ -34,6 +34,9 @@ const char *DisplayFormatters::getModemPresetDisplayName(meshtastic_Config_LoRaC case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE: return useShortName ? "LongM" : "LongMod"; break; + case meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW: + return useShortName ? "EFL" : "EdgeFastLow"; + break; default: return useShortName ? "Custom" : "Invalid"; break; @@ -80,4 +83,4 @@ const char *DisplayFormatters::getDeviceRole(meshtastic_Config_DeviceConfig_Role return "Unknown"; break; } -} \ No newline at end of file +} diff --git a/src/graphics/draw/MenuHandler.cpp b/src/graphics/draw/MenuHandler.cpp index bfe3656ce66..71602925609 100644 --- a/src/graphics/draw/MenuHandler.cpp +++ b/src/graphics/draw/MenuHandler.cpp @@ -197,7 +197,7 @@ void menuHandler::DeviceRolePicker() void menuHandler::RadioPresetPicker() { static const char *optionsArray[] = {"Back", "LongSlow", "LongModerate", "LongFast", "MediumSlow", - "MediumFast", "ShortSlow", "ShortFast", "ShortTurbo"}; + "MediumFast", "ShortSlow", "ShortFast", "ShortTurbo", "EdgeFastLow"}; enum optionsNumbers { Back = 0, radiopreset_LongSlow = 1, @@ -207,7 +207,8 @@ void menuHandler::RadioPresetPicker() radiopreset_MediumFast = 5, radiopreset_ShortSlow = 6, radiopreset_ShortFast = 7, - radiopreset_ShortTurbo = 8 + radiopreset_ShortTurbo = 8, + radiopreset_EdgeFastLow = 9 }; BannerOverlayOptions bannerOptions; bannerOptions.message = "Radio Preset"; @@ -234,6 +235,8 @@ void menuHandler::RadioPresetPicker() config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST; } else if (selected == radiopreset_ShortTurbo) { config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO; + } else if (selected == radiopreset_EdgeFastLow) { + config.lora.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW; } service->reloadConfig(SEGMENT_CONFIG); rebootAtMsec = (millis() + DEFAULT_REBOOT_SECONDS * 1000); diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 3c0da44944d..cc07826d3a9 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -518,6 +518,11 @@ void RadioInterface::applyModemConfig() cr = 8; sf = 12; break; + case meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW: + bw = 62.5; + cr = 8; + sf = 8; + break; } } else { sf = loraConfig.spread_factor; diff --git a/src/mesh/generated/meshtastic/config.pb.h b/src/mesh/generated/meshtastic/config.pb.h index 327568316c7..9e456ea8eaf 100644 --- a/src/mesh/generated/meshtastic/config.pb.h +++ b/src/mesh/generated/meshtastic/config.pb.h @@ -311,7 +311,13 @@ typedef enum _meshtastic_Config_LoRaConfig_ModemPreset { /* Short Range - Turbo This is the fastest preset and the only one with 500kHz bandwidth. It is not legal to use in all regions due to this wider bandwidth. */ - meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO = 8 + meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO = 8, + /* + * Edge Fast Low + * Designed to work in very harsh conditions when a lot of radio interference is present + * Useful when the used LoRa frequency band is very congested and full of other traffic + */ + meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW = 9 } meshtastic_Config_LoRaConfig_ModemPreset; typedef enum _meshtastic_Config_BluetoothConfig_PairingMode { @@ -689,8 +695,8 @@ extern "C" { #define _meshtastic_Config_LoRaConfig_RegionCode_ARRAYSIZE ((meshtastic_Config_LoRaConfig_RegionCode)(meshtastic_Config_LoRaConfig_RegionCode_BR_902+1)) #define _meshtastic_Config_LoRaConfig_ModemPreset_MIN meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST -#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO -#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO+1)) +#define _meshtastic_Config_LoRaConfig_ModemPreset_MAX meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW +#define _meshtastic_Config_LoRaConfig_ModemPreset_ARRAYSIZE ((meshtastic_Config_LoRaConfig_ModemPreset)(meshtastic_Config_LoRaConfig_ModemPreset_EDGE_FAST_LOW+1)) #define _meshtastic_Config_BluetoothConfig_PairingMode_MIN meshtastic_Config_BluetoothConfig_PairingMode_RANDOM_PIN #define _meshtastic_Config_BluetoothConfig_PairingMode_MAX meshtastic_Config_BluetoothConfig_PairingMode_NO_PIN