Merge remote-tracking branch 'origin/dev'

# Conflicts:
#	src/Mesh.cpp
This commit is contained in:
tth committed 2026-10-13 19:41:34 +02:00
commit a79860e9c9
8 files changed
+13 -11

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ Once you have a working app/project, you need to be able to demonstrate it exist
| 0110 - 011F | Ripple | ripple_biz@protonmail.com — https://buymeacoffee.com/ripplebiz | | 0110 - 011F | Ripple | ripple_biz@protonmail.com — https://buymeacoffee.com/ripplebiz |
| 0120 | MCO Advanced | most.original.address@gmail.com — https://hdden.ru/MCOa/ | | 0120 | MCO Advanced | most.original.address@gmail.com — https://hdden.ru/MCOa/ |
| 0130 - 013F | StreamSensor | william@housedillon.com - https://housedillon.com/blog/lora-e5-with-seeed-fusion | | 0130 - 013F | StreamSensor | william@housedillon.com - https://housedillon.com/blog/lora-e5-with-seeed-fusion |
| 0140 | Nelos | support@nelos.app — https://nelos.app |
| FF00 - FFFF | -reserved for testing/dev- | | | FF00 - FFFF | -reserved for testing/dev- | |
(add rows, inside the range 0100 - FEFF for custom apps) (add rows, inside the range 0100 - FEFF for custom apps)
+6 -6
View File
@@ -96,13 +96,14 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
} }
if (self_id.isHashMatch(pkt->path, pkt->getPathHashSize()) && allowPacketForward(pkt)) { if (self_id.isHashMatch(pkt->path, pkt->getPathHashSize()) && allowPacketForward(pkt)) {
uint32_t d = getDirectRetransmitDelay(pkt);
if (pkt->getPayloadType() == PAYLOAD_TYPE_MULTIPART) { if (pkt->getPayloadType() == PAYLOAD_TYPE_MULTIPART) {
return forwardMultipartDirect(pkt); return forwardMultipartDirect(pkt, d);
} else if (pkt->getPayloadType() == PAYLOAD_TYPE_ACK) { } else if (pkt->getPayloadType() == PAYLOAD_TYPE_ACK) {
if (!_tables->wasSeen(pkt)) { // don't retransmit! if (!_tables->wasSeen(pkt)) { // don't retransmit!
_tables->markSeen(pkt); _tables->markSeen(pkt);
removeSelfFromPath(pkt); removeSelfFromPath(pkt);
routeDirectRecvAcks(pkt, 0); routeDirectRecvAcks(pkt, d);
} }
return ACTION_RELEASE; return ACTION_RELEASE;
} }
@@ -111,7 +112,6 @@ DispatcherAction Mesh::onRecvPacket(Packet* pkt) {
_tables->markSeen(pkt); _tables->markSeen(pkt);
removeSelfFromPath(pkt); removeSelfFromPath(pkt);
uint32_t d = getDirectRetransmitDelay(pkt);
return ACTION_RETRANSMIT_DELAYED(0, d); // Routed traffic is HIGHEST priority return ACTION_RETRANSMIT_DELAYED(0, d); // Routed traffic is HIGHEST priority
} }
} }
@@ -372,7 +372,7 @@ DispatcherAction Mesh::routeRecvPacket(Packet* packet) {
return ACTION_RELEASE; return ACTION_RELEASE;
} }
DispatcherAction Mesh::forwardMultipartDirect(Packet* pkt) { DispatcherAction Mesh::forwardMultipartDirect(Packet* pkt, uint32_t delay_millis) {
uint8_t remaining = pkt->payload[0] >> 4; // num of packets in this multipart sequence still to be sent uint8_t remaining = pkt->payload[0] >> 4; // num of packets in this multipart sequence still to be sent
uint8_t type = pkt->payload[0] & 0x0F; uint8_t type = pkt->payload[0] & 0x0F;
@@ -386,7 +386,7 @@ DispatcherAction Mesh::forwardMultipartDirect(Packet* pkt) {
if (!_tables->wasSeen(&tmp)) { // don't retransmit! if (!_tables->wasSeen(&tmp)) { // don't retransmit!
_tables->markSeen(&tmp); _tables->markSeen(&tmp);
removeSelfFromPath(&tmp); removeSelfFromPath(&tmp);
routeDirectRecvAcks(&tmp, ((uint32_t)remaining + 1) * 300); // expect multipart ACKs 300ms apart (x2) routeDirectRecvAcks(&tmp, delay_millis + ((uint32_t)remaining + 1) * 300); // expect multipart ACKs 300ms apart (x2)
} }
} }
return ACTION_RELEASE; return ACTION_RELEASE;
@@ -396,13 +396,13 @@ void Mesh::routeDirectRecvAcks(Packet* packet, uint32_t delay_millis) {
if (!packet->isMarkedDoNotRetransmit() && takeForwardingRateLimit(packet)) { if (!packet->isMarkedDoNotRetransmit() && takeForwardingRateLimit(packet)) {
uint8_t extra = getExtraAckTransmitCount(); uint8_t extra = getExtraAckTransmitCount();
while (extra > 0) { while (extra > 0) {
delay_millis += getDirectRetransmitDelay(packet) + 300;
auto a1 = createMultiAck(packet->payload, packet->payload_len, extra); auto a1 = createMultiAck(packet->payload, packet->payload_len, extra);
if (a1) { if (a1) {
a1->path_len = Packet::copyPath(a1->path, packet->path, packet->path_len); a1->path_len = Packet::copyPath(a1->path, packet->path, packet->path_len);
a1->header &= ~PH_ROUTE_MASK; a1->header &= ~PH_ROUTE_MASK;
a1->header |= ROUTE_TYPE_DIRECT; a1->header |= ROUTE_TYPE_DIRECT;
sendPacket(a1, 0, delay_millis); sendPacket(a1, 0, delay_millis);
delay_millis += 300;
} }
extra--; extra--;
} }
+1 -1
View File
@@ -32,7 +32,7 @@ class Mesh : public Dispatcher {
void removeSelfFromPath(Packet* packet); void removeSelfFromPath(Packet* packet);
void routeDirectRecvAcks(Packet* packet, uint32_t delay_millis); void routeDirectRecvAcks(Packet* packet, uint32_t delay_millis);
//void routeRecvAcks(Packet* packet, uint32_t delay_millis); //void routeRecvAcks(Packet* packet, uint32_t delay_millis);
DispatcherAction forwardMultipartDirect(Packet* pkt); DispatcherAction forwardMultipartDirect(Packet* pkt, uint32_t delay_millis);
protected: protected:
DispatcherAction onRecvPacket(Packet* pkt) override; DispatcherAction onRecvPacket(Packet* pkt) override;
+1
View File
@@ -188,6 +188,7 @@ int RegionMap::getTransportKeysFor(const RegionEntry& src, TransportKey dest[],
} }
RegionEntry* RegionMap::findMatch(mesh::Packet* packet, uint8_t mask) { RegionEntry* RegionMap::findMatch(mesh::Packet* packet, uint8_t mask) {
if (packet->transport_codes[0] == 0) return &wildcard;
for (int i = 0; i < num_regions; i++) { for (int i = 0; i < num_regions; i++) {
auto region = &regions[i]; auto region = &regions[i];
if ((region->flags & mask) == 0) { // does region allow this? (per 'mask' param) if ((region->flags & mask) == 0) { // does region allow this? (per 'mask' param)
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state; uint8_t btn_prev_state;
public: public:
TImpulsePlusBoard() : NRF52Board("T-Impulse-Plus OTA") {} TImpulsePlusBoard() : NRF52Board("T-Impulse-Plus_OTA") {}
void begin(); void begin();
#if defined(P_LORA_TX_LED) #if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state; uint8_t btn_prev_state;
public: public:
MeshtinyBoard() : NRF52Board("Meshtiny OTA") {} MeshtinyBoard() : NRF52Board("Meshtiny_OTA") {}
void begin(); void begin();
#if defined(P_LORA_TX_LED) #if defined(P_LORA_TX_LED)
@@ -14,7 +14,7 @@ protected:
bool isLoRaFemPaGainEnabled() const { return _is_pa_enabled; } bool isLoRaFemPaGainEnabled() const { return _is_pa_enabled; }
public: public:
WioTrackerL1Board() : NRF52Board("WioTrackerL1 OTA") {} WioTrackerL1Board() : NRF52Board("WioTrackerL1_OTA") {}
void begin(); void begin();
void attachDynamicPrefs(KeyValueStore* prefs); void attachDynamicPrefs(KeyValueStore* prefs);
bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply) override; bool handleCommand(const char* command, uint32_t sender_timestamp, char* reply) override;
+1 -1
View File
@@ -9,7 +9,7 @@ protected:
uint8_t btn_prev_state; uint8_t btn_prev_state;
public: public:
WioTrackerL1Board() : NRF52Board("WioTrackerL1 OTA") {} WioTrackerL1Board() : NRF52Board("WioTrackerL1_OTA") {}
void begin(); void begin();
#if defined(P_LORA_TX_LED) #if defined(P_LORA_TX_LED)