mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-27 12:12:07 +00:00
Compare commits
15 Commits
mini-epape
...
trunk-io/u
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a37131443 | ||
|
|
8894a0b711 | ||
|
|
b627fa720b | ||
|
|
9faf178bdc | ||
|
|
c98f134b40 | ||
|
|
5838b26d90 | ||
|
|
a417760887 | ||
|
|
04d2dd3b1c | ||
|
|
6d6a0734b0 | ||
|
|
3e3299f549 | ||
|
|
fb3bf783dd | ||
|
|
fc268d43d0 | ||
|
|
c38aff7e52 | ||
|
|
ff50ba4002 | ||
|
|
5c401b8e34 |
@@ -8,18 +8,18 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.497
|
- checkov@3.2.499
|
||||||
- renovate@42.84.2
|
- renovate@42.92.12
|
||||||
- prettier@3.8.0
|
- prettier@3.8.1
|
||||||
- trufflehog@3.92.5
|
- trufflehog@3.92.5
|
||||||
- yamllint@1.38.0
|
- yamllint@1.38.0
|
||||||
- bandit@1.9.3
|
- bandit@1.9.3
|
||||||
- trivy@0.68.2
|
- trivy@0.68.2
|
||||||
- taplo@0.10.0
|
- taplo@0.10.0
|
||||||
- ruff@0.14.13
|
- ruff@0.14.14
|
||||||
- isort@7.0.0
|
- isort@7.0.0
|
||||||
- markdownlint@0.47.0
|
- markdownlint@0.47.0
|
||||||
- oxipng@10.0.0
|
- oxipng@10.1.0
|
||||||
- svgo@4.0.0
|
- svgo@4.0.0
|
||||||
- actionlint@1.7.10
|
- actionlint@1.7.10
|
||||||
- flake8@7.3.0
|
- flake8@7.3.0
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"arduino": {
|
|
||||||
"ldscript": "esp32s3_out.ld",
|
|
||||||
"partitions": "default.csv"
|
|
||||||
},
|
|
||||||
"core": "esp32",
|
|
||||||
"extra_flags": [
|
|
||||||
"-DBOARD_HAS_PSRAM",
|
|
||||||
"-DARDUINO_ESP32S3_DEV",
|
|
||||||
"-DARDUINO_USB_MODE=1",
|
|
||||||
"-DARDUINO_USB_CDC_ON_BOOT=1",
|
|
||||||
"-DARDUINO_RUNNING_CORE=1",
|
|
||||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
|
||||||
],
|
|
||||||
"f_cpu": "240000000L",
|
|
||||||
"f_flash": "80000000L",
|
|
||||||
"flash_mode": "qio",
|
|
||||||
"hwids": [["0x303A", "0x1001"]],
|
|
||||||
"mcu": "esp32s3",
|
|
||||||
"variant": "esp32s3"
|
|
||||||
},
|
|
||||||
"connectivity": ["wifi"],
|
|
||||||
"debug": {
|
|
||||||
"default_tool": "esp-builtin",
|
|
||||||
"onboard_tools": ["esp-builtin"],
|
|
||||||
"openocd_target": "esp32s3.cfg"
|
|
||||||
},
|
|
||||||
"frameworks": ["arduino", "espidf"],
|
|
||||||
"name": "LilyGo Mini-Epapaer-S3 (4 MB Flash, 2MB PSRAM)",
|
|
||||||
"upload": {
|
|
||||||
"flash_size": "4MB",
|
|
||||||
"maximum_ram_size": 327680,
|
|
||||||
"maximum_size": 4194304,
|
|
||||||
"require_upload_port": true,
|
|
||||||
"speed": 460800
|
|
||||||
},
|
|
||||||
"url": "https://www.lilygo.cc",
|
|
||||||
"vendor": "LilyGo"
|
|
||||||
}
|
|
||||||
@@ -119,7 +119,7 @@ lib_deps =
|
|||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||||
https://github.com/meshtastic/device-ui/archive/3480b731d28b10d73414cf0dd7975bff745de8cf.zip
|
https://github.com/meshtastic/device-ui/archive/37ad715b76cd6ca4aa500a4a4d9740e3cdf3e3cb.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
@@ -212,3 +212,30 @@ lib_deps =
|
|||||||
sensirion/Sensirion Core@0.7.2
|
sensirion/Sensirion Core@0.7.2
|
||||||
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
||||||
sensirion/Sensirion I2C SCD4x@1.1.0
|
sensirion/Sensirion I2C SCD4x@1.1.0
|
||||||
|
; Same as environmental_extra but without BSEC (saves ~3.5KB DRAM for original ESP32 targets)
|
||||||
|
[environmental_extra_no_bsec]
|
||||||
|
lib_deps =
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit BMP3XX packageName=adafruit/library/Adafruit BMP3XX Library
|
||||||
|
adafruit/Adafruit BMP3XX Library@2.1.6
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X
|
||||||
|
adafruit/Adafruit MAX1704X@1.0.3
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library
|
||||||
|
adafruit/Adafruit SHTC3 Library@1.0.2
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X
|
||||||
|
adafruit/Adafruit LPS2X@2.0.6
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library
|
||||||
|
adafruit/Adafruit SHT31 Library@2.2.2
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit VEML7700 packageName=adafruit/library/Adafruit VEML7700 Library
|
||||||
|
adafruit/Adafruit VEML7700 Library@2.1.6
|
||||||
|
# renovate: datasource=custom.pio depName=Adafruit SHT4x packageName=adafruit/library/Adafruit SHT4x Library
|
||||||
|
adafruit/Adafruit SHT4x Library@1.0.5
|
||||||
|
# renovate: datasource=custom.pio depName=SparkFun Qwiic Scale NAU7802 packageName=sparkfun/library/SparkFun Qwiic Scale NAU7802 Arduino Library
|
||||||
|
sparkfun/SparkFun Qwiic Scale NAU7802 Arduino Library@1.0.6
|
||||||
|
# renovate: datasource=custom.pio depName=ClosedCube OPT3001 packageName=closedcube/library/ClosedCube OPT3001
|
||||||
|
closedcube/ClosedCube OPT3001@1.1.2
|
||||||
|
# renovate: datasource=git-refs depName=meshtastic-DFRobot_LarkWeatherStation packageName=https://github.com/meshtastic/DFRobot_LarkWeatherStation gitBranch=master
|
||||||
|
https://github.com/meshtastic/DFRobot_LarkWeatherStation/archive/4de3a9cadef0f6a5220a8a906cf9775b02b0040d.zip
|
||||||
|
# renovate: datasource=custom.pio depName=Sensirion Core packageName=sensirion/library/Sensirion Core
|
||||||
|
sensirion/Sensirion Core@0.7.2
|
||||||
|
# renovate: datasource=custom.pio depName=Sensirion I2C SCD4x packageName=sensirion/library/Sensirion I2C SCD4x
|
||||||
|
sensirion/Sensirion I2C SCD4x@1.1.0
|
||||||
Submodule protobufs updated: bbde30a0b9...d9003b2b6c
@@ -723,6 +723,16 @@ bool Power::setup()
|
|||||||
runASAP = true;
|
runASAP = true;
|
||||||
},
|
},
|
||||||
CHANGE);
|
CHANGE);
|
||||||
|
#endif
|
||||||
|
#ifdef EXT_CHRG_DETECT
|
||||||
|
attachInterrupt(
|
||||||
|
EXT_CHRG_DETECT,
|
||||||
|
[]() {
|
||||||
|
power->setIntervalFromNow(0);
|
||||||
|
runASAP = true;
|
||||||
|
BaseType_t higherWake = 0;
|
||||||
|
},
|
||||||
|
CHANGE);
|
||||||
#endif
|
#endif
|
||||||
enabled = found;
|
enabled = found;
|
||||||
low_voltage_counter = 0;
|
low_voltage_counter = 0;
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ uint32_t getValidTime(RTCQuality minQuality, bool local)
|
|||||||
return (currentQuality >= minQuality) ? getTime(local) : 0;
|
return (currentQuality >= minQuality) ? getTime(local) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t gm_mktime(struct tm *tm)
|
time_t gm_mktime(const struct tm *tm)
|
||||||
{
|
{
|
||||||
#if !MESHTASTIC_EXCLUDE_TZ
|
#if !MESHTASTIC_EXCLUDE_TZ
|
||||||
time_t result = 0;
|
time_t result = 0;
|
||||||
@@ -413,7 +413,7 @@ time_t gm_mktime(struct tm *tm)
|
|||||||
days_before_this_year -= 719162; // (1969 * 365 + 1969 / 4 - 1969 / 100 + 1969 / 400);
|
days_before_this_year -= 719162; // (1969 * 365 + 1969 / 4 - 1969 / 100 + 1969 / 400);
|
||||||
|
|
||||||
// Now, within this tm->year, compute the days *before* this tm->month starts.
|
// Now, within this tm->year, compute the days *before* this tm->month starts.
|
||||||
int days_before_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; // non-leap year
|
static const int days_before_month[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; // non-leap year
|
||||||
int days_this_year_before_this_month = days_before_month[tm->tm_mon]; // tm->tm_mon is 0..11
|
int days_this_year_before_this_month = days_before_month[tm->tm_mon]; // tm->tm_mon is 0..11
|
||||||
|
|
||||||
// If this is a leap year, and we're past February, add a day:
|
// If this is a leap year, and we're past February, add a day:
|
||||||
@@ -435,6 +435,7 @@ time_t gm_mktime(struct tm *tm)
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
#else
|
#else
|
||||||
return mktime(tm);
|
struct tm tmCopy = *tm;
|
||||||
|
return mktime(&tmCopy);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ uint32_t getValidTime(RTCQuality minQuality, bool local = false);
|
|||||||
|
|
||||||
RTCSetResult readFromRTC();
|
RTCSetResult readFromRTC();
|
||||||
|
|
||||||
time_t gm_mktime(struct tm *tm);
|
time_t gm_mktime(const struct tm *tm);
|
||||||
|
|
||||||
#define SEC_PER_DAY 86400
|
#define SEC_PER_DAY 86400
|
||||||
#define SEC_PER_HOUR 3600
|
#define SEC_PER_HOUR 3600
|
||||||
|
|||||||
@@ -259,18 +259,6 @@ bool EInkDisplay::connect()
|
|||||||
adafruitDisplay->setRotation(3);
|
adafruitDisplay->setRotation(3);
|
||||||
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
||||||
}
|
}
|
||||||
#elif defined(MINI_EPAPER_S3)
|
|
||||||
spi1 = new SPIClass(HSPI);
|
|
||||||
spi1->begin(PIN_SPI1_SCK, PIN_SPI1_MISO, PIN_SPI1_MOSI, PIN_EINK_CS);
|
|
||||||
|
|
||||||
// Create GxEPD2 objects
|
|
||||||
auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY);
|
|
||||||
adafruitDisplay = new GxEPD2_BW<EINK_DISPLAY_MODEL, EINK_DISPLAY_MODEL::HEIGHT>(*lowLevel);
|
|
||||||
|
|
||||||
// Init GxEPD2
|
|
||||||
adafruitDisplay->init();
|
|
||||||
adafruitDisplay->setRotation(0);
|
|
||||||
adafruitDisplay->setPartialWindow(0, 0, EINK_WIDTH, EINK_HEIGHT);
|
|
||||||
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
|
#elif defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_VISION_MASTER_E213)
|
||||||
|
|
||||||
// Detect display model, before starting SPI
|
// Detect display model, before starting SPI
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ class EInkDisplay : public OLEDDisplay
|
|||||||
SPIClass *hspi = NULL;
|
SPIClass *hspi = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK) || \
|
#if defined(HELTEC_MESH_POCKET) || defined(SEEED_WIO_TRACKER_L1_EINK) || defined(HELTEC_MESH_SOLAR_EINK)
|
||||||
defined(MINI_EPAPER_S3)
|
|
||||||
SPIClass *spi1 = NULL;
|
SPIClass *spi1 = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -266,52 +266,8 @@ void menuHandler::FrequencySlotPicker()
|
|||||||
|
|
||||||
// Calculate number of channels (copied from RadioInterface::applyModemConfig())
|
// Calculate number of channels (copied from RadioInterface::applyModemConfig())
|
||||||
meshtastic_Config_LoRaConfig &loraConfig = config.lora;
|
meshtastic_Config_LoRaConfig &loraConfig = config.lora;
|
||||||
double bw = loraConfig.bandwidth;
|
double bw = loraConfig.use_preset ? modemPresetToBwKHz(loraConfig.modem_preset, myRegion->wideLora)
|
||||||
if (loraConfig.use_preset) {
|
: bwCodeToKHz(loraConfig.bandwidth);
|
||||||
switch (loraConfig.modem_preset) {
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
bw = loraConfig.bandwidth;
|
|
||||||
if (bw == 31) // This parameter is not an integer
|
|
||||||
bw = 31.25;
|
|
||||||
if (bw == 62) // Fix for 62.5Khz bandwidth
|
|
||||||
bw = 62.5;
|
|
||||||
if (bw == 200)
|
|
||||||
bw = 203.125;
|
|
||||||
if (bw == 400)
|
|
||||||
bw = 406.25;
|
|
||||||
if (bw == 800)
|
|
||||||
bw = 812.5;
|
|
||||||
if (bw == 1600)
|
|
||||||
bw = 1625.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t numChannels = 0;
|
uint32_t numChannels = 0;
|
||||||
if (myRegion) {
|
if (myRegion) {
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ struct ScreenColor {
|
|||||||
uint8_t b;
|
uint8_t b;
|
||||||
bool useVariant;
|
bool useVariant;
|
||||||
|
|
||||||
ScreenColor(uint8_t rIn = 0, uint8_t gIn = 0, uint8_t bIn = 0, bool variantIn = false)
|
explicit ScreenColor(uint8_t rIn = 0, uint8_t gIn = 0, uint8_t bIn = 0, bool variantIn = false)
|
||||||
: r(rIn), g(gIn), b(bIn), useVariant(variantIn)
|
: r(rIn), g(gIn), b(bIn), useVariant(variantIn)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,3 +23,98 @@ extern const RegionInfo regions[];
|
|||||||
extern const RegionInfo *myRegion;
|
extern const RegionInfo *myRegion;
|
||||||
|
|
||||||
extern void initRegion();
|
extern void initRegion();
|
||||||
|
|
||||||
|
static inline float bwCodeToKHz(uint16_t bwCode)
|
||||||
|
{
|
||||||
|
if (bwCode == 31)
|
||||||
|
return 31.25f;
|
||||||
|
if (bwCode == 62)
|
||||||
|
return 62.5f;
|
||||||
|
if (bwCode == 200)
|
||||||
|
return 203.125f;
|
||||||
|
if (bwCode == 400)
|
||||||
|
return 406.25f;
|
||||||
|
if (bwCode == 800)
|
||||||
|
return 812.5f;
|
||||||
|
if (bwCode == 1600)
|
||||||
|
return 1625.0f;
|
||||||
|
return (float)bwCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint16_t bwKHzToCode(float bwKHz)
|
||||||
|
{
|
||||||
|
if (bwKHz > 31.24f && bwKHz < 31.26f)
|
||||||
|
return 31;
|
||||||
|
if (bwKHz > 62.49f && bwKHz < 62.51f)
|
||||||
|
return 62;
|
||||||
|
if (bwKHz > 203.12f && bwKHz < 203.13f)
|
||||||
|
return 200;
|
||||||
|
if (bwKHz > 406.24f && bwKHz < 406.26f)
|
||||||
|
return 400;
|
||||||
|
if (bwKHz > 812.49f && bwKHz < 812.51f)
|
||||||
|
return 800;
|
||||||
|
if (bwKHz > 1624.99f && bwKHz < 1625.01f)
|
||||||
|
return 1600;
|
||||||
|
return (uint16_t)(bwKHz + 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void modemPresetToParams(meshtastic_Config_LoRaConfig_ModemPreset preset, bool wideLora, float &bwKHz, uint8_t &sf,
|
||||||
|
uint8_t &cr)
|
||||||
|
{
|
||||||
|
switch (preset) {
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:
|
||||||
|
bwKHz = wideLora ? 1625.0f : 500.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 7;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
||||||
|
bwKHz = wideLora ? 812.5f : 250.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 7;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
||||||
|
bwKHz = wideLora ? 812.5f : 250.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 8;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
||||||
|
bwKHz = wideLora ? 812.5f : 250.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 9;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
||||||
|
bwKHz = wideLora ? 812.5f : 250.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 10;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:
|
||||||
|
bwKHz = wideLora ? 1625.0f : 500.0f;
|
||||||
|
cr = 8;
|
||||||
|
sf = 11;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
||||||
|
bwKHz = wideLora ? 406.25f : 125.0f;
|
||||||
|
cr = 8;
|
||||||
|
sf = 11;
|
||||||
|
break;
|
||||||
|
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
||||||
|
bwKHz = wideLora ? 406.25f : 125.0f;
|
||||||
|
cr = 8;
|
||||||
|
sf = 12;
|
||||||
|
break;
|
||||||
|
default: // LONG_FAST (or illegal)
|
||||||
|
bwKHz = wideLora ? 812.5f : 250.0f;
|
||||||
|
cr = 5;
|
||||||
|
sf = 11;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline float modemPresetToBwKHz(meshtastic_Config_LoRaConfig_ModemPreset preset, bool wideLora)
|
||||||
|
{
|
||||||
|
float bwKHz = 0;
|
||||||
|
uint8_t sf = 0;
|
||||||
|
uint8_t cr = 0;
|
||||||
|
modemPresetToParams(preset, wideLora, bwKHz, sf, cr);
|
||||||
|
return bwKHz;
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "PacketHistory.h"
|
#include "PacketHistory.h"
|
||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
|
#include "RadioInterface.h"
|
||||||
#include "Router.h"
|
#include "Router.h"
|
||||||
#include "SPILock.h"
|
#include "SPILock.h"
|
||||||
#include "SafeFile.h"
|
#include "SafeFile.h"
|
||||||
@@ -1297,6 +1298,13 @@ void NodeDB::loadFromDisk()
|
|||||||
LOG_INFO("Loaded saved config version %d", config.version);
|
LOG_INFO("Loaded saved config version %d", config.version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Coerce LoRa config fields derived from presets while bootstrapping.
|
||||||
|
// Some clients/UI components display bandwidth/spread_factor directly from config even in preset mode.
|
||||||
|
if (config.has_lora && config.lora.use_preset) {
|
||||||
|
RadioInterface::bootstrapLoRaConfigFromPreset(config.lora);
|
||||||
|
}
|
||||||
|
|
||||||
if (backupSecurity.private_key.size > 0) {
|
if (backupSecurity.private_key.size > 0) {
|
||||||
LOG_DEBUG("Restoring backup of security config");
|
LOG_DEBUG("Restoring backup of security config");
|
||||||
config.security = backupSecurity;
|
config.security = backupSecurity;
|
||||||
|
|||||||
@@ -220,6 +220,34 @@ void initRegion()
|
|||||||
myRegion = r;
|
myRegion = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadioInterface::bootstrapLoRaConfigFromPreset(meshtastic_Config_LoRaConfig &loraConfig)
|
||||||
|
{
|
||||||
|
if (!loraConfig.use_preset) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Find region info to determine whether "wide" LoRa is permitted (2.4 GHz uses wider bandwidth codes).
|
||||||
|
const RegionInfo *r = regions;
|
||||||
|
for (; r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && r->code != loraConfig.region; r++)
|
||||||
|
;
|
||||||
|
|
||||||
|
const bool regionWideLora = r->wideLora;
|
||||||
|
|
||||||
|
float bwKHz = 0;
|
||||||
|
uint8_t sf = 0;
|
||||||
|
uint8_t cr = 0;
|
||||||
|
modemPresetToParams(loraConfig.modem_preset, regionWideLora, bwKHz, sf, cr);
|
||||||
|
|
||||||
|
// If selected preset requests a bandwidth larger than the region span, fall back to LONG_FAST.
|
||||||
|
if (r->code != meshtastic_Config_LoRaConfig_RegionCode_UNSET && (r->freqEnd - r->freqStart) < (bwKHz / 1000.0f)) {
|
||||||
|
loraConfig.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST;
|
||||||
|
modemPresetToParams(loraConfig.modem_preset, regionWideLora, bwKHz, sf, cr);
|
||||||
|
}
|
||||||
|
|
||||||
|
loraConfig.bandwidth = bwKHzToCode(bwKHz);
|
||||||
|
loraConfig.spread_factor = sf;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ## LoRaWAN for North America
|
* ## LoRaWAN for North America
|
||||||
|
|
||||||
@@ -474,54 +502,7 @@ void RadioInterface::applyModemConfig()
|
|||||||
bool validConfig = false; // We need to check for a valid configuration
|
bool validConfig = false; // We need to check for a valid configuration
|
||||||
while (!validConfig) {
|
while (!validConfig) {
|
||||||
if (loraConfig.use_preset) {
|
if (loraConfig.use_preset) {
|
||||||
|
modemPresetToParams(loraConfig.modem_preset, myRegion->wideLora, bw, sf, cr);
|
||||||
switch (loraConfig.modem_preset) {
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
cr = 5;
|
|
||||||
sf = 7;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
cr = 5;
|
|
||||||
sf = 7;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_SHORT_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
cr = 5;
|
|
||||||
sf = 8;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
cr = 5;
|
|
||||||
sf = 9;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
cr = 5;
|
|
||||||
sf = 10;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_TURBO:
|
|
||||||
bw = (myRegion->wideLora) ? 1625.0 : 500;
|
|
||||||
cr = 8;
|
|
||||||
sf = 11;
|
|
||||||
break;
|
|
||||||
default: // Config_LoRaConfig_ModemPreset_LONG_FAST is default. Gracefully use this is preset is something illegal.
|
|
||||||
bw = (myRegion->wideLora) ? 812.5 : 250;
|
|
||||||
cr = 5;
|
|
||||||
sf = 11;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_MODERATE:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
cr = 8;
|
|
||||||
sf = 11;
|
|
||||||
break;
|
|
||||||
case meshtastic_Config_LoRaConfig_ModemPreset_LONG_SLOW:
|
|
||||||
bw = (myRegion->wideLora) ? 406.25 : 125;
|
|
||||||
cr = 8;
|
|
||||||
sf = 12;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (loraConfig.coding_rate >= 5 && loraConfig.coding_rate <= 8 && loraConfig.coding_rate != cr) {
|
if (loraConfig.coding_rate >= 5 && loraConfig.coding_rate <= 8 && loraConfig.coding_rate != cr) {
|
||||||
cr = loraConfig.coding_rate;
|
cr = loraConfig.coding_rate;
|
||||||
LOG_INFO("Using custom Coding Rate %u", cr);
|
LOG_INFO("Using custom Coding Rate %u", cr);
|
||||||
@@ -529,20 +510,7 @@ void RadioInterface::applyModemConfig()
|
|||||||
} else {
|
} else {
|
||||||
sf = loraConfig.spread_factor;
|
sf = loraConfig.spread_factor;
|
||||||
cr = loraConfig.coding_rate;
|
cr = loraConfig.coding_rate;
|
||||||
bw = loraConfig.bandwidth;
|
bw = bwCodeToKHz(loraConfig.bandwidth);
|
||||||
|
|
||||||
if (bw == 31) // This parameter is not an integer
|
|
||||||
bw = 31.25;
|
|
||||||
if (bw == 62) // Fix for 62.5Khz bandwidth
|
|
||||||
bw = 62.5;
|
|
||||||
if (bw == 200)
|
|
||||||
bw = 203.125;
|
|
||||||
if (bw == 400)
|
|
||||||
bw = 406.25;
|
|
||||||
if (bw == 800)
|
|
||||||
bw = 812.5;
|
|
||||||
if (bw == 1600)
|
|
||||||
bw = 1625.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((myRegion->freqEnd - myRegion->freqStart) < bw / 1000) {
|
if ((myRegion->freqEnd - myRegion->freqStart) < bw / 1000) {
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
#include "airtime.h"
|
#include "airtime.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
// Forward decl to avoid a direct include of generated config headers / full LoRaConfig definition in this widely-included file.
|
||||||
|
typedef struct _meshtastic_Config_LoRaConfig meshtastic_Config_LoRaConfig;
|
||||||
|
|
||||||
#define MAX_TX_QUEUE 16 // max number of packets which can be waiting for transmission
|
#define MAX_TX_QUEUE 16 // max number of packets which can be waiting for transmission
|
||||||
|
|
||||||
#define MAX_LORA_PAYLOAD_LEN 255 // max length of 255 per Semtech's datasheets on SX12xx
|
#define MAX_LORA_PAYLOAD_LEN 255 // max length of 255 per Semtech's datasheets on SX12xx
|
||||||
@@ -115,6 +118,12 @@ class RadioInterface
|
|||||||
|
|
||||||
virtual ~RadioInterface() {}
|
virtual ~RadioInterface() {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Coerce LoRa config fields (bandwidth/spread_factor) derived from presets.
|
||||||
|
* This is used during early bootstrapping so UIs that display these fields directly remain consistent.
|
||||||
|
*/
|
||||||
|
static void bootstrapLoRaConfigFromPreset(meshtastic_Config_LoRaConfig &loraConfig);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if we think the board can go to sleep (i.e. our tx queue is empty, we are not sending or receiving)
|
* Return true if we think the board can go to sleep (i.e. our tx queue is empty, we are not sending or receiving)
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -361,6 +361,8 @@ typedef struct _meshtastic_LocalStats {
|
|||||||
uint32_t heap_free_bytes;
|
uint32_t heap_free_bytes;
|
||||||
/* Number of packets that were dropped because the transmit queue was full. */
|
/* Number of packets that were dropped because the transmit queue was full. */
|
||||||
uint16_t num_tx_dropped;
|
uint16_t num_tx_dropped;
|
||||||
|
/* Noise floor value measured in dBm */
|
||||||
|
int32_t noise_floor;
|
||||||
} meshtastic_LocalStats;
|
} meshtastic_LocalStats;
|
||||||
|
|
||||||
/* Health telemetry metrics */
|
/* Health telemetry metrics */
|
||||||
@@ -458,7 +460,7 @@ extern "C" {
|
|||||||
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_default {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_LocalStats_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
#define meshtastic_HealthMetrics_init_default {false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_HostMetrics_init_default {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
#define meshtastic_HostMetrics_init_default {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||||
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
#define meshtastic_Telemetry_init_default {0, 0, {meshtastic_DeviceMetrics_init_default}}
|
||||||
@@ -467,7 +469,7 @@ extern "C" {
|
|||||||
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_EnvironmentMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_PowerMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
#define meshtastic_AirQualityMetrics_init_zero {false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
#define meshtastic_LocalStats_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
#define meshtastic_HealthMetrics_init_zero {false, 0, false, 0, false, 0}
|
||||||
#define meshtastic_HostMetrics_init_zero {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
#define meshtastic_HostMetrics_init_zero {0, 0, 0, false, 0, false, 0, 0, 0, 0, false, ""}
|
||||||
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
#define meshtastic_Telemetry_init_zero {0, 0, {meshtastic_DeviceMetrics_init_zero}}
|
||||||
@@ -556,6 +558,7 @@ extern "C" {
|
|||||||
#define meshtastic_LocalStats_heap_total_bytes_tag 12
|
#define meshtastic_LocalStats_heap_total_bytes_tag 12
|
||||||
#define meshtastic_LocalStats_heap_free_bytes_tag 13
|
#define meshtastic_LocalStats_heap_free_bytes_tag 13
|
||||||
#define meshtastic_LocalStats_num_tx_dropped_tag 14
|
#define meshtastic_LocalStats_num_tx_dropped_tag 14
|
||||||
|
#define meshtastic_LocalStats_noise_floor_tag 15
|
||||||
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
#define meshtastic_HealthMetrics_heart_bpm_tag 1
|
||||||
#define meshtastic_HealthMetrics_spO2_tag 2
|
#define meshtastic_HealthMetrics_spO2_tag 2
|
||||||
#define meshtastic_HealthMetrics_temperature_tag 3
|
#define meshtastic_HealthMetrics_temperature_tag 3
|
||||||
@@ -678,7 +681,8 @@ X(a, STATIC, SINGULAR, UINT32, num_tx_relay, 10) \
|
|||||||
X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) \
|
X(a, STATIC, SINGULAR, UINT32, num_tx_relay_canceled, 11) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, heap_total_bytes, 12) \
|
X(a, STATIC, SINGULAR, UINT32, heap_total_bytes, 12) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, heap_free_bytes, 13) \
|
X(a, STATIC, SINGULAR, UINT32, heap_free_bytes, 13) \
|
||||||
X(a, STATIC, SINGULAR, UINT32, num_tx_dropped, 14)
|
X(a, STATIC, SINGULAR, UINT32, num_tx_dropped, 14) \
|
||||||
|
X(a, STATIC, SINGULAR, INT32, noise_floor, 15)
|
||||||
#define meshtastic_LocalStats_CALLBACK NULL
|
#define meshtastic_LocalStats_CALLBACK NULL
|
||||||
#define meshtastic_LocalStats_DEFAULT NULL
|
#define meshtastic_LocalStats_DEFAULT NULL
|
||||||
|
|
||||||
@@ -755,7 +759,7 @@ extern const pb_msgdesc_t meshtastic_Nau7802Config_msg;
|
|||||||
#define meshtastic_EnvironmentMetrics_size 113
|
#define meshtastic_EnvironmentMetrics_size 113
|
||||||
#define meshtastic_HealthMetrics_size 11
|
#define meshtastic_HealthMetrics_size 11
|
||||||
#define meshtastic_HostMetrics_size 264
|
#define meshtastic_HostMetrics_size 264
|
||||||
#define meshtastic_LocalStats_size 76
|
#define meshtastic_LocalStats_size 87
|
||||||
#define meshtastic_Nau7802Config_size 16
|
#define meshtastic_Nau7802Config_size 16
|
||||||
#define meshtastic_PowerMetrics_size 81
|
#define meshtastic_PowerMetrics_size 81
|
||||||
#define meshtastic_Telemetry_size 272
|
#define meshtastic_Telemetry_size 272
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "Default.h"
|
#include "Default.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
|
#include "NodeStatus.h"
|
||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
#include "Router.h"
|
#include "Router.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
@@ -129,14 +130,17 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
|
|||||||
LOG_DEBUG("Skip send NodeInfo > 40%% ch. util");
|
LOG_DEBUG("Skip send NodeInfo > 40%% ch. util");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
// If we sent our NodeInfo less than 5 min. ago, don't send it again as it may be still underway.
|
|
||||||
if (!shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 5 * 60 * 1000)) {
|
// Use graduated scaling based on active mesh size (10 minute base, scales with congestion coefficient)
|
||||||
LOG_DEBUG("Skip send NodeInfo since we sent it <5min ago");
|
uint32_t timeoutMs = Default::getConfiguredOrDefaultMsScaled(0, 10 * 60, nodeStatus->getNumOnline());
|
||||||
|
if (!shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, timeoutMs)) {
|
||||||
|
LOG_DEBUG("Skip send NodeInfo since we sent it <%us ago", timeoutMs / 1000);
|
||||||
ignoreRequest = true; // Mark it as ignored for MeshModule
|
ignoreRequest = true; // Mark it as ignored for MeshModule
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 60 * 1000)) {
|
} else if (shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 60 * 1000)) {
|
||||||
|
// For interactive/urgent requests (e.g., user-triggered or implicit requests), use a shorter 60s timeout
|
||||||
LOG_DEBUG("Skip send NodeInfo since we sent it <60s ago");
|
LOG_DEBUG("Skip send NodeInfo since we sent it <60s ago");
|
||||||
ignoreRequest = true; // Mark it as ignored for MeshModule
|
ignoreRequest = true;
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
ignoreRequest = false; // Don't ignore requests anymore
|
ignoreRequest = false; // Don't ignore requests anymore
|
||||||
|
|||||||
100
test/test_radio/test_main.cpp
Normal file
100
test/test_radio/test_main.cpp
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
#include "MeshRadio.h"
|
||||||
|
#include "RadioInterface.h"
|
||||||
|
#include "TestUtil.h"
|
||||||
|
#include <unity.h>
|
||||||
|
|
||||||
|
#include "meshtastic/config.pb.h"
|
||||||
|
|
||||||
|
static void test_bwCodeToKHz_specialMappings()
|
||||||
|
{
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 31.25f, bwCodeToKHz(31));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 62.5f, bwCodeToKHz(62));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 203.125f, bwCodeToKHz(200));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 406.25f, bwCodeToKHz(400));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 812.5f, bwCodeToKHz(800));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 1625.0f, bwCodeToKHz(1600));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_bwCodeToKHz_passthrough()
|
||||||
|
{
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 125.0f, bwCodeToKHz(125));
|
||||||
|
TEST_ASSERT_FLOAT_WITHIN(0.0001f, 250.0f, bwCodeToKHz(250));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_bootstrapLoRaConfigFromPreset_noopWhenUsePresetFalse()
|
||||||
|
{
|
||||||
|
meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;
|
||||||
|
cfg.use_preset = false;
|
||||||
|
cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;
|
||||||
|
cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;
|
||||||
|
cfg.bandwidth = 123;
|
||||||
|
cfg.spread_factor = 8;
|
||||||
|
|
||||||
|
RadioInterface::bootstrapLoRaConfigFromPreset(cfg);
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL_UINT16(123, cfg.bandwidth);
|
||||||
|
TEST_ASSERT_EQUAL_UINT32(8, cfg.spread_factor);
|
||||||
|
TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST, cfg.modem_preset);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_bootstrapLoRaConfigFromPreset_setsDerivedFields_nonWideRegion()
|
||||||
|
{
|
||||||
|
meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;
|
||||||
|
cfg.use_preset = true;
|
||||||
|
cfg.region = meshtastic_Config_LoRaConfig_RegionCode_US;
|
||||||
|
cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;
|
||||||
|
|
||||||
|
RadioInterface::bootstrapLoRaConfigFromPreset(cfg);
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL_UINT16(250, cfg.bandwidth);
|
||||||
|
TEST_ASSERT_EQUAL_UINT32(9, cfg.spread_factor);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_bootstrapLoRaConfigFromPreset_setsDerivedFields_wideRegion()
|
||||||
|
{
|
||||||
|
meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;
|
||||||
|
cfg.use_preset = true;
|
||||||
|
cfg.region = meshtastic_Config_LoRaConfig_RegionCode_LORA_24;
|
||||||
|
cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_MEDIUM_FAST;
|
||||||
|
|
||||||
|
RadioInterface::bootstrapLoRaConfigFromPreset(cfg);
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL_UINT16(800, cfg.bandwidth);
|
||||||
|
TEST_ASSERT_EQUAL_UINT32(9, cfg.spread_factor);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void test_bootstrapLoRaConfigFromPreset_fallsBackIfBandwidthExceedsRegionSpan()
|
||||||
|
{
|
||||||
|
meshtastic_Config_LoRaConfig cfg = meshtastic_Config_LoRaConfig_init_zero;
|
||||||
|
cfg.use_preset = true;
|
||||||
|
cfg.region = meshtastic_Config_LoRaConfig_RegionCode_EU_868;
|
||||||
|
cfg.modem_preset = meshtastic_Config_LoRaConfig_ModemPreset_SHORT_TURBO;
|
||||||
|
|
||||||
|
RadioInterface::bootstrapLoRaConfigFromPreset(cfg);
|
||||||
|
|
||||||
|
TEST_ASSERT_EQUAL(meshtastic_Config_LoRaConfig_ModemPreset_LONG_FAST, cfg.modem_preset);
|
||||||
|
TEST_ASSERT_EQUAL_UINT16(250, cfg.bandwidth);
|
||||||
|
TEST_ASSERT_EQUAL_UINT32(11, cfg.spread_factor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setUp(void) {}
|
||||||
|
void tearDown(void) {}
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
delay(10);
|
||||||
|
delay(2000);
|
||||||
|
|
||||||
|
initializeTestEnvironment();
|
||||||
|
|
||||||
|
UNITY_BEGIN();
|
||||||
|
RUN_TEST(test_bwCodeToKHz_specialMappings);
|
||||||
|
RUN_TEST(test_bwCodeToKHz_passthrough);
|
||||||
|
RUN_TEST(test_bootstrapLoRaConfigFromPreset_noopWhenUsePresetFalse);
|
||||||
|
RUN_TEST(test_bootstrapLoRaConfigFromPreset_setsDerivedFields_nonWideRegion);
|
||||||
|
RUN_TEST(test_bootstrapLoRaConfigFromPreset_setsDerivedFields_wideRegion);
|
||||||
|
RUN_TEST(test_bootstrapLoRaConfigFromPreset_fallsBackIfBandwidthExceedsRegionSpan);
|
||||||
|
exit(UNITY_END());
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {}
|
||||||
@@ -6,6 +6,8 @@ build_flags =
|
|||||||
${esp32_base.build_flags}
|
${esp32_base.build_flags}
|
||||||
-D CHATTER_2
|
-D CHATTER_2
|
||||||
-I variants/esp32/chatter2
|
-I variants/esp32/chatter2
|
||||||
|
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
|
|||||||
@@ -59,13 +59,13 @@ lib_deps =
|
|||||||
${environmental_extra.lib_deps}
|
${environmental_extra.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
||||||
https://github.com/meshtastic/esp32_https_server/archive/3223704846752e6d545139204837bdb2a55459ca.zip
|
https://github.com/meshtastic/esp32_https_server/archive/b0f3960b3e8444563280656d88e22b5899481884.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
|
||||||
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
||||||
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
||||||
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
|
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
|
||||||
https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip
|
https://github.com/lewisxhe/XPowersLib/archive/v0.3.3.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
|
||||||
|
|
||||||
|
|||||||
@@ -7,3 +7,22 @@ custom_esp32_kind = esp32
|
|||||||
build_flags =
|
build_flags =
|
||||||
${esp32_common.build_flags}
|
${esp32_common.build_flags}
|
||||||
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
-DMESHTASTIC_EXCLUDE_AUDIO=1
|
||||||
|
; 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
|
||||||
|
lib_deps =
|
||||||
|
${arduino_base.lib_deps}
|
||||||
|
${networking_base.lib_deps}
|
||||||
|
${networking_extra.lib_deps}
|
||||||
|
${environmental_base.lib_deps}
|
||||||
|
${environmental_extra_no_bsec.lib_deps}
|
||||||
|
${radiolib_base.lib_deps}
|
||||||
|
# renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master
|
||||||
|
https://github.com/meshtastic/esp32_https_server/archive/b0f3960b3e8444563280656d88e22b5899481884.zip
|
||||||
|
# renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino
|
||||||
|
h2zero/NimBLE-Arduino@^1.4.3
|
||||||
|
# renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master
|
||||||
|
https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip
|
||||||
|
# renovate: datasource=github-tags depName=XPowersLib packageName=lewisxhe/XPowersLib
|
||||||
|
https://github.com/lewisxhe/XPowersLib/archive/v0.3.3.zip
|
||||||
|
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
||||||
|
rweather/Crypto@0.4.0
|
||||||
@@ -16,6 +16,8 @@ build_flags =
|
|||||||
${esp32_base.build_flags}
|
${esp32_base.build_flags}
|
||||||
-I variants/esp32/m5stack_core
|
-I variants/esp32/m5stack_core
|
||||||
-DM5STACK
|
-DM5STACK
|
||||||
|
-DMESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||||
|
-DMESHTASTIC_EXCLUDE_PAXCOUNTER=1
|
||||||
-DUSER_SETUP_LOADED
|
-DUSER_SETUP_LOADED
|
||||||
-DTFT_SDA_READ
|
-DTFT_SDA_READ
|
||||||
-DTFT_DRIVER=0x9341
|
-DTFT_DRIVER=0x9341
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ build_flags =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32_base.lib_deps}
|
${esp32_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
m5stack-coreink
|
m5stack-coreink
|
||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ lib_deps =
|
|||||||
# renovate: datasource=github-tags depName=meshtastic-st7796 packageName=meshtastic/st7796
|
# renovate: datasource=github-tags depName=meshtastic-st7796 packageName=meshtastic/st7796
|
||||||
https://github.com/meshtastic/st7796/archive/1.0.5.zip
|
https://github.com/meshtastic/st7796/archive/1.0.5.zip
|
||||||
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ lib_deps =
|
|||||||
${environmental_extra.lib_deps}
|
${environmental_extra.lib_deps}
|
||||||
${radiolib_base.lib_deps}
|
${radiolib_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
|
# renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
|
||||||
lewisxhe/XPowersLib@0.3.2
|
lewisxhe/XPowersLib@0.3.3
|
||||||
# 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
|
||||||
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
# renovate: datasource=custom.pio depName=rweather/Crypto packageName=rweather/library/Crypto
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ upload_speed = 921600
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32s3_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# 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 =
|
build_unflags =
|
||||||
|
|||||||
@@ -23,6 +23,6 @@ build_flags = ${esp32s3_base.build_flags}
|
|||||||
|
|
||||||
lib_deps = ${esp32s3_base.lib_deps}
|
lib_deps = ${esp32s3_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# 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
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
#ifndef Pins_Arduino_h
|
|
||||||
#define Pins_Arduino_h
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#define USB_VID 0x303a
|
|
||||||
#define USB_PID 0x1001
|
|
||||||
|
|
||||||
// The default Wire will be mapped to PMU and RTC
|
|
||||||
static const uint8_t SDA = 18;
|
|
||||||
static const uint8_t SCL = 9;
|
|
||||||
|
|
||||||
// Default SPI will be mapped to Radio
|
|
||||||
static const uint8_t SS = -1;
|
|
||||||
static const uint8_t MOSI = 17;
|
|
||||||
static const uint8_t MISO = 6;
|
|
||||||
static const uint8_t SCK = 8;
|
|
||||||
|
|
||||||
#define SPI_MOSI (39)
|
|
||||||
#define SPI_SCK (41)
|
|
||||||
#define SPI_MISO (38)
|
|
||||||
#define SPI_CS (40)
|
|
||||||
|
|
||||||
#define SDCARD_CS SPI_CS
|
|
||||||
|
|
||||||
#endif /* Pins_Arduino_h */
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
[env:mini-epaper-s3]
|
|
||||||
;custom_meshtastic_hw_model =
|
|
||||||
custom_meshtastic_hw_model_slug = MINI_EPAPER_S3
|
|
||||||
custom_meshtastic_architecture = esp32-s3
|
|
||||||
custom_meshtastic_actively_supported = true
|
|
||||||
custom_meshtastic_support_level = 1
|
|
||||||
custom_meshtastic_display_name = LILYGO Mini ePaper S3 E-Ink
|
|
||||||
custom_meshtastic_images = mini-epaper-s3.svg
|
|
||||||
custom_meshtastic_tags = LilyGo
|
|
||||||
custom_meshtastic_requires_dfu = no
|
|
||||||
|
|
||||||
extends = esp32s3_base
|
|
||||||
board = mini-epaper-s3
|
|
||||||
board_check = true
|
|
||||||
upload_protocol = esptool
|
|
||||||
|
|
||||||
build_flags =
|
|
||||||
${esp32s3_base.build_flags}
|
|
||||||
-I variants/esp32s3/mini-epaper-s3
|
|
||||||
-DMINI_EPAPER_S3
|
|
||||||
-DPRIVATE_HW ; TODO
|
|
||||||
-DUSE_EINK
|
|
||||||
-DEINK_DISPLAY_MODEL=GxEPD2_102
|
|
||||||
-DEINK_WIDTH=80
|
|
||||||
-DEINK_HEIGHT=128
|
|
||||||
; -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk
|
|
||||||
; -DEINK_LIMIT_FASTREFRESH=0 ; How many consecutive fast-refreshes are permitted //20
|
|
||||||
; -DEINK_LIMIT_RATE_BACKGROUND_SEC=30 ; Minimum interval between BACKGROUND updates //30
|
|
||||||
; -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
|
||||||
; -DEINK_HASQUIRK_VICIOUSFASTREFRESH ; Identify that pixels drawn by fast-refresh are harder to clear
|
|
||||||
; -DEINK_LIMIT_GHOSTING_PX=1500 ; (Optional) How much image ghosting is tolerated
|
|
||||||
; -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
|
||||||
|
|
||||||
lib_deps =
|
|
||||||
${esp32s3_base.lib_deps}
|
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
|
||||||
zinggjm/GxEPD2@1.6.5
|
|
||||||
;# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
|
|
||||||
;https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
|
||||||
lewisxhe/SensorLib@0.3.3
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
// Display (E-Ink)
|
|
||||||
|
|
||||||
#define PIN_EINK_CS 13
|
|
||||||
#define PIN_EINK_BUSY 10
|
|
||||||
#define PIN_EINK_RES 11
|
|
||||||
#define PIN_EINK_SCLK 14
|
|
||||||
#define PIN_EINK_MOSI 15
|
|
||||||
#define PIN_EINK_DC 12
|
|
||||||
#define PIN_EINK_EN 42
|
|
||||||
|
|
||||||
#define SPI_INTERFACES_COUNT 2
|
|
||||||
#define PIN_SPI1_MISO -1
|
|
||||||
#define PIN_SPI1_MOSI PIN_EINK_MOSI
|
|
||||||
#define PIN_SPI1_SCK PIN_EINK_SCLK
|
|
||||||
|
|
||||||
#define I2C_SDA SDA
|
|
||||||
#define I2C_SCL SCL
|
|
||||||
|
|
||||||
#define BATTERY_PIN 2 // A battery voltage measurement pin, voltage divider connected here to
|
|
||||||
// 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_CHANNEL ADC1_GPIO2_CHANNEL
|
|
||||||
|
|
||||||
#define HAS_GPS 0
|
|
||||||
#undef GPS_RX_PIN
|
|
||||||
#undef GPS_TX_PIN
|
|
||||||
|
|
||||||
#define BUTTON_PIN 3
|
|
||||||
#define BUTTON_NEED_PULLUP
|
|
||||||
#define ALT_BUTTON_PIN 4
|
|
||||||
#define ALT_BUTTON_ACTIVE_LOW true
|
|
||||||
#define ALT_BUTTON_ACTIVE_PULLUP true
|
|
||||||
#define PIN_BUTTON3 0
|
|
||||||
|
|
||||||
// #define HAS_SDCARD 1
|
|
||||||
// #define SDCARD_USE_SOFT_SPI
|
|
||||||
|
|
||||||
// PCF85063 RTC Module
|
|
||||||
#define PCF85063_RTC 0x51
|
|
||||||
#define HAS_RTC 1
|
|
||||||
|
|
||||||
#define USE_SX1262
|
|
||||||
#define LORA_DIO1 5
|
|
||||||
#define LORA_SCK 8
|
|
||||||
#define LORA_MISO 6
|
|
||||||
#define LORA_MOSI 17
|
|
||||||
#define LORA_CS 7 // CS not connected; IO7 is free
|
|
||||||
#define LORA_RESET 21
|
|
||||||
|
|
||||||
#ifdef USE_SX1262
|
|
||||||
#define SX126X_CS LORA_CS
|
|
||||||
#define SX126X_DIO1 5
|
|
||||||
#define SX126X_BUSY 16
|
|
||||||
#define SX126X_RESET LORA_RESET
|
|
||||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
|
||||||
#endif
|
|
||||||
@@ -29,7 +29,7 @@ build_flags =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32s3_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# renovate: datasource=git-refs depName=CSE_Touch packageName=https://github.com/CIRCUITSTATE/CSE_Touch gitBranch=main
|
# renovate: datasource=git-refs depName=CSE_Touch packageName=https://github.com/CIRCUITSTATE/CSE_Touch gitBranch=main
|
||||||
https://github.com/CIRCUITSTATE/CSE_Touch/archive/b44f23b6f870b848f1fbe453c190879bc6cfaafa.zip
|
https://github.com/CIRCUITSTATE/CSE_Touch/archive/b44f23b6f870b848f1fbe453c190879bc6cfaafa.zip
|
||||||
# renovate: datasource=github-tags depName=CSE_CST328 packageName=CIRCUITSTATE/CSE_CST328
|
# renovate: datasource=github-tags depName=CSE_CST328 packageName=CIRCUITSTATE/CSE_CST328
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ lib_deps = ${esp32s3_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.7
|
lovyan03/LovyanGFX@1.2.7
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
# renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library
|
# renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library
|
||||||
adafruit/Adafruit DRV2605 Library@1.2.4
|
adafruit/Adafruit DRV2605 Library@1.2.4
|
||||||
# renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
|
# renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ board_check = true
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${esp32s3_base.lib_deps}
|
${esp32s3_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
|
|
||||||
build_flags =
|
build_flags =
|
||||||
${esp32s3_base.build_flags}
|
${esp32s3_base.build_flags}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ lib_deps = ${esp32s3_base.lib_deps}
|
|||||||
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
|
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
|
||||||
lewisxhe/PCF8563_Library@1.0.1
|
lewisxhe/PCF8563_Library@1.0.1
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
# renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver
|
# renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver
|
||||||
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.0.zip
|
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.2.0.zip
|
||||||
# TODO renovate
|
# TODO renovate
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/Dongle_
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ lib_deps =
|
|||||||
# renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM
|
# renovate: datasource=custom.pio depName=nRF52_PWM packageName=khoih-prog/library/nRF52_PWM
|
||||||
khoih-prog/nRF52_PWM@1.0.1
|
khoih-prog/nRF52_PWM@1.0.1
|
||||||
; # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
; # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
; lewisxhe/SensorLib@0.3.3
|
; lewisxhe/SensorLib@0.3.4
|
||||||
|
|||||||
@@ -22,4 +22,4 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ELECROW
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
; # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
; # renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
; lewisxhe/SensorLib@0.3.3
|
; lewisxhe/SensorLib@0.3.4
|
||||||
|
|||||||
@@ -67,4 +67,8 @@ void variant_shutdown()
|
|||||||
nrf_gpio_cfg_input(PIN_BUTTON1, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input
|
nrf_gpio_cfg_input(PIN_BUTTON1, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input
|
||||||
nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;
|
nrf_gpio_pin_sense_t sense1 = NRF_GPIO_PIN_SENSE_LOW;
|
||||||
nrf_gpio_cfg_sense_set(PIN_BUTTON1, sense1);
|
nrf_gpio_cfg_sense_set(PIN_BUTTON1, sense1);
|
||||||
|
|
||||||
|
nrf_gpio_cfg_input(EXT_CHRG_DETECT, NRF_GPIO_PIN_PULLUP); // Configure the pin to be woken up as an input
|
||||||
|
nrf_gpio_pin_sense_t sense2 = NRF_GPIO_PIN_SENSE_LOW;
|
||||||
|
nrf_gpio_cfg_sense_set(EXT_CHRG_DETECT, sense2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/ME25LS0
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
|
||||||
upload_protocol = nrfutil
|
upload_protocol = nrfutil
|
||||||
;upload_port = /dev/ttyACM1
|
;upload_port = /dev/ttyACM1
|
||||||
|
|||||||
@@ -15,6 +15,6 @@ 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
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
;upload_port = /dev/ttyACM4
|
;upload_port = /dev/ttyACM4
|
||||||
@@ -9,5 +9,5 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/TWC_mes
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
debug_tool = jlink
|
debug_tool = jlink
|
||||||
|
|||||||
@@ -20,5 +20,5 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/nano-g2
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
;upload_protocol = fs
|
;upload_protocol = fs
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028
|
# renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028
|
||||||
melopero/Melopero RV3028@1.2.0
|
melopero/Melopero RV3028@1.2.0
|
||||||
# renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library
|
# renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/rak4631
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
# renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
|
||||||
zinggjm/GxEPD2@1.6.5
|
zinggjm/GxEPD2@1.6.6
|
||||||
# renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028
|
# renovate: datasource=custom.pio depName=Melopero RV3028 packageName=melopero/library/Melopero RV3028
|
||||||
melopero/Melopero RV3028@1.2.0
|
melopero/Melopero RV3028@1.2.0
|
||||||
# renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library
|
# renovate: datasource=custom.pio depName=RAK NCP5623 RGB LED packageName=rakwireless/library/RAKwireless NCP5623 RGB LED library
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ lib_deps =
|
|||||||
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
|
||||||
https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
;upload_protocol = fs
|
;upload_protocol = fs
|
||||||
|
|
||||||
[env:t-echo-inkhud]
|
[env:t-echo-inkhud]
|
||||||
@@ -53,4 +53,4 @@ lib_deps =
|
|||||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||||
${nrf52840_base.lib_deps}
|
${nrf52840_base.lib_deps}
|
||||||
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
# renovate: datasource=custom.pio depName=SensorLib packageName=lewisxhe/library/SensorLib
|
||||||
lewisxhe/SensorLib@0.3.3
|
lewisxhe/SensorLib@0.3.4
|
||||||
|
|||||||
Reference in New Issue
Block a user