Compare commits

..

16 Commits

Author SHA1 Message Date
Jonathan Bennett
bc702b18d8 Merge branch 'develop' into agc-reset 2025-12-17 19:54:07 -06:00
Jason P
e9db03d185 Macro guard heap_caps_malloc_extmem_enable from SENSECAP_INDICATOR (#9007) 2025-12-17 14:46:35 -06:00
Austin
176d8def48 PlatformIO: Restructure networking_base for re-use (#8964) 2025-12-17 12:47:09 -06:00
Jonathan Bennett
5b299f3ede Prep work for better Store and Forward (#8999)
* make channels.h getHash public

* router.* make the encrypted packet copy available for modules to access

* Update src/mesh/Router.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Set p_encrypted to nullptr after release

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-17 12:03:29 -06:00
Austin
96c42229b0 Renovate all the things (#8994) 2025-12-17 11:05:48 -06:00
Jonathan Bennett
f1aefc4eef Detect if NTP is active on native (#8962)
* Detect if NTP is active on native

* Drop debug warning
2025-12-16 20:40:29 -06:00
Ben Meadors
203826374c Merge branch 'master' into develop 2025-12-16 11:45:08 -06:00
Austin
917794ebab PIO: Remove useless inheritence (references extends env) (#8987)
Remove lib_deps section for all PlatformIO envs which are unneeded (only references the `extends` lib_deps, thus pointless)

This makes the configs more concise and make future PIO variants/ libdeps audits easier.
2025-12-16 15:38:10 +11:00
Austin
ed77ba5612 Replace PIO fuzzy version matches (reproducible builds) (#8984)
This change does not introduce version *changes*, but simply "updates" to the version already being referenced by the fuzzy-match (^)
2025-12-15 19:48:34 -06:00
Austin
eafa8c7b47 PIO: Fix ESP32 sub-variant inheritance (#8983) 2025-12-15 19:04:03 -06:00
Austin
024ac74f5c rp2xx0: Update to arduino-pico 5.4.4 (#8979) 2025-12-15 16:09:59 -06:00
Ben Meadors
d0d375f1ff Merge pull request #8973 from meshtastic/master
Backmerge
2025-12-14 14:51:16 -06:00
Jason P
e8ebfc0513 Add Rebooting to DFU mode notification as a simple pop-up (#8970)
* Add DFU notification as a simple pop-up

* Add safe conditional of IF_SCREEN

* Forgot #if HAS_SCREEN
2025-12-14 14:50:41 -06:00
Austin
bf32f17f28 Actions: Compact manifest job output summary (#8957) 2025-12-13 12:32:01 +11:00
Jonathan Bennett
5e2d8eac6a Merge branch 'develop' into agc-reset 2025-10-14 09:04:28 -05:00
Jonathan Bennett
971543fab3 Add agc reset attempt 2025-09-29 12:11:48 -05:00
174 changed files with 452 additions and 556 deletions

View File

@@ -8,15 +8,15 @@ plugins:
uri: https://github.com/trunk-io/plugins uri: https://github.com/trunk-io/plugins
lint: lint:
enabled: enabled:
- checkov@3.2.496 - checkov@3.2.495
- renovate@42.66.14 - renovate@42.57.1
- prettier@3.7.4 - prettier@3.7.4
- trufflehog@3.92.4 - trufflehog@3.92.3
- yamllint@1.37.1 - yamllint@1.37.1
- bandit@1.9.2 - bandit@1.9.2
- trivy@0.68.2 - trivy@0.68.1
- taplo@0.10.0 - taplo@0.10.0
- ruff@0.14.10 - ruff@0.14.9
- isort@7.0.0 - isort@7.0.0
- markdownlint@0.47.0 - markdownlint@0.47.0
- oxipng@10.0.0 - oxipng@10.0.0

View File

@@ -21,14 +21,13 @@ rm -f $BUILDDIR/firmware*
export APP_VERSION=$VERSION export APP_VERSION=$VERSION
basename=firmware-$1-$VERSION basename=firmware-$1-$VERSION
ota_basename=${basename}-ota
pio run --environment $1 -t mtjson # -v pio run --environment $1 -t mtjson # -v
cp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf cp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf
echo "Copying NRF52 dfu (OTA) file" echo "Copying NRF52 dfu (OTA) file"
cp $BUILDDIR/$basename.zip $OUTDIR/$ota_basename.zip cp $BUILDDIR/$basename.zip $OUTDIR/$basename.zip
echo "Copying NRF52 UF2 file" echo "Copying NRF52 UF2 file"
cp $BUILDDIR/$basename.uf2 $OUTDIR/$basename.uf2 cp $BUILDDIR/$basename.uf2 $OUTDIR/$basename.uf2

View File

@@ -17,8 +17,6 @@ lfsbin = f"{progname.replace('firmware-', 'littlefs-')}.bin"
def manifest_gather(source, target, env): def manifest_gather(source, target, env):
out = [] out = []
board_platform = env.BoardConfig().get("platform")
needs_ota_suffix = board_platform == "nordicnrf52"
check_paths = [ check_paths = [
progname, progname,
f"{progname}.elf", f"{progname}.elf",
@@ -34,11 +32,8 @@ def manifest_gather(source, target, env):
for p in check_paths: for p in check_paths:
f = env.File(env.subst(f"$BUILD_DIR/{p}")) f = env.File(env.subst(f"$BUILD_DIR/{p}"))
if f.exists(): if f.exists():
manifest_name = p
if needs_ota_suffix and p == f"{progname}.zip":
manifest_name = f"{progname}-ota.zip"
d = { d = {
"name": manifest_name, "name": p,
"md5": f.get_content_hash(), # Returns MD5 hash "md5": f.get_content_hash(), # Returns MD5 hash
"bytes": f.get_size() # Returns file size in bytes "bytes": f.get_size() # Returns file size in bytes
} }

View File

@@ -64,7 +64,7 @@ monitor_speed = 115200
monitor_filters = direct monitor_filters = direct
lib_deps = lib_deps =
# renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master # renovate: datasource=git-refs depName=meshtastic-esp8266-oled-ssd1306 packageName=https://github.com/meshtastic/esp8266-oled-ssd1306 gitBranch=master
https://github.com/meshtastic/esp8266-oled-ssd1306/archive/b34c6817c25d6faabb3a8a162b5d14fb75395433.zip https://github.com/meshtastic/esp8266-oled-ssd1306/archive/2887bf4a19f64d92c984dcc8fd5ca7429e425e4a.zip
# renovate: datasource=git-refs depName=meshtastic-OneButton packageName=https://github.com/meshtastic/OneButton gitBranch=master # renovate: datasource=git-refs depName=meshtastic-OneButton packageName=https://github.com/meshtastic/OneButton gitBranch=master
https://github.com/meshtastic/OneButton/archive/fa352d668c53f290cfa480a5f79ad422cd828c70.zip https://github.com/meshtastic/OneButton/archive/fa352d668c53f290cfa480a5f79ad422cd828c70.zip
# renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master # renovate: datasource=git-refs depName=meshtastic-arduino-fsm packageName=https://github.com/meshtastic/arduino-fsm gitBranch=master
@@ -103,17 +103,13 @@ lib_deps =
thingsboard/TBPubSubClient@2.12.1 thingsboard/TBPubSubClient@2.12.1
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient # renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
arduino-libraries/NTPClient@3.2.1 arduino-libraries/NTPClient@3.2.1
; Extra TCP/IP networking libs for supported devices
[networking_extra]
lib_deps =
# renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog # renovate: datasource=custom.pio depName=Syslog packageName=arcao/library/Syslog
arcao/Syslog@2.0.0 arcao/Syslog@2.0.0
; Minimal networking libs for nrf52 (excludes Syslog to save flash)
[nrf52_networking_base]
lib_deps =
# renovate: datasource=custom.pio depName=TBPubSubClient packageName=thingsboard/library/TBPubSubClient
thingsboard/TBPubSubClient@2.12.1
# renovate: datasource=custom.pio depName=NTPClient packageName=arduino-libraries/library/NTPClient
arduino-libraries/NTPClient@3.2.1
[radiolib_base] [radiolib_base]
lib_deps = lib_deps =
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib # renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
@@ -123,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/14dc991a4b57066e0a83599be1a87ff08e5e5308.zip https://github.com/meshtastic/device-ui/archive/862ed040c4ab44f0dfbbe492691f144886102588.zip
; Common libs for environmental measurements in telemetry module ; Common libs for environmental measurements in telemetry module
[environmental_base] [environmental_base]
@@ -162,8 +158,8 @@ lib_deps =
emotibit/EmotiBit MLX90632@1.0.8 emotibit/EmotiBit MLX90632@1.0.8
# renovate: datasource=custom.pio depName=Adafruit MLX90614 packageName=adafruit/library/Adafruit MLX90614 Library # renovate: datasource=custom.pio depName=Adafruit MLX90614 packageName=adafruit/library/Adafruit MLX90614 Library
adafruit/Adafruit MLX90614 Library@2.1.5 adafruit/Adafruit MLX90614 Library@2.1.5
# renovate: datasource=github-tags depName=INA3221 packageName=sgtwilko/INA3221 # renovate: datasource=git-refs depName=INA3221 packageName=https://github.com/sgtwilko/INA3221 gitBranch=FixOverflow
https://github.com/sgtwilko/INA3221#bb03d7e9bfcc74fc798838a54f4f99738f29fc6a https://github.com/sgtwilko/INA3221/archive/bb03d7e9bfcc74fc798838a54f4f99738f29fc6a.zip
# renovate: datasource=custom.pio depName=QMC5883L Compass packageName=mprograms/library/QMC5883LCompass # renovate: datasource=custom.pio depName=QMC5883L Compass packageName=mprograms/library/QMC5883LCompass
mprograms/QMC5883LCompass@1.2.3 mprograms/QMC5883LCompass@1.2.3
# renovate: datasource=custom.pio depName=DFRobot_RTU packageName=dfrobot/library/DFRobot_RTU # renovate: datasource=custom.pio depName=DFRobot_RTU packageName=dfrobot/library/DFRobot_RTU

View File

@@ -269,9 +269,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TCA9535_ADDR 0x20 #define TCA9535_ADDR 0x20
#define TCA9555_ADDR 0x26 #define TCA9555_ADDR 0x26
// used for display brightness control
#define STC8H1K28_ADDR 0x30
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Touchscreen // Touchscreen
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@@ -61,7 +61,6 @@ class ScanI2C
NAU7802, NAU7802,
FT6336U, FT6336U,
STK8BAXX, STK8BAXX,
STC8H1K28,
ICM20948, ICM20948,
SCD4X, SCD4X,
MAX30102, MAX30102,

View File

@@ -234,8 +234,6 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
#endif #endif
#ifdef HAS_LP5562 #ifdef HAS_LP5562
SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address); SCAN_SIMPLE_CASE(LP5562_ADDR, LP5562, "LP5562", (uint8_t)addr.address);
#else
SCAN_SIMPLE_CASE(STC8H1K28_ADDR, LP5562, "STC8H1K28", (uint8_t)addr.address);
#endif #endif
case XPOWERS_AXP192_AXP2101_ADDRESS: case XPOWERS_AXP192_AXP2101_ADDRESS:
// Do we have the axp2101/192 or the TCA8418 // Do we have the axp2101/192 or the TCA8418

View File

@@ -1,7 +1,6 @@
#ifdef MESHTASTIC_INCLUDE_INKHUD #ifdef MESHTASTIC_INCLUDE_INKHUD
#include "./PositionsApplet.h" #include "./PositionsApplet.h"
#include "NodeDB.h"
using namespace NicheGraphics; using namespace NicheGraphics;
@@ -50,8 +49,8 @@ ProcessMessage InkHUD::PositionsApplet::handleReceived(const meshtastic_MeshPack
if (!hasPosition) if (!hasPosition)
return ProcessMessage::CONTINUE; return ProcessMessage::CONTINUE;
const int8_t hopsAway = getHopsAway(mp); bool hasHopsAway = (mp.hop_start != 0 && mp.hop_limit <= mp.hop_start); // From NodeDB::updateFrom
const bool hasHopsAway = hopsAway >= 0; uint8_t hopsAway = mp.hop_start - mp.hop_limit;
// Determine if the position packet would change anything on-screen // Determine if the position packet would change anything on-screen
// ----------------------------------------------------------------- // -----------------------------------------------------------------

View File

@@ -8,4 +8,5 @@ build_flags =
-D MESHTASTIC_EXCLUDE_INPUTBROKER ; Suppress default input handling -D MESHTASTIC_EXCLUDE_INPUTBROKER ; Suppress default input handling
-D HAS_BUTTON=0 ; Suppress default ButtonThread -D HAS_BUTTON=0 ; Suppress default ButtonThread
lib_deps = lib_deps =
https://github.com/ZinggJM/GFX_Root#2.0.0 ; Used by InkHUD as a "slimmer" version of AdafruitGFX # TODO renovate
https://github.com/ZinggJM/GFX_Root#2.0.0 ; Used by InkHUD as a "slimmer" version of AdafruitGFX

View File

@@ -27,9 +27,7 @@ bool RotaryEncoderInterruptImpl1::init()
RotaryEncoderInterruptImpl1::handleIntA, RotaryEncoderInterruptImpl1::handleIntB, RotaryEncoderInterruptImpl1::handleIntA, RotaryEncoderInterruptImpl1::handleIntB,
RotaryEncoderInterruptImpl1::handleIntPressed); RotaryEncoderInterruptImpl1::handleIntPressed);
inputBroker->registerSource(this); inputBroker->registerSource(this);
#ifndef HAS_PHYSICAL_KEYBOARD
osk_found = true; osk_found = true;
#endif
return true; return true;
} }

View File

@@ -45,9 +45,7 @@ void TrackballInterruptBase::init(uint8_t pinDown, uint8_t pinUp, uint8_t pinLef
LOG_DEBUG("Trackball GPIO initialized - UP:%d DOWN:%d LEFT:%d RIGHT:%d PRESS:%d", this->_pinUp, this->_pinDown, LOG_DEBUG("Trackball GPIO initialized - UP:%d DOWN:%d LEFT:%d RIGHT:%d PRESS:%d", this->_pinUp, this->_pinDown,
this->_pinLeft, this->_pinRight, pinPress); this->_pinLeft, this->_pinRight, pinPress);
#ifndef HAS_PHYSICAL_KEYBOARD
osk_found = true; osk_found = true;
#endif
this->setInterval(100); this->setInterval(100);
} }

View File

@@ -29,9 +29,7 @@ bool UpDownInterruptImpl1::init()
eventDownLong, UpDownInterruptImpl1::handleIntDown, UpDownInterruptImpl1::handleIntUp, eventDownLong, UpDownInterruptImpl1::handleIntDown, UpDownInterruptImpl1::handleIntUp,
UpDownInterruptImpl1::handleIntPressed); UpDownInterruptImpl1::handleIntPressed);
inputBroker->registerSource(this); inputBroker->registerSource(this);
#ifndef HAS_PHYSICAL_KEYBOARD
osk_found = true; osk_found = true;
#endif
return true; return true;
} }

View File

@@ -196,6 +196,8 @@ bool kb_found = false;
// global bool to record that on-screen keyboard (OSK) is present // global bool to record that on-screen keyboard (OSK) is present
bool osk_found = false; bool osk_found = false;
unsigned long last_listen = 0;
// The I2C address of the RTC Module (if found) // The I2C address of the RTC Module (if found)
ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE; ScanI2C::DeviceAddress rtc_found = ScanI2C::ADDRESS_NONE;
// The I2C address of the Accelerometer (if found) // The I2C address of the Accelerometer (if found)
@@ -428,10 +430,17 @@ void setup()
#endif #endif
#if ARCH_PORTDUINO #if ARCH_PORTDUINO
RTCQuality ourQuality = RTCQualityDevice;
std::string timeCommandResult = exec("timedatectl status | grep synchronized | grep yes -c");
if (timeCommandResult[0] == '1') {
ourQuality = RTCQualityNTP;
}
struct timeval tv; struct timeval tv;
tv.tv_sec = time(NULL); tv.tv_sec = time(NULL);
tv.tv_usec = 0; tv.tv_usec = 0;
perhapsSetRTC(RTCQualityDevice, &tv); perhapsSetRTC(ourQuality, &tv);
#endif #endif
powerMonInit(); powerMonInit();
@@ -1458,10 +1467,8 @@ void setup()
#endif #endif
#if defined(HAS_TRACKBALL) || (defined(INPUTDRIVER_ENCODER_TYPE) && INPUTDRIVER_ENCODER_TYPE == 2) #if defined(HAS_TRACKBALL) || (defined(INPUTDRIVER_ENCODER_TYPE) && INPUTDRIVER_ENCODER_TYPE == 2)
#ifndef HAS_PHYSICAL_KEYBOARD
osk_found = true; osk_found = true;
#endif #endif
#endif
#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER #if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WEBSERVER
// Start web server thread. // Start web server thread.
@@ -1604,6 +1611,13 @@ void loop()
#endif #endif
power->powerCommandsCheck(); power->powerCommandsCheck();
if (last_listen + 1000 * 60 < millis() &&
!(RadioLibInterface::instance->isSending() || RadioLibInterface::instance->isActivelyReceiving())) {
RadioLibInterface::instance->startReceive();
LOG_DEBUG("attempting AGC reset");
last_listen = millis();
}
#ifdef DEBUG_STACK #ifdef DEBUG_STACK
static uint32_t lastPrint = 0; static uint32_t lastPrint = 0;
if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) { if (!Throttle::isWithinTimespanMs(lastPrint, 10 * 1000L)) {

View File

@@ -96,6 +96,8 @@ class Channels
bool setDefaultPresetCryptoForHash(ChannelHash channelHash); bool setDefaultPresetCryptoForHash(ChannelHash channelHash);
int16_t getHash(ChannelIndex i) { return hashes[i]; }
private: private:
/** Given a channel index, change to use the crypto key specified by that index /** Given a channel index, change to use the crypto key specified by that index
* *
@@ -113,8 +115,6 @@ class Channels
*/ */
int16_t generateHash(ChannelIndex channelNum); int16_t generateHash(ChannelIndex channelNum);
int16_t getHash(ChannelIndex i) { return hashes[i]; }
/** /**
* Validate a channel, fixing any errors as needed * Validate a channel, fixing any errors as needed
*/ */

View File

@@ -124,10 +124,6 @@ void FloodingRouter::perhapsCancelDupe(const meshtastic_MeshPacket *p)
if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE && iface) { if (config.device.role == meshtastic_Config_DeviceConfig_Role_ROUTER_LATE && iface) {
iface->clampToLateRebroadcastWindow(getFrom(p), p->id); iface->clampToLateRebroadcastWindow(getFrom(p), p->id);
} }
if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE && iface && nodeDB &&
nodeDB->isFromOrToFavoritedNode(*p)) {
iface->clampToLateRebroadcastWindow(getFrom(p), p->id);
}
} }
bool FloodingRouter::isRebroadcaster() bool FloodingRouter::isRebroadcaster()

View File

@@ -195,7 +195,7 @@ void MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src)
// but opted NOT TO. Because it is not a good idea to let remote nodes 'probe' to find out which PSKs were "good" vs // but opted NOT TO. Because it is not a good idea to let remote nodes 'probe' to find out which PSKs were "good" vs
// bad. // bad.
routingModule->sendAckNak(meshtastic_Routing_Error_NO_RESPONSE, getFrom(&mp), mp.id, mp.channel, routingModule->sendAckNak(meshtastic_Routing_Error_NO_RESPONSE, getFrom(&mp), mp.id, mp.channel,
routingModule->getHopLimitForResponse(mp)); routingModule->getHopLimitForResponse(mp.hop_start, mp.hop_limit));
} }
} }
@@ -235,7 +235,7 @@ void setReplyTo(meshtastic_MeshPacket *p, const meshtastic_MeshPacket &to)
assert(p->which_payload_variant == meshtastic_MeshPacket_decoded_tag); // Should already be set by now assert(p->which_payload_variant == meshtastic_MeshPacket_decoded_tag); // Should already be set by now
p->to = getFrom(&to); // Make sure that if we are sending to the local node, we use our local node addr, not 0 p->to = getFrom(&to); // Make sure that if we are sending to the local node, we use our local node addr, not 0
p->channel = to.channel; // Use the same channel that the request came in on p->channel = to.channel; // Use the same channel that the request came in on
p->hop_limit = routingModule->getHopLimitForResponse(to); p->hop_limit = routingModule->getHopLimitForResponse(to.hop_start, to.hop_limit);
// No need for an ack if we are just delivering locally (it just generates an ignored ack) // No need for an ack if we are just delivering locally (it just generates an ignored ack)
p->want_ack = (to.from != 0) ? to.want_ack : false; p->want_ack = (to.from != 0) ? to.want_ack : false;

View File

@@ -93,8 +93,11 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp)
} else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user && } else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&
nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull()) { nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull()) {
if (airTime->isTxAllowedChannelUtil(true)) { if (airTime->isTxAllowedChannelUtil(true)) {
const int8_t hopsUsed = getHopsAway(*mp, config.lora.hop_limit); // Hops used by the request. If somebody in between running modified firmware modified it, ignore it
if (hopsUsed > (int32_t)(config.lora.hop_limit + 2)) { auto hopStart = mp->hop_start;
auto hopLimit = mp->hop_limit;
uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit;
if (hopsUsed > config.lora.hop_limit + 2) {
LOG_DEBUG("Skip send NodeInfo: %d hops away is too far away", hopsUsed); LOG_DEBUG("Skip send NodeInfo: %d hops away is too far away", hopsUsed);
} else { } else {
LOG_INFO("Heard new node on ch. %d, send NodeInfo and ask for response", mp->channel); LOG_INFO("Heard new node on ch. %d, send NodeInfo and ask for response", mp->channel);
@@ -273,10 +276,6 @@ bool MeshService::trySendPosition(NodeNum dest, bool wantReplies)
if (nodeDB->hasValidPosition(node)) { if (nodeDB->hasValidPosition(node)) {
#if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS #if HAS_GPS && !MESHTASTIC_EXCLUDE_GPS
if (positionModule) { if (positionModule) {
if (!config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot()) {
LOG_DEBUG("Skip position ping; no fresh position since boot");
return false;
}
LOG_INFO("Send position ping to 0x%x, wantReplies=%d, channel=%d", dest, wantReplies, node->channel); LOG_INFO("Send position ping to 0x%x, wantReplies=%d, channel=%d", dest, wantReplies, node->channel);
positionModule->sendOurPosition(dest, wantReplies, node->channel); positionModule->sendOurPosition(dest, wantReplies, node->channel);
return true; return true;

View File

@@ -64,7 +64,7 @@ bool NextHopRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
perhapsRebroadcast(p); perhapsRebroadcast(p);
} }
} else { } else {
bool isRepeated = getHopsAway(*p) == 0; bool isRepeated = p->hop_start > 0 && p->hop_start == p->hop_limit;
// If repeated and not in Tx queue anymore, try relaying again, or if we are the destination, send the ACK again // If repeated and not in Tx queue anymore, try relaying again, or if we are the destination, send the ACK again
if (isRepeated) { if (isRepeated) {
if (!findInTxQueue(p->from, p->id)) { if (!findInTxQueue(p->from, p->id)) {
@@ -101,7 +101,8 @@ void NextHopRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtast
bool wasAlreadyRelayer = wasRelayer(p->relay_node, p->decoded.request_id, p->to); bool wasAlreadyRelayer = wasRelayer(p->relay_node, p->decoded.request_id, p->to);
bool weWereSoleRelayer = false; bool weWereSoleRelayer = false;
bool weWereRelayer = wasRelayer(ourRelayID, p->decoded.request_id, p->to, &weWereSoleRelayer); bool weWereRelayer = wasRelayer(ourRelayID, p->decoded.request_id, p->to, &weWereSoleRelayer);
if ((weWereRelayer && wasAlreadyRelayer) || (getHopsAway(*p) == 0 && weWereSoleRelayer)) { if ((weWereRelayer && wasAlreadyRelayer) ||
(p->hop_start != 0 && p->hop_start == p->hop_limit && weWereSoleRelayer)) {
if (origTx->next_hop != p->relay_node) { // Not already set if (origTx->next_hop != p->relay_node) { // Not already set
LOG_INFO("Update next hop of 0x%x to 0x%x based on ACK/reply (was relayer %d we were sole %d)", p->from, LOG_INFO("Update next hop of 0x%x to 0x%x based on ACK/reply (was relayer %d we were sole %d)", p->from,
p->relay_node, wasAlreadyRelayer, weWereSoleRelayer); p->relay_node, wasAlreadyRelayer, weWereSoleRelayer);

View File

@@ -805,12 +805,11 @@ void NodeDB::installDefaultModuleConfig()
moduleConfig.external_notification.output_ms = 500; moduleConfig.external_notification.output_ms = 500;
moduleConfig.external_notification.nag_timeout = 2; moduleConfig.external_notification.nag_timeout = 2;
#endif #endif
#if defined(RAK4630) || defined(RAK11310) || defined(RAK3312) || defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) || \ #if defined(RAK4630) || defined(RAK11310) || defined(RAK3312) || defined(MUZI_BASE)
defined(ELECROW_ThinkNode_M6) // Default to RAK led pin 2 (blue)
// Default to PIN_LED2 for external notification output (LED color depends on device variant)
moduleConfig.external_notification.enabled = true; moduleConfig.external_notification.enabled = true;
moduleConfig.external_notification.output = PIN_LED2; moduleConfig.external_notification.output = PIN_LED2;
#if defined(MUZI_BASE) || defined(ELECROW_ThinkNode_M3) #if defined(MUZI_BASE)
moduleConfig.external_notification.active = false; moduleConfig.external_notification.active = false;
#else #else
moduleConfig.external_notification.active = true; moduleConfig.external_notification.active = true;
@@ -1044,7 +1043,6 @@ void NodeDB::clearLocalPosition()
node->position.altitude = 0; node->position.altitude = 0;
node->position.time = 0; node->position.time = 0;
setLocalPosition(meshtastic_Position_init_default); setLocalPosition(meshtastic_Position_init_default);
localPositionUpdatedSinceBoot = false;
} }
void NodeDB::cleanupMeshDB() void NodeDB::cleanupMeshDB()
@@ -1549,23 +1547,6 @@ uint32_t sinceReceived(const meshtastic_MeshPacket *p)
return delta; return delta;
} }
int8_t getHopsAway(const meshtastic_MeshPacket &p, int8_t defaultIfUnknown)
{
// Firmware prior to 2.3.0 (585805c) lacked a hop_start field. Firmware version 2.5.0 (bf34329) introduced a
// bitfield that is always present. Use the presence of the bitfield to determine if the origin's firmware
// version is guaranteed to have hop_start populated. Note that this can only be done for decoded packets as
// the bitfield is encrypted under the channel encryption key. For encrypted packets, this returns
// defaultIfUnknown when hop_start is 0.
if (p.hop_start == 0 && !(p.which_payload_variant == meshtastic_MeshPacket_decoded_tag && p.decoded.has_bitfield))
return defaultIfUnknown; // Cannot reliably determine the number of hops.
// Guard against invalid values.
if (p.hop_start < p.hop_limit)
return defaultIfUnknown;
return p.hop_start - p.hop_limit;
}
#define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline #define NUM_ONLINE_SECS (60 * 60 * 2) // 2 hrs to consider someone offline
size_t NodeDB::getNumOnlineMeshNodes(bool localOnly) size_t NodeDB::getNumOnlineMeshNodes(bool localOnly)
@@ -1818,10 +1799,9 @@ void NodeDB::updateFrom(const meshtastic_MeshPacket &mp)
info->via_mqtt = mp.via_mqtt; // Store if we received this packet via MQTT info->via_mqtt = mp.via_mqtt; // Store if we received this packet via MQTT
// If hopStart was set and there wasn't someone messing with the limit in the middle, add hopsAway // If hopStart was set and there wasn't someone messing with the limit in the middle, add hopsAway
const int8_t hopsAway = getHopsAway(mp); if (mp.hop_start != 0 && mp.hop_limit <= mp.hop_start) {
if (hopsAway >= 0) {
info->has_hops_away = true; info->has_hops_away = true;
info->hops_away = hopsAway; info->hops_away = mp.hop_start - mp.hop_limit;
} }
sortMeshDB(); sortMeshDB();
} }

View File

@@ -110,10 +110,6 @@ uint32_t sinceLastSeen(const meshtastic_NodeInfoLite *n);
/// Given a packet, return how many seconds in the past (vs now) it was received /// Given a packet, return how many seconds in the past (vs now) it was received
uint32_t sinceReceived(const meshtastic_MeshPacket *p); uint32_t sinceReceived(const meshtastic_MeshPacket *p);
/// Given a packet, return the number of hops used to reach this node.
/// Returns defaultIfUnknown if the number of hops couldn't be determined.
int8_t getHopsAway(const meshtastic_MeshPacket &p, int8_t defaultIfUnknown = -1);
enum LoadFileResult { enum LoadFileResult {
// Successfully opened the file // Successfully opened the file
LOAD_SUCCESS = 1, LOAD_SUCCESS = 1,
@@ -283,13 +279,9 @@ class NodeDB
LOG_DEBUG("Set local position: lat=%i lon=%i time=%u timestamp=%u", position.latitude_i, position.longitude_i, LOG_DEBUG("Set local position: lat=%i lon=%i time=%u timestamp=%u", position.latitude_i, position.longitude_i,
position.time, position.timestamp); position.time, position.timestamp);
localPosition = position; localPosition = position;
if (position.latitude_i != 0 || position.longitude_i != 0) {
localPositionUpdatedSinceBoot = true;
}
} }
bool hasValidPosition(const meshtastic_NodeInfoLite *n); bool hasValidPosition(const meshtastic_NodeInfoLite *n);
bool hasLocalPositionSinceBoot() const { return localPositionUpdatedSinceBoot; }
#if !defined(MESHTASTIC_EXCLUDE_PKI) #if !defined(MESHTASTIC_EXCLUDE_PKI)
bool checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest); bool checkLowEntropyPublicKey(const meshtastic_Config_SecurityConfig_public_key_t &keyToTest);
@@ -309,7 +301,6 @@ class NodeDB
private: private:
bool duplicateWarned = false; bool duplicateWarned = false;
bool localPositionUpdatedSinceBoot = false;
uint32_t lastNodeDbSave = 0; // when we last saved our db to flash uint32_t lastNodeDbSave = 0; // when we last saved our db to flash
uint32_t lastBackupAttempt = 0; // when we last tried a backup automatically or manually uint32_t lastBackupAttempt = 0; // when we last tried a backup automatically or manually
uint32_t lastSort = 0; // When last sorted the nodeDB uint32_t lastSort = 0; // When last sorted the nodeDB

View File

@@ -296,6 +296,11 @@ bool RadioInterface::shouldRebroadcastEarlyLikeRouter(meshtastic_MeshPacket *p)
return true; return true;
} }
// If we are a CLIENT_BASE and the packet is from or to a favorited node, we should rebroadcast early
if (config.device.role == meshtastic_Config_DeviceConfig_Role_CLIENT_BASE) {
return nodeDB->isFromOrToFavoritedNode(*p);
}
return false; return false;
} }

View File

@@ -1,7 +1,6 @@
#include "ReliableRouter.h" #include "ReliableRouter.h"
#include "Default.h" #include "Default.h"
#include "MeshTypes.h" #include "MeshTypes.h"
#include "NodeDB.h"
#include "configuration.h" #include "configuration.h"
#include "memGet.h" #include "memGet.h"
#include "mesh-pb-constants.h" #include "mesh-pb-constants.h"
@@ -109,12 +108,12 @@ void ReliableRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
// If this packet should always be ACKed reliably with want_ack back to the original sender, make sure we // If this packet should always be ACKed reliably with want_ack back to the original sender, make sure we
// do that unconditionally. // do that unconditionally.
sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel,
routingModule->getHopLimitForResponse(*p), true); routingModule->getHopLimitForResponse(p->hop_start, p->hop_limit), true);
} else if (!p->decoded.request_id && !p->decoded.reply_id) { } else if (!p->decoded.request_id && !p->decoded.reply_id) {
// If it's not an ACK or a reply, send an ACK. // If it's not an ACK or a reply, send an ACK.
sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel, sendAckNak(meshtastic_Routing_Error_NONE, getFrom(p), p->id, p->channel,
routingModule->getHopLimitForResponse(*p)); routingModule->getHopLimitForResponse(p->hop_start, p->hop_limit));
} else if ((getHopsAway(*p) == 0) || p->next_hop != NO_NEXT_HOP_PREFERENCE) { } else if ((p->hop_start > 0 && p->hop_start == p->hop_limit) || p->next_hop != NO_NEXT_HOP_PREFERENCE) {
// If we received the packet directly from the original sender, send a 0-hop ACK since the original sender // If we received the packet directly from the original sender, send a 0-hop ACK since the original sender
// won't overhear any implicit ACKs. If we received the packet via NextHopRouter, also send a 0-hop ACK to // won't overhear any implicit ACKs. If we received the packet via NextHopRouter, also send a 0-hop ACK to
// stop the immediate relayer's retransmissions. // stop the immediate relayer's retransmissions.
@@ -124,11 +123,11 @@ void ReliableRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
(nodeDB->getMeshNode(p->from) == nullptr || nodeDB->getMeshNode(p->from)->user.public_key.size == 0)) { (nodeDB->getMeshNode(p->from) == nullptr || nodeDB->getMeshNode(p->from)->user.public_key.size == 0)) {
LOG_INFO("PKI packet from unknown node, send PKI_UNKNOWN_PUBKEY"); LOG_INFO("PKI packet from unknown node, send PKI_UNKNOWN_PUBKEY");
sendAckNak(meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY, getFrom(p), p->id, channels.getPrimaryIndex(), sendAckNak(meshtastic_Routing_Error_PKI_UNKNOWN_PUBKEY, getFrom(p), p->id, channels.getPrimaryIndex(),
routingModule->getHopLimitForResponse(*p)); routingModule->getHopLimitForResponse(p->hop_start, p->hop_limit));
} else { } else {
// Send a 'NO_CHANNEL' error on the primary channel if want_ack packet destined for us cannot be decoded // Send a 'NO_CHANNEL' error on the primary channel if want_ack packet destined for us cannot be decoded
sendAckNak(meshtastic_Routing_Error_NO_CHANNEL, getFrom(p), p->id, channels.getPrimaryIndex(), sendAckNak(meshtastic_Routing_Error_NO_CHANNEL, getFrom(p), p->id, channels.getPrimaryIndex(),
routingModule->getHopLimitForResponse(*p)); routingModule->getHopLimitForResponse(p->hop_start, p->hop_limit));
} }
} else if (p->next_hop == nodeDB->getLastByteOfNodeNum(getNodeNum()) && p->hop_limit > 0) { } else if (p->next_hop == nodeDB->getLastByteOfNodeNum(getNodeNum()) && p->hop_limit > 0) {
// No wantAck, but we need to ACK with hop limit of 0 if we were the next hop to stop their retransmissions // No wantAck, but we need to ACK with hop limit of 0 if we were the next hop to stop their retransmissions

View File

@@ -81,7 +81,8 @@ Router::Router() : concurrency::OSThread("Router"), fromRadioQueue(MAX_RX_FROMRA
bool Router::shouldDecrementHopLimit(const meshtastic_MeshPacket *p) bool Router::shouldDecrementHopLimit(const meshtastic_MeshPacket *p)
{ {
// First hop MUST always decrement to prevent retry issues // First hop MUST always decrement to prevent retry issues
if (getHopsAway(*p) == 0) { bool isFirstHop = (p->hop_start != 0 && p->hop_start == p->hop_limit);
if (isFirstHop) {
return true; // Always decrement on first hop return true; // Always decrement on first hop
} }
@@ -691,7 +692,7 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
// Store a copy of encrypted packet for MQTT // Store a copy of encrypted packet for MQTT
DEBUG_HEAP_BEFORE; DEBUG_HEAP_BEFORE;
meshtastic_MeshPacket *p_encrypted = packetPool.allocCopy(*p); p_encrypted = packetPool.allocCopy(*p);
DEBUG_HEAP_AFTER("Router::handleReceived", p_encrypted); DEBUG_HEAP_AFTER("Router::handleReceived", p_encrypted);
// Take those raw bytes and convert them back into a well structured protobuf we can understand // Take those raw bytes and convert them back into a well structured protobuf we can understand
@@ -757,6 +758,7 @@ void Router::handleReceived(meshtastic_MeshPacket *p, RxSource src)
} }
packetPool.release(p_encrypted); // Release the encrypted packet packetPool.release(p_encrypted); // Release the encrypted packet
p_encrypted = nullptr;
} }
void Router::perhapsHandleReceived(meshtastic_MeshPacket *p) void Router::perhapsHandleReceived(meshtastic_MeshPacket *p)

View File

@@ -91,6 +91,9 @@ class Router : protected concurrency::OSThread, protected PacketHistory
before us */ before us */
uint32_t rxDupe = 0, txRelayCanceled = 0; uint32_t rxDupe = 0, txRelayCanceled = 0;
// pointer to the encrypted packet
meshtastic_MeshPacket *p_encrypted = nullptr;
protected: protected:
friend class RoutingModule; friend class RoutingModule;

View File

@@ -170,7 +170,7 @@ bool NeighborInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp,
} else { } else {
LOG_DEBUG(" Ignoring dummy neighbor info packet (single neighbor with nodeId 0, snr 0)"); LOG_DEBUG(" Ignoring dummy neighbor info packet (single neighbor with nodeId 0, snr 0)");
} }
} else if (getHopsAway(mp) == 0) { } else if (mp.hop_start != 0 && mp.hop_start == mp.hop_limit) {
LOG_DEBUG("Get or create neighbor: %u with snr %f", mp.from, mp.rx_snr); LOG_DEBUG("Get or create neighbor: %u with snr %f", mp.from, mp.rx_snr);
// If the hopLimit is the same as hopStart, then it is a neighbor // If the hopLimit is the same as hopStart, then it is a neighbor
getOrCreateNeighbor(mp.from, mp.from, 0, getOrCreateNeighbor(mp.from, mp.from, 0,

View File

@@ -7,41 +7,17 @@
#include "configuration.h" #include "configuration.h"
#include "main.h" #include "main.h"
#include <Throttle.h> #include <Throttle.h>
#include <algorithm>
#ifndef USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS
#define USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS (12 * 60 * 60)
#endif
NodeInfoModule *nodeInfoModule; NodeInfoModule *nodeInfoModule;
static constexpr uint32_t NodeInfoReplySuppressSeconds = USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS;
bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_User *pptr) bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_User *pptr)
{ {
suppressReplyForCurrentRequest = false;
if (mp.from == nodeDB->getNodeNum()) { if (mp.from == nodeDB->getNodeNum()) {
LOG_WARN("Ignoring packet supposed to be from our own node: %08x", mp.from); LOG_WARN("Ignoring packet supposed to be from our own node: %08x", mp.from);
return false; return false;
} }
auto p = *pptr; auto p = *pptr;
if (mp.decoded.want_response) {
const NodeNum sender = getFrom(&mp);
const uint32_t now = mp.rx_time ? mp.rx_time : getTime();
auto it = lastNodeInfoSeen.find(sender);
if (it != lastNodeInfoSeen.end()) {
uint32_t sinceLast = now >= it->second ? now - it->second : 0;
if (sinceLast < NodeInfoReplySuppressSeconds) {
suppressReplyForCurrentRequest = true;
}
}
lastNodeInfoSeen[sender] = now;
pruneLastNodeInfoCache();
}
if (p.is_licensed != owner.is_licensed) { if (p.is_licensed != owner.is_licensed) {
LOG_WARN("Invalid nodeInfo detected, is_licensed mismatch!"); LOG_WARN("Invalid nodeInfo detected, is_licensed mismatch!");
return true; return true;
@@ -66,8 +42,6 @@ bool NodeInfoModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mes
service->sendToPhone(packetCopy); service->sendToPhone(packetCopy);
} }
pruneLastNodeInfoCache();
// LOG_DEBUG("did handleReceived"); // LOG_DEBUG("did handleReceived");
return false; // Let others look at this message also if they want return false; // Let others look at this message also if they want
} }
@@ -94,11 +68,9 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha
if (p) { // Check whether we didn't ignore it if (p) { // Check whether we didn't ignore it
p->to = dest; p->to = dest;
bool requestWantResponse = (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER && p->decoded.want_response = (config.device.role != meshtastic_Config_DeviceConfig_Role_TRACKER &&
config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) && config.device.role != meshtastic_Config_DeviceConfig_Role_SENSOR) &&
wantReplies; wantReplies;
p->decoded.want_response = requestWantResponse;
if (_shorterTimeout) if (_shorterTimeout)
p->priority = meshtastic_MeshPacket_Priority_DEFAULT; p->priority = meshtastic_MeshPacket_Priority_DEFAULT;
else else
@@ -117,13 +89,6 @@ void NodeInfoModule::sendOurNodeInfo(NodeNum dest, bool wantReplies, uint8_t cha
meshtastic_MeshPacket *NodeInfoModule::allocReply() meshtastic_MeshPacket *NodeInfoModule::allocReply()
{ {
if (suppressReplyForCurrentRequest) {
LOG_DEBUG("Skip send NodeInfo since we heard the requester <12h ago");
ignoreRequest = true;
suppressReplyForCurrentRequest = false;
return NULL;
}
if (!airTime->isTxAllowedChannelUtil(false)) { if (!airTime->isTxAllowedChannelUtil(false)) {
ignoreRequest = true; // Mark it as ignored for MeshModule ignoreRequest = true; // Mark it as ignored for MeshModule
LOG_DEBUG("Skip send NodeInfo > 40%% ch. util"); LOG_DEBUG("Skip send NodeInfo > 40%% ch. util");
@@ -160,29 +125,6 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
} }
} }
void NodeInfoModule::pruneLastNodeInfoCache()
{
if (!nodeDB || !nodeDB->meshNodes)
return;
const size_t maxEntries = nodeDB->meshNodes->size();
for (auto it = lastNodeInfoSeen.begin(); it != lastNodeInfoSeen.end();) {
if (!nodeDB->getMeshNode(it->first)) {
it = lastNodeInfoSeen.erase(it);
} else {
++it;
}
}
while (!lastNodeInfoSeen.empty() && lastNodeInfoSeen.size() > maxEntries) {
auto oldestIt = std::min_element(lastNodeInfoSeen.begin(), lastNodeInfoSeen.end(),
[](const std::pair<const NodeNum, uint32_t> &lhs,
const std::pair<const NodeNum, uint32_t> &rhs) { return lhs.second < rhs.second; });
lastNodeInfoSeen.erase(oldestIt);
}
}
NodeInfoModule::NodeInfoModule() NodeInfoModule::NodeInfoModule()
: ProtobufModule("nodeinfo", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread("NodeInfo") : ProtobufModule("nodeinfo", meshtastic_PortNum_NODEINFO_APP, &meshtastic_User_msg), concurrency::OSThread("NodeInfo")
{ {

View File

@@ -1,6 +1,5 @@
#pragma once #pragma once
#include "ProtobufModule.h" #include "ProtobufModule.h"
#include <map>
/** /**
* NodeInfo module for sending/receiving NodeInfos into the mesh * NodeInfo module for sending/receiving NodeInfos into the mesh
@@ -44,10 +43,6 @@ class NodeInfoModule : public ProtobufModule<meshtastic_User>, private concurren
private: private:
uint32_t lastSentToMesh = 0; // Last time we sent our NodeInfo to the mesh uint32_t lastSentToMesh = 0; // Last time we sent our NodeInfo to the mesh
bool shorterTimeout = false; bool shorterTimeout = false;
bool suppressReplyForCurrentRequest = false;
std::map<NodeNum, uint32_t> lastNodeInfoSeen;
void pruneLastNodeInfoCache();
}; };
extern NodeInfoModule *nodeInfoModule; extern NodeInfoModule *nodeInfoModule;

View File

@@ -349,11 +349,6 @@ void PositionModule::sendOurPosition()
void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t channel) void PositionModule::sendOurPosition(NodeNum dest, bool wantReplies, uint8_t channel)
{ {
if (!config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot()) {
LOG_DEBUG("Skip position send; no fresh position since boot");
return;
}
// cancel any not yet sent (now stale) position packets // cancel any not yet sent (now stale) position packets
if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal) if (prevPacketId) // if we wrap around to zero, we'll simply fail to cancel in that rare case (no big deal)
service->cancelSending(prevPacketId); service->cancelSending(prevPacketId);
@@ -425,14 +420,8 @@ int32_t PositionModule::runOnce()
return RUNONCE_INTERVAL; return RUNONCE_INTERVAL;
} }
bool waitingForFreshPosition = (lastGpsSend == 0) && !config.position.fixed_position && !nodeDB->hasLocalPositionSinceBoot();
if (lastGpsSend == 0 || msSinceLastSend >= intervalMs) { if (lastGpsSend == 0 || msSinceLastSend >= intervalMs) {
if (waitingForFreshPosition) { if (nodeDB->hasValidPosition(node)) {
#ifdef GPS_DEBUG
LOG_DEBUG("Skip initial position send; no fresh position since boot");
#endif
} else if (nodeDB->hasValidPosition(node)) {
lastGpsSend = now; lastGpsSend = now;
lastGpsLatitude = node->position.latitude_i; lastGpsLatitude = node->position.latitude_i;

View File

@@ -58,11 +58,12 @@ void RoutingModule::sendAckNak(meshtastic_Routing_Error err, NodeNum to, PacketI
router->sendLocal(p); // we sometimes send directly to the local node router->sendLocal(p); // we sometimes send directly to the local node
} }
uint8_t RoutingModule::getHopLimitForResponse(const meshtastic_MeshPacket &mp) uint8_t RoutingModule::getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit)
{ {
const int8_t hopsUsed = getHopsAway(mp); if (hopStart != 0) {
if (hopsUsed >= 0) { // Hops used by the request. If somebody in between running modified firmware modified it, ignore it
if (hopsUsed > (int32_t)(config.lora.hop_limit)) { uint8_t hopsUsed = hopStart < hopLimit ? config.lora.hop_limit : hopStart - hopLimit;
if (hopsUsed > config.lora.hop_limit) {
// In event mode, we never want to send packets with more than our default 3 hops. // In event mode, we never want to send packets with more than our default 3 hops.
#if !(EVENTMODE) // This falls through to the default. #if !(EVENTMODE) // This falls through to the default.
return hopsUsed; // If the request used more hops than the limit, use the same amount of hops return hopsUsed; // If the request used more hops than the limit, use the same amount of hops

View File

@@ -20,7 +20,7 @@ class RoutingModule : public ProtobufModule<meshtastic_Routing>
uint8_t hopLimit = 0); uint8_t hopLimit = 0);
// Given the hopStart and hopLimit upon reception of a request, return the hop limit to use for the response // Given the hopStart and hopLimit upon reception of a request, return the hop limit to use for the response
uint8_t getHopLimitForResponse(const meshtastic_MeshPacket &mp); uint8_t getHopLimitForResponse(uint8_t hopStart, uint8_t hopLimit);
protected: protected:
friend class Router; friend class Router;

View File

@@ -20,17 +20,13 @@ int StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)
switch (arg->getStatusType()) { switch (arg->getStatusType()) {
case STATUS_TYPE_POWER: { case STATUS_TYPE_POWER: {
meshtastic::PowerStatus *powerStatus = (meshtastic::PowerStatus *)arg; meshtastic::PowerStatus *powerStatus = (meshtastic::PowerStatus *)arg;
if (powerStatus->getHasUSB() || powerStatus->getIsCharging()) { if (powerStatus->getHasUSB()) {
power_state = charging; power_state = charging;
if (powerStatus->getBatteryChargePercent() >= 100) { if (powerStatus->getBatteryChargePercent() >= 100) {
power_state = charged; power_state = charged;
} }
} else { } else {
if (powerStatus->getBatteryChargePercent() > 5) { power_state = discharging;
power_state = discharging;
} else {
power_state = critical;
}
} }
break; break;
} }
@@ -62,33 +58,16 @@ int StatusLEDModule::handleStatusUpdate(const meshtastic::Status *arg)
int32_t StatusLEDModule::runOnce() int32_t StatusLEDModule::runOnce()
{ {
my_interval = 1000;
if (power_state == charging) { if (power_state == charging) {
CHARGE_LED_state = !CHARGE_LED_state; CHARGE_LED_state = !CHARGE_LED_state;
} else if (power_state == charged) { } else if (power_state == charged) {
CHARGE_LED_state = LED_STATE_ON; CHARGE_LED_state = LED_STATE_ON;
} else if (power_state == critical) {
if (POWER_LED_starttime + 30000 < millis() && !doing_fast_blink) {
doing_fast_blink = true;
POWER_LED_starttime = millis();
}
if (doing_fast_blink) {
PAIRING_LED_state = LED_STATE_OFF;
CHARGE_LED_state = !CHARGE_LED_state;
my_interval = 250;
if (POWER_LED_starttime + 2000 < millis()) {
doing_fast_blink = false;
}
} else {
CHARGE_LED_state = LED_STATE_OFF;
}
} else { } else {
CHARGE_LED_state = LED_STATE_OFF; CHARGE_LED_state = LED_STATE_OFF;
} }
if (!config.bluetooth.enabled || PAIRING_LED_starttime + 30 * 1000 < millis() || doing_fast_blink) { if (!config.bluetooth.enabled || PAIRING_LED_starttime + 30 * 1000 < millis()) {
PAIRING_LED_state = LED_STATE_OFF; PAIRING_LED_state = LED_STATE_OFF;
} else if (ble_state == unpaired) { } else if (ble_state == unpaired) {
if (slowTrack) { if (slowTrack) {

View File

@@ -31,10 +31,8 @@ class StatusLEDModule : private concurrency::OSThread
bool PAIRING_LED_state = LED_STATE_OFF; bool PAIRING_LED_state = LED_STATE_OFF;
uint32_t PAIRING_LED_starttime = 0; uint32_t PAIRING_LED_starttime = 0;
uint32_t POWER_LED_starttime = 0;
bool doing_fast_blink = false;
enum PowerState { discharging, charging, charged, critical }; enum PowerState { discharging, charging, charged };
PowerState power_state = discharging; PowerState power_state = discharging;

View File

@@ -1,6 +1,5 @@
#include "TraceRouteModule.h" #include "TraceRouteModule.h"
#include "MeshService.h" #include "MeshService.h"
#include "NodeDB.h"
#include "graphics/Screen.h" #include "graphics/Screen.h"
#include "graphics/ScreenFonts.h" #include "graphics/ScreenFonts.h"
#include "graphics/SharedUIDisplay.h" #include "graphics/SharedUIDisplay.h"
@@ -360,10 +359,10 @@ void TraceRouteModule::insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_Ro
} }
// Only insert unknown hops if hop_start is valid // Only insert unknown hops if hop_start is valid
const int8_t hopsTaken = getHopsAway(p); if (p.hop_start != 0 && p.hop_limit <= p.hop_start) {
if (hopsTaken >= 0) { uint8_t hopsTaken = p.hop_start - p.hop_limit;
int8_t diff = hopsTaken - *route_count; int8_t diff = hopsTaken - *route_count;
for (int8_t i = 0; i < diff; i++) { for (uint8_t i = 0; i < diff; i++) {
if (*route_count < ROUTE_SIZE) { if (*route_count < ROUTE_SIZE) {
route[*route_count] = NODENUM_BROADCAST; // This will represent an unknown hop route[*route_count] = NODENUM_BROADCAST; // This will represent an unknown hop
*route_count += 1; *route_count += 1;
@@ -371,7 +370,7 @@ void TraceRouteModule::insertUnknownHops(meshtastic_MeshPacket &p, meshtastic_Ro
} }
// Add unknown SNR values if necessary // Add unknown SNR values if necessary
diff = *route_count - *snr_count; diff = *route_count - *snr_count;
for (int8_t i = 0; i < diff; i++) { for (uint8_t i = 0; i < diff; i++) {
if (*snr_count < ROUTE_SIZE) { if (*snr_count < ROUTE_SIZE) {
snr_list[*snr_count] = INT8_MIN; // This will represent an unknown SNR snr_list[*snr_count] = INT8_MIN; // This will represent an unknown SNR
*snr_count += 1; *snr_count += 1;

View File

@@ -279,7 +279,7 @@ void portduinoSetup()
// RAK6421-13300-S1:aabbcc123456:5ba85807d92138b7519cfb60460573af:3061e8d8 // RAK6421-13300-S1:aabbcc123456:5ba85807d92138b7519cfb60460573af:3061e8d8
// <model string>:mac address :<16 random unique bytes in hexidecimal> : crc32 // <model string>:mac address :<16 random unique bytes in hexidecimal> : crc32
// crc32 is calculated on the eeprom string up to but not including the final colon // crc32 is calculated on the eeprom string up to but not including the final colon
if (strlen(autoconf_product) < 6 && portduino_config.i2cdev != "") { if (strlen(autoconf_product) < 6) {
try { try {
char *mac_start = nullptr; char *mac_start = nullptr;
char *devID_start = nullptr; char *devID_start = nullptr;
@@ -867,4 +867,4 @@ void readGPIOFromYaml(YAML::Node sourceNode, pinMapping &destPin, int pinDefault
destPin.line = destPin.pin; destPin.line = destPin.pin;
destPin.gpiochip = portduino_config.lora_default_gpiochip; destPin.gpiochip = portduino_config.lora_default_gpiochip;
} }
} }

View File

@@ -418,9 +418,8 @@ std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp,
jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi); jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi);
if (mp->rx_snr != 0) if (mp->rx_snr != 0)
jsonObj["snr"] = new JSONValue((float)mp->rx_snr); jsonObj["snr"] = new JSONValue((float)mp->rx_snr);
const int8_t hopsAway = getHopsAway(*mp); if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) {
if (hopsAway >= 0) { jsonObj["hops_away"] = new JSONValue((unsigned int)(mp->hop_start - mp->hop_limit));
jsonObj["hops_away"] = new JSONValue((unsigned int)(hopsAway));
jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start)); jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start));
} }
@@ -451,9 +450,8 @@ std::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPa
jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi); jsonObj["rssi"] = new JSONValue((int)mp->rx_rssi);
if (mp->rx_snr != 0) if (mp->rx_snr != 0)
jsonObj["snr"] = new JSONValue((float)mp->rx_snr); jsonObj["snr"] = new JSONValue((float)mp->rx_snr);
const int8_t hopsAway = getHopsAway(*mp); if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) {
if (hopsAway >= 0) { jsonObj["hops_away"] = new JSONValue((unsigned int)(mp->hop_start - mp->hop_limit));
jsonObj["hops_away"] = new JSONValue((unsigned int)(hopsAway));
jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start)); jsonObj["hop_start"] = new JSONValue((unsigned int)(mp->hop_start));
} }
jsonObj["size"] = new JSONValue((unsigned int)mp->encrypted.size); jsonObj["size"] = new JSONValue((unsigned int)mp->encrypted.size);

View File

@@ -358,9 +358,8 @@ std::string MeshPacketSerializer::JsonSerialize(const meshtastic_MeshPacket *mp,
jsonObj["rssi"] = (int)mp->rx_rssi; jsonObj["rssi"] = (int)mp->rx_rssi;
if (mp->rx_snr != 0) if (mp->rx_snr != 0)
jsonObj["snr"] = (float)mp->rx_snr; jsonObj["snr"] = (float)mp->rx_snr;
const int8_t hopsAway = getHopsAway(*mp); if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) {
if (hopsAway >= 0) { jsonObj["hops_away"] = (unsigned int)(mp->hop_start - mp->hop_limit);
jsonObj["hops_away"] = (unsigned int)(hopsAway);
jsonObj["hop_start"] = (unsigned int)(mp->hop_start); jsonObj["hop_start"] = (unsigned int)(mp->hop_start);
} }
@@ -394,9 +393,8 @@ std::string MeshPacketSerializer::JsonSerializeEncrypted(const meshtastic_MeshPa
jsonObj["rssi"] = (int)mp->rx_rssi; jsonObj["rssi"] = (int)mp->rx_rssi;
if (mp->rx_snr != 0) if (mp->rx_snr != 0)
jsonObj["snr"] = (float)mp->rx_snr; jsonObj["snr"] = (float)mp->rx_snr;
const int8_t hopsAway = getHopsAway(*mp); if (mp->hop_start != 0 && mp->hop_limit <= mp->hop_start) {
if (hopsAway >= 0) { jsonObj["hops_away"] = (unsigned int)(mp->hop_start - mp->hop_limit);
jsonObj["hops_away"] = (unsigned int)(hopsAway);
jsonObj["hop_start"] = (unsigned int)(mp->hop_start); jsonObj["hop_start"] = (unsigned int)(mp->hop_start);
} }
jsonObj["size"] = (unsigned int)mp->encrypted.size; jsonObj["size"] = (unsigned int)mp->encrypted.size;

View File

@@ -55,7 +55,6 @@
// "USERPREFS_MQTT_TLS_ENABLED": "false", // "USERPREFS_MQTT_TLS_ENABLED": "false",
// "USERPREFS_MQTT_ROOT_TOPIC": "event/REPLACEME", // "USERPREFS_MQTT_ROOT_TOPIC": "event/REPLACEME",
// "USERPREFS_RINGTONE_NAG_SECS": "60", // "USERPREFS_RINGTONE_NAG_SECS": "60",
// "USERPREFS_NODEINFO_REPLY_SUPPRESS_SECS": "43200",
"USERPREFS_RINGTONE_RTTTL": "24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p", "USERPREFS_RINGTONE_RTTTL": "24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p",
// "USERPREFS_NETWORK_IPV6_ENABLED": "1", // "USERPREFS_NETWORK_IPV6_ENABLED": "1",
"USERPREFS_TZ_STRING": "tzplaceholder " "USERPREFS_TZ_STRING": "tzplaceholder "

View File

@@ -15,4 +15,5 @@ upload_protocol = esptool
upload_speed = 460800 upload_speed = 460800
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
adafruit/Adafruit NeoPixel @ ^1.12.0 # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2

View File

@@ -13,5 +13,3 @@ board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool
;upload_port = /dev/ttyUSB0 ;upload_port = /dev/ttyUSB0
upload_speed = 460800 upload_speed = 460800
lib_deps =
${esp32_base.lib_deps}

View File

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

View File

@@ -53,17 +53,18 @@ 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}
# 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/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
# 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=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib
https://github.com/lewisxhe/XPowersLib/archive/v0.3.2.zip lewisxhe/XPowersLib@0.3.2
# 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

View File

@@ -25,4 +25,5 @@ lib_ignore =
m5stack-core m5stack-core
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7

View File

@@ -18,8 +18,10 @@ build_flags =
-DM5STACK -DM5STACK
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
zinggjm/GxEPD2@^1.6.2 # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
lewisxhe/PCF8563_Library@^1.0.1 zinggjm/GxEPD2@1.6.5
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
lib_ignore = lib_ignore =
m5stack-coreink m5stack-coreink
monitor_filters = esp32_exception_decoder monitor_filters = esp32_exception_decoder

View File

@@ -2,8 +2,6 @@
[env:nano-g1-explorer] [env:nano-g1-explorer]
extends = esp32_base extends = esp32_base
board = ttgo-t-beam board = ttgo-t-beam
lib_deps =
${esp32_base.lib_deps}
build_flags = build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D NANO_G1_EXPLORER -D NANO_G1_EXPLORER

View File

@@ -2,8 +2,6 @@
[env:nano-g1] [env:nano-g1]
extends = esp32_base extends = esp32_base
board = ttgo-t-beam board = ttgo-t-beam
lib_deps =
${esp32_base.lib_deps}
build_flags = build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D NANO_G1 -D NANO_G1

View File

@@ -13,4 +13,5 @@ board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
# renovate: datasource=github-tags depName=STK8xxx-Accelerometer packageName=gjelsoe/STK8xxx-Accelerometer
https://github.com/gjelsoe/STK8xxx-Accelerometer/archive/v0.1.1.zip https://github.com/gjelsoe/STK8xxx-Accelerometer/archive/v0.1.1.zip

View File

@@ -15,5 +15,3 @@ build_flags =
-I variants/esp32/radiomaster_900_bandit_nano -I variants/esp32/radiomaster_900_bandit_nano
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool
lib_deps =
${esp32_base.lib_deps}

View File

@@ -10,5 +10,3 @@ build_flags =
-I variants/esp32/radiomaster_900_bandit_nano -I variants/esp32/radiomaster_900_bandit_nano
board_build.f_cpu = 240000000L board_build.f_cpu = 240000000L
upload_protocol = esptool upload_protocol = esptool
lib_deps =
${esp32_base.lib_deps}

View File

@@ -2,8 +2,6 @@
[env:station-g1] [env:station-g1]
extends = esp32_base extends = esp32_base
board = ttgo-t-beam board = ttgo-t-beam
lib_deps =
${esp32_base.lib_deps}
build_flags = build_flags =
${esp32_base.build_flags} ${esp32_base.build_flags}
-D STATION_G1 -D STATION_G1

View File

@@ -4,7 +4,6 @@ extends = esp32_base
board = ttgo-t-beam board = ttgo-t-beam
board_level = extra board_level = extra
board_check = true board_check = true
lib_deps = ${esp32_base.lib_deps}
build_flags = ${esp32_base.build_flags} build_flags = ${esp32_base.build_flags}
-D TBEAM_V10 -D TBEAM_V10
-I variants/esp32/tbeam -I variants/esp32/tbeam
@@ -21,5 +20,7 @@ build_flags =
lib_deps = lib_deps =
${env:tbeam.lib_deps} ${env:tbeam.lib_deps}
https://github.com/meshtastic/st7796/archive/refs/tags/1.0.5.zip ; display addon # renovate: datasource=github-tags depName=meshtastic-st7796 packageName=meshtastic/st7796
lewisxhe/SensorLib@0.3.1 ; touchscreen addon https://github.com/meshtastic/st7796/archive/1.0.5.zip
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/SensorLib@0.3.1

View File

@@ -10,6 +10,9 @@ build_flags =
-I variants/esp32/wiphone -I variants/esp32/wiphone
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
sparkfun/SX1509 IO Expander@^3.0.5 lovyan03/LovyanGFX@1.2.7
pololu/APA102@^3.0.0 # renovate: datasource=custom.pio depName=SX1509 IO Expander packageName=sparkfun/library/SX1509 IO Expander
sparkfun/SX1509 IO Expander@3.0.6
# renovate: datasource=custom.pio depName=APA102 packageName=pololu/library/APA102
pololu/APA102@3.0.0

View File

@@ -4,7 +4,7 @@
extends = esp32c3_base extends = esp32c3_base
board = esp32-c3-devkitm-1 board = esp32-c3-devkitm-1
build_flags = build_flags =
${esp32_base.build_flags} ${esp32c3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32c3/diy/esp32c3_super_mini -I variants/esp32c3/diy/esp32c3_super_mini
-D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MODE=1

View File

@@ -3,7 +3,7 @@ extends = esp32c3_base
board = esp32-c3-devkitm-1 board = esp32-c3-devkitm-1
board_level = extra board_level = extra
build_flags = build_flags =
${esp32_base.build_flags} ${esp32c3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-D ARDUINO_USB_MODE=1 -D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_CDC_ON_BOOT=1

View File

@@ -3,7 +3,7 @@ extends = esp32c3_base
board = esp32-c3-devkitm-1 board = esp32-c3-devkitm-1
board_level = pr board_level = pr
build_flags = build_flags =
${esp32_base.build_flags} ${esp32c3_base.build_flags}
-D HELTEC_HT62 -D HELTEC_HT62
-I variants/esp32c3/heltec_esp32c3 -I variants/esp32c3/heltec_esp32c3
monitor_speed = 115200 monitor_speed = 115200

View File

@@ -2,8 +2,9 @@
extends = esp32c3_base extends = esp32c3_base
board = adafruit_qtpy_esp32c3 board = adafruit_qtpy_esp32c3
build_flags = build_flags =
${esp32_base.build_flags} ${esp32c3_base.build_flags}
-D HELTEC_HRU_3601 -D HELTEC_HRU_3601
-I variants/esp32c3/heltec_hru_3601 -I variants/esp32c3/heltec_hru_3601
lib_deps = ${esp32c3_base.lib_deps} lib_deps = ${esp32c3_base.lib_deps}
adafruit/Adafruit NeoPixel @ ^1.12.0 # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2

View File

@@ -3,7 +3,7 @@ extends = esp32c3_base
board = esp32-c3-devkitm-1 board = esp32-c3-devkitm-1
board_level = extra board_level = extra
build_flags = build_flags =
${esp32_base.build_flags} ${esp32c3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32c3/m5stack-stamp-c3 -I variants/esp32c3/m5stack-stamp-c3
monitor_speed = 115200 monitor_speed = 115200

View File

@@ -12,8 +12,10 @@ build_unflags =
-D HAS_WIFI -D HAS_WIFI
lib_deps = lib_deps =
${esp32c6_base.lib_deps} ${esp32c6_base.lib_deps}
adafruit/Adafruit NeoPixel@^1.12.3 # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
h2zero/NimBLE-Arduino@^2.3.6 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

View File

@@ -16,6 +16,9 @@ build_flags =
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
maxpromer/PCA9557-arduino @ ^1.0.0 lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=PCA9557-arduino packageName=maxpromer/library/PCA9557-arduino
maxpromer/PCA9557-arduino@1.0.0

View File

@@ -8,9 +8,10 @@ board_level = extra
upload_protocol = esptool upload_protocol = esptool
;upload_port = /dev/ttyACM2 ;upload_port = /dev/ttyACM2
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32s3_base.lib_deps}
caveman99/ESP32 Codec2@^1.0.1 # renovate: datasource=custom.pio depName=caveman99-ESP32_Codec2 packageName=caveman99/library/ESP32 Codec2
caveman99/ESP32 Codec2@1.0.1
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32s3/bpi_picow_esp32_s3 -I variants/esp32s3/bpi_picow_esp32_s3

View File

@@ -25,6 +25,7 @@ build_flags =
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
[env:crowpanel-esp32s3-4-epaper] [env:crowpanel-esp32s3-4-epaper]
@@ -54,6 +55,7 @@ build_flags =
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip
[env:crowpanel-esp32s3-2-epaper] [env:crowpanel-esp32s3-2-epaper]
@@ -83,4 +85,5 @@ build_flags =
;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ;-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip https://github.com/meshtastic/GxEPD2/archive/33db3fa8ee6fc47d160bdb44f8f127c9a9203a10.zip

View File

@@ -9,14 +9,16 @@ upload_protocol = esptool
;upload_port = /dev/ttyACM1 ;upload_port = /dev/ttyACM1
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32s3_base.lib_deps}
zinggjm/GxEPD2@^1.6.2 # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
adafruit/Adafruit NeoPixel @ ^1.12.0 zinggjm/GxEPD2@1.6.5
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2
build_unflags = build_unflags =
${esp32s3_base.build_unflags} ${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32s3/diy/my_esp32s3_diy_eink -I variants/esp32s3/diy/my_esp32s3_diy_eink
-Dmy -Dmy

View File

@@ -9,13 +9,14 @@ upload_protocol = esptool
;upload_port = /dev/ttyACM0 ;upload_port = /dev/ttyACM0
upload_speed = 921600 upload_speed = 921600
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32s3_base.lib_deps}
adafruit/Adafruit NeoPixel @ ^1.12.0 # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2
build_unflags = build_unflags =
${esp32s3_base.build_unflags} ${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1
build_flags = build_flags =
${esp32_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

View File

@@ -12,8 +12,10 @@ build_flags =
-D ARDUINO_USB_CDC_ON_BOOT=1 -D ARDUINO_USB_CDC_ON_BOOT=1
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
earlephilhower/ESP8266Audio@^1.9.9 # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266SAM@^1.0.1 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0
[env:dreamcatcher-2206] [env:dreamcatcher-2206]
extends = esp32s3_base extends = esp32s3_base

View File

@@ -41,9 +41,13 @@ build_flags = ${esp32s3_base.build_flags} -Os
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
earlephilhower/ESP8266Audio@1.9.9 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.0.1 earlephilhower/ESP8266SAM@1.0.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.0 ; note: v1.2.7 breaks the elecrow 7" display functionality
# renovate: datasource=custom.pio depName=TCA9534 packageName=hideakitai/library/TCA9534
hideakitai/TCA9534@0.1.1 hideakitai/TCA9534@0.1.1
[crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch [crowpanel_small_esp32s3_base] ; 2.4, 2.8, 3.5 inch
@@ -128,6 +132,3 @@ build_flags =
${crowpanel_large_esp32s3_base.build_flags} ${crowpanel_large_esp32s3_base.build_flags}
-D VIEW_320x240 -D VIEW_320x240
-D DISPLAY_SIZE=800x480 ; landscape mode -D DISPLAY_SIZE=800x480 ; landscape mode
build_src_filter =
${esp32s3_base.build_src_filter}
+<../variants/esp32s3/elecrow_panel>

View File

@@ -1,21 +0,0 @@
// meshtastic/firmware/variants/elecrow_panel/variant.cpp
#include "variant.h"
#include "Arduino.h"
#include "Wire.h"
bool elecrow_v2 = false; // false = v1, true = v2
extern "C" {
void initVariant()
{
Wire.begin(I2C_SDA, I2C_SCL, 100000);
delay(50);
Wire.beginTransmission(0x30);
if (Wire.endTransmission() == 0) {
elecrow_v2 = true;
}
Wire.end();
}
}

View File

@@ -1,8 +1,6 @@
#define I2C_SDA 15 #define I2C_SDA 15
#define I2C_SCL 16 #define I2C_SCL 16
extern bool elecrow_v2; // false = v1, true = v2
#if CROW_SELECT == 1 #if CROW_SELECT == 1
#define WAKE_ON_TOUCH #define WAKE_ON_TOUCH
#define SCREEN_TOUCH_INT 47 #define SCREEN_TOUCH_INT 47
@@ -19,7 +17,7 @@ extern bool elecrow_v2; // false = v1, true = v2
#define DAC_I2S_DOUT 12 #define DAC_I2S_DOUT 12
#define DAC_I2S_MCLK 8 // don't use GPIO0 because it's assigned to LoRa or button #define DAC_I2S_MCLK 8 // don't use GPIO0 because it's assigned to LoRa or button
#else #else
#define PIN_BUZZER (elecrow_v2 ? 0 : 8) #define PIN_BUZZER 8
#endif #endif
// GPS via UART1 connector // GPS via UART1 connector
@@ -74,7 +72,7 @@ extern bool elecrow_v2; // false = v1, true = v2
#define SENSOR_POWER_ON LOW #define SENSOR_POWER_ON LOW
#else #else
// 4.3", 5.0", 7.0" // 4.3", 5.0", 7.0"
#define LORA_CS (elecrow_v2 ? 8 : 0) #define LORA_CS 0
#define LORA_SCK 5 #define LORA_SCK 5
#define LORA_MISO 4 #define LORA_MISO 4
#define LORA_MOSI 6 #define LORA_MOSI 6

View File

@@ -22,5 +22,7 @@ build_flags = ${esp32s3_base.build_flags}
-DEINK_HEIGHT=128 -DEINK_HEIGHT=128
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
zinggjm/GxEPD2@^1.6.2 # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
adafruit/Adafruit NeoPixel @ ^1.12.0 zinggjm/GxEPD2@1.6.5
# renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2

View File

@@ -12,4 +12,5 @@ build_flags = ${esp32s3_base.build_flags}
-I variants/esp32s3/hackaday-communicator -I variants/esp32s3/hackaday-communicator
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
https://github.com/meshtastic/Arduino_GFX/archive/054e81ffaf23784830a734e3c184346789349406.zip # renovate: datasource=git-refs depName=meshtastic-Arduino_GFX packageName=https://github.com/meshtastic/Arduino_GFX gitBranch=master
https://github.com/meshtastic/Arduino_GFX/archive/054e81ffaf23784830a734e3c184346789349406.zip

View File

@@ -9,4 +9,5 @@ build_flags =
-D HELTEC_SENSOR_HUB -D HELTEC_SENSOR_HUB
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
adafruit/Adafruit NeoPixel @ ^1.12.0 # renovate: datasource=custom.pio depName=NeoPixel packageName=adafruit/library/Adafruit NeoPixel
adafruit/Adafruit NeoPixel@1.15.2

View File

@@ -7,8 +7,6 @@ build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}
-D HELTEC_V4 -D HELTEC_V4
-I variants/esp32s3/heltec_v4 -I variants/esp32s3/heltec_v4
lib_deps =
${esp32s3_base.lib_deps}
[env:heltec-v4] [env:heltec-v4]
@@ -23,8 +21,6 @@ build_flags =
-D I2C_SCL=18 -D I2C_SCL=18
-D I2C_SDA1=4 -D I2C_SDA1=4
-D I2C_SCL1=3 -D I2C_SCL1=3
lib_deps =
${heltec_v4_base.lib_deps}
[env:heltec-v4-tft] [env:heltec-v4-tft]
extends = heltec_v4_base extends = heltec_v4_base
@@ -107,6 +103,10 @@ 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
lovyan03/LovyanGFX@1.2.0 lovyan03/LovyanGFX@1.2.0
# 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)
# renovate: datasource=git-refs depName=Quency-D_device-ui packageName=https://github.com/Quency-D/device-ui gitBranch=heltec-v4-tft
https://github.com/Quency-D/device-ui/archive/7c9870b8016641190b059bdd90fe16c1012a39eb.zip https://github.com/Quency-D/device-ui/archive/7c9870b8016641190b059bdd90fe16c1012a39eb.zip

View File

@@ -17,8 +17,10 @@ build_flags =
-DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" -DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-vision-master-e213-inkhud] [env:heltec-vision-master-e213-inkhud]
@@ -27,7 +29,7 @@ board = heltec_vision_master_e213
board_level = pr board_level = pr
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
build_src_filter = build_src_filter =
${esp32_base.build_src_filter} ${esp32s3_base.build_src_filter}
${inkhud.build_src_filter} ${inkhud.build_src_filter}
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}

View File

@@ -20,8 +20,10 @@ build_flags =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/448c8538129fde3d02a7cb5e6fc81971ad92547f.zip https://github.com/meshtastic/GxEPD2/archive/448c8538129fde3d02a7cb5e6fc81971ad92547f.zip
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-vision-master-e290-inkhud] [env:heltec-vision-master-e290-inkhud]
@@ -29,7 +31,7 @@ extends = esp32s3_base, inkhud
board = heltec_vision_master_e290 board = heltec_vision_master_e290
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
build_src_filter = build_src_filter =
${esp32_base.build_src_filter} ${esp32s3_base.build_src_filter}
${inkhud.build_src_filter} ${inkhud.build_src_filter}
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}

View File

@@ -8,6 +8,8 @@ build_flags =
-D HELTEC_VISION_MASTER_T190 -D HELTEC_VISION_MASTER_T190
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=git-refs depName=meshtastic-st7789 packageName=https://github.com/meshtastic/st7789 gitBranch=main
https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip https://github.com/meshtastic/st7789/archive/bd33ea58ddfe4a5e4a66d53300ccbd38d66ac21f.zip
upload_speed = 921600 upload_speed = 921600

View File

@@ -18,8 +18,10 @@ build_flags =
-D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting" -D EINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200
[env:heltec-wireless-paper-inkhud] [env:heltec-wireless-paper-inkhud]
@@ -27,7 +29,7 @@ extends = esp32s3_base, inkhud
board = heltec_wifi_lora_32_V3 board = heltec_wifi_lora_32_V3
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
build_src_filter = build_src_filter =
${esp32_base.build_src_filter} ${esp32s3_base.build_src_filter}
${inkhud.build_src_filter} ${inkhud.build_src_filter}
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}

View File

@@ -15,6 +15,8 @@ build_flags =
-D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated -D EINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip https://github.com/meshtastic/GxEPD2/archive/55f618961db45a23eff0233546430f1e5a80f63a.zip
lewisxhe/PCF8563_Library@^1.0.1 # renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1
upload_speed = 115200 upload_speed = 115200

View File

@@ -12,4 +12,5 @@ build_flags =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7

View File

@@ -11,4 +11,5 @@ build_flags =
;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7

View File

@@ -10,4 +10,5 @@ build_flags =
-D HELTEC_WIRELESS_TRACKER_V2 -D HELTEC_WIRELESS_TRACKER_V2
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7

View File

@@ -7,9 +7,8 @@ board_build.mcu = esp32s3
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
upload_protocol = esptool upload_protocol = esptool
upload_speed = 921600 upload_speed = 921600
; TODO renovate or remove
platform_packages = platformio/framework-arduinoespressif32@https://github.com/PowerFeather/powerfeather-meshtastic-arduino-lib/releases/download/2.0.16a/esp32-2.0.16.zip platform_packages = platformio/framework-arduinoespressif32@https://github.com/PowerFeather/powerfeather-meshtastic-arduino-lib/releases/download/2.0.16a/esp32-2.0.16.zip
lib_deps =
${esp32s3_base.lib_deps}
build_unflags = build_unflags =
${esp32s3_base.build_unflags} ${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1

View File

@@ -3,7 +3,7 @@ extends = esp32s3_base
board = esp32-s3-devkitc-1 board = esp32-s3-devkitc-1
board_level = extra board_level = extra
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D LINK_32 -D LINK_32
-I variants/esp32s3/link32_s3_v1 -I variants/esp32s3/link32_s3_v1
-DARDUINO_USB_CDC_ON_BOOT -DARDUINO_USB_CDC_ON_BOOT

View File

@@ -6,8 +6,7 @@ board_check = true
board_build.partitions = default_16MB.csv board_build.partitions = default_16MB.csv
upload_protocol = esptool upload_protocol = esptool
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-D M5STACK_CORES3 -D M5STACK_CORES3
-I variants/esp32s3/m5stack_cores3 -I variants/esp32s3/m5stack_cores3
lib_deps = ${esp32_base.lib_deps}

View File

@@ -46,11 +46,12 @@ build_flags = ${esp32s3_base.build_flags}
-D VIEW_320x240 -D VIEW_320x240
-D USE_PACKET_API -D USE_PACKET_API
-I variants/esp32s3/mesh-tab -I variants/esp32s3/mesh-tab
build_src_filter = ${esp32_base.build_src_filter} build_src_filter = ${esp32s3_base.build_src_filter}
lib_deps = lib_deps =
${esp32_base.lib_deps} ${esp32s3_base.lib_deps}
${device-ui_base.lib_deps} ${device-ui_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7
[mesh_tab_xpt2046] [mesh_tab_xpt2046]
extends = mesh_tab_base extends = mesh_tab_base

View File

@@ -3,6 +3,6 @@ extends = esp32s3_base
board = esp32-s3-zero board = esp32-s3-zero
board_level = extra board_level = extra
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D PRIVATE_HW -D PRIVATE_HW
-I variants/esp32s3/nibble_esp32 -I variants/esp32s3/nibble_esp32

View File

@@ -15,7 +15,8 @@ build_flags =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7
build_src_filter = build_src_filter =
${esp32s3_base.build_src_filter} ${esp32s3_base.build_src_filter}

View File

@@ -6,6 +6,6 @@ board_check = true
upload_protocol = esptool upload_protocol = esptool
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D RAK3312 -D RAK3312
-I variants/esp32s3/rak3312 -I variants/esp32s3/rak3312

View File

@@ -8,14 +8,15 @@ upload_protocol = esptool
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D RAK3312 -D RAK3312
-D RAK_WISMESH_TAP_V2 -D RAK_WISMESH_TAP_V2
-I variants/esp32s3/rak_wismesh_tap_v2 -I variants/esp32s3/rak_wismesh_tap_v2
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7
[ft5x06] [ft5x06]
extends = mesh_tab_base extends = mesh_tab_base

View File

@@ -9,7 +9,7 @@ board_check = true
board_build.partitions = partition-table-8MB.csv board_build.partitions = partition-table-8MB.csv
upload_protocol = esptool upload_protocol = esptool
build_flags = ${esp32_base.build_flags} build_flags = ${esp32s3_base.build_flags}
-Ivariants/esp32s3/seeed-sensecap-indicator -Ivariants/esp32s3/seeed-sensecap-indicator
-DSENSECAP_INDICATOR -DSENSECAP_INDICATOR
-DCONFIG_ARDUHAL_LOG_COLORS -DCONFIG_ARDUHAL_LOG_COLORS
@@ -24,10 +24,12 @@ build_flags = ${esp32_base.build_flags}
-DUSE_ARDUINO_HAL_GPIO -DUSE_ARDUINO_HAL_GPIO
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
; TODO switch back to official LovyanGFX
https://github.com/mverch67/LovyanGFX/archive/4c76238c1344162a234ae917b27651af146d6fb2.zip https://github.com/mverch67/LovyanGFX/archive/4c76238c1344162a234ae917b27651af146d6fb2.zip
earlephilhower/ESP8266Audio@^1.9.9 # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266SAM@^1.0.1 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0
[env:seeed-sensecap-indicator-tft] [env:seeed-sensecap-indicator-tft]
extends = env:seeed-sensecap-indicator extends = env:seeed-sensecap-indicator
@@ -64,4 +66,5 @@ build_flags =
lib_deps = lib_deps =
${env:seeed-sensecap-indicator.lib_deps} ${env:seeed-sensecap-indicator.lib_deps}
${device-ui_base.lib_deps} ${device-ui_base.lib_deps}
; TODO switch back to official bb_captouch
https://github.com/mverch67/bb_captouch/archive/8626412fe650d808a267791c0eae6e5860c85a5d.zip ; alternative touch library supporting FT6x36 https://github.com/mverch67/bb_captouch/archive/8626412fe650d808a267791c0eae6e5860c85a5d.zip ; alternative touch library supporting FT6x36

View File

@@ -6,8 +6,6 @@ board_check = true
board_build.partitions = default_8MB.csv board_build.partitions = default_8MB.csv
upload_protocol = esptool upload_protocol = esptool
upload_speed = 921600 upload_speed = 921600
lib_deps =
${esp32s3_base.lib_deps}
build_unflags = build_unflags =
${esp32s3_base.build_unflags} ${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1

View File

@@ -8,8 +8,6 @@ board_build.mcu = esp32s3
upload_protocol = esptool upload_protocol = esptool
;upload_port = /dev/ttyACM0 ;upload_port = /dev/ttyACM0
upload_speed = 921600 upload_speed = 921600
lib_deps =
${esp32s3_base.lib_deps}
build_unflags = build_unflags =
${esp32s3_base.build_unflags} ${esp32s3_base.build_unflags}
-DARDUINO_USB_MODE=1 -DARDUINO_USB_MODE=1

View File

@@ -5,7 +5,7 @@ board_check = true
upload_protocol = esptool upload_protocol = esptool
build_flags = build_flags =
${esp32_base.build_flags} -I variants/esp32s3/t-deck-pro ${esp32s3_base.build_flags} -I variants/esp32s3/t-deck-pro
-D T_DECK_PRO -D T_DECK_PRO
-D USE_EINK -D USE_EINK
-D EINK_DISPLAY_MODEL=GxEPD2_310_GDEQ031T10 -D EINK_DISPLAY_MODEL=GxEPD2_310_GDEQ031T10
@@ -17,7 +17,11 @@ build_flags =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
https://github.com/ZinggJM/GxEPD2/archive/refs/tags/1.6.4.zip # renovate: datasource=custom.pio depName=GxEPD2 packageName=zinggjm/library/GxEPD2
zinggjm/GxEPD2@1.6.4
# 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
https://github.com/CIRCUITSTATE/CSE_CST328/archive/refs/tags/v0.0.4.zip https://github.com/CIRCUITSTATE/CSE_CST328/archive/refs/tags/v0.0.4.zip
# renovate: datasource=git-refs depName=BQ27220 packageName=https://github.com/mverch67/BQ27220 gitBranch=main
https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip

View File

@@ -100,5 +100,3 @@
#define MODEM_DTR 8 #define MODEM_DTR 8
#define MODEM_RX 10 #define MODEM_RX 10
#define MODEM_TX 11 #define MODEM_TX 11
#define HAS_PHYSICAL_KEYBOARD 1

View File

@@ -12,9 +12,12 @@ build_flags = ${esp32s3_base.build_flags}
-I variants/esp32s3/t-deck -I variants/esp32s3/t-deck
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
earlephilhower/ESP8266Audio@^1.9.9 lovyan03/LovyanGFX@1.2.7
earlephilhower/ESP8266SAM@^1.0.1 # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0
[env:t-deck-tft] [env:t-deck-tft]
extends = env:t-deck extends = env:t-deck
@@ -68,4 +71,5 @@ build_flags =
lib_deps = lib_deps =
${env:t-deck.lib_deps} ${env:t-deck.lib_deps}
${device-ui_base.lib_deps} ${device-ui_base.lib_deps}
# renovate: datasource=github-tags depName=bb_captouch packageName=bitbank2/bb_captouch
https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip

View File

@@ -23,7 +23,6 @@
#define SCREEN_TRANSITION_FRAMERATE 5 #define SCREEN_TRANSITION_FRAMERATE 5
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness #define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
#define USE_TFTDISPLAY 1 #define USE_TFTDISPLAY 1
#define HAS_PHYSICAL_KEYBOARD 1
#define HAS_TOUCHSCREEN 1 #define HAS_TOUCHSCREEN 1
#define SCREEN_TOUCH_INT 16 #define SCREEN_TOUCH_INT 16

View File

@@ -15,4 +15,5 @@ lib_ignore =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=github-tags depName=ETHClass2 packageName=meshtastic/ETHClass2
https://github.com/meshtastic/ETHClass2/archive/v1.0.0.zip https://github.com/meshtastic/ETHClass2/archive/v1.0.0.zip

View File

@@ -6,16 +6,22 @@ board_check = true
board_build.partitions = default_16MB.csv board_build.partitions = default_16MB.csv
upload_protocol = esptool upload_protocol = esptool
build_flags = ${esp32_base.build_flags} build_flags = ${esp32s3_base.build_flags}
-DT_WATCH_S3 -DT_WATCH_S3
-Ivariants/esp32s3/t-watch-s3 -Ivariants/esp32s3/t-watch-s3
-DPCF8563_RTC=0x51 -DPCF8563_RTC=0x51
-DHAS_BMA423=1 -DHAS_BMA423=1
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.2.0 # renovate: datasource=custom.pio depName=LovyanGFX packageName=lovyan03/library/LovyanGFX
lovyan03/LovyanGFX@1.2.7
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/PCF8563_Library@1.0.1
adafruit/Adafruit DRV2605 Library@^1.2.2 # renovate: datasource=custom.pio depName=Adafruit DRV2605 packageName=adafruit/library/Adafruit DRV2605 Library
earlephilhower/ESP8266Audio@^1.9.9 adafruit/Adafruit DRV2605 Library@1.2.4
earlephilhower/ESP8266SAM@^1.0.1 # renovate: datasource=custom.pio depName=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.1.0
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/SensorLib@0.2.0 lewisxhe/SensorLib@0.2.0

View File

@@ -7,6 +7,7 @@ board_check = true
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=custom.pio depName=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/PCF8563_Library@1.0.1
build_flags = build_flags =

View File

@@ -17,14 +17,23 @@ build_flags = ${esp32s3_base.build_flags}
-D ROTARY_BUXTRONICS -D ROTARY_BUXTRONICS
lib_deps = ${esp32s3_base.lib_deps} lib_deps = ${esp32s3_base.lib_deps}
# 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=ESP8266Audio packageName=earlephilhower/library/ESP8266Audio
earlephilhower/ESP8266Audio@1.9.9 earlephilhower/ESP8266Audio@1.9.9
# renovate: datasource=custom.pio depName=ESP8266SAM packageName=earlephilhower/library/ESP8266SAM
earlephilhower/ESP8266SAM@1.0.1 earlephilhower/ESP8266SAM@1.0.1
# 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=PCF8563 packageName=lewisxhe/library/PCF8563_Library
lewisxhe/PCF8563_Library@1.0.1 lewisxhe/PCF8563_Library@1.0.1
# renovate: datasource=custom.pio depName=lewisxhe-SensorLib packageName=lewisxhe/library/SensorLib
lewisxhe/SensorLib@0.3.1 lewisxhe/SensorLib@0.3.1
https://github.com/pschatzmann/arduino-audio-driver/archive/refs/tags/v0.1.3.zip # renovate: datasource=github-tags depName=pschatzmann_arduino-audio-driver packageName=pschatzmann/arduino-audio-driver
https://github.com/pschatzmann/arduino-audio-driver/archive/v0.1.3.zip
# TODO renovate
https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip
# TODO renovate
https://github.com/mverch67/RotaryEncoder/archive/da958a21389cbcd485989705df602a33e092dd88.zip https://github.com/mverch67/RotaryEncoder/archive/da958a21389cbcd485989705df602a33e092dd88.zip
[env:tlora-pager-tft] [env:tlora-pager-tft]

View File

@@ -21,7 +21,6 @@
#define SCREEN_TRANSITION_FRAMERATE 5 #define SCREEN_TRANSITION_FRAMERATE 5
#define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness #define BRIGHTNESS_DEFAULT 130 // Medium Low Brightness
#define USE_TFTDISPLAY 1 #define USE_TFTDISPLAY 1
#define HAS_PHYSICAL_KEYBOARD 1
#define I2C_SDA SDA #define I2C_SDA SDA
#define I2C_SCL SCL #define I2C_SCL SCL

View File

@@ -5,7 +5,7 @@ board_check = true
upload_protocol = esptool upload_protocol = esptool
build_flags = build_flags =
${esp32_base.build_flags} ${esp32s3_base.build_flags}
-D TLORA_T3S3_EPAPER -D TLORA_T3S3_EPAPER
-I variants/esp32s3/tlora_t3s3_epaper -I variants/esp32s3/tlora_t3s3_epaper
-DUSE_EINK -DUSE_EINK
@@ -20,6 +20,7 @@ build_flags =
lib_deps = lib_deps =
${esp32s3_base.lib_deps} ${esp32s3_base.lib_deps}
# renovate: datasource=git-refs depName=meshtastic-GxEPD2 packageName=https://github.com/meshtastic/GxEPD2 gitBranch=master
https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip https://github.com/meshtastic/GxEPD2/archive/b202ebfec6a4821e098cf7a625ba0f6f2400292d.zip
[env:tlora-t3s3-epaper-inkhud] [env:tlora-t3s3-epaper-inkhud]
@@ -28,7 +29,7 @@ board = tlora-t3s3-v1
board_check = true board_check = true
upload_protocol = esptool upload_protocol = esptool
build_src_filter = build_src_filter =
${esp32_base.build_src_filter} ${esp32s3_base.build_src_filter}
${inkhud.build_src_filter} ${inkhud.build_src_filter}
build_flags = build_flags =
${esp32s3_base.build_flags} ${esp32s3_base.build_flags}

View File

@@ -5,4 +5,6 @@ board_check = true
upload_protocol = esptool upload_protocol = esptool
build_flags = build_flags =
${esp32_base.build_flags} -D TLORA_T3S3_V1 -I variants/esp32s3/tlora_t3s3_v1 ${esp32s3_base.build_flags}
-D TLORA_T3S3_V1
-I variants/esp32s3/tlora_t3s3_v1

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