kopia lustrzana https://github.com/meshtastic/firmware
Cancel rebroadcast in Tx queue upon receiving another rebroadcast (#2538)
* Make portduino great again * Upon receiving packet that was seen recently, cancel a rebroadcast if there was one in Tx queue already --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>pull/2536/head
rodzic
a491ceefcd
commit
344baf7ffc
|
@ -1,6 +1,6 @@
|
||||||
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
; The Portduino based sim environment on top of any host OS, all hardware will be simulated
|
||||||
[portduino_base]
|
[portduino_base]
|
||||||
platform = https://github.com/meshtastic/platform-native.git#096b3c3e9c5c8e19d4c3b6cd803fffef2a9be4c5
|
platform = https://github.com/meshtastic/platform-native.git#489ff929dca0bb768256ba2de45f95815111490f
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
|
||||||
build_src_filter =
|
build_src_filter =
|
||||||
|
@ -27,4 +27,4 @@ lib_deps =
|
||||||
build_flags =
|
build_flags =
|
||||||
${arduino_base.build_flags}
|
${arduino_base.build_flags}
|
||||||
-fPIC
|
-fPIC
|
||||||
-Isrc/platform/portduino
|
-Isrc/platform/portduino
|
|
@ -21,6 +21,7 @@ bool FloodingRouter::shouldFilterReceived(const meshtastic_MeshPacket *p)
|
||||||
{
|
{
|
||||||
if (wasSeenRecently(p)) { // Note: this will also add a recent packet record
|
if (wasSeenRecently(p)) { // Note: this will also add a recent packet record
|
||||||
printPacket("Ignoring incoming msg, because we've already seen it", p);
|
printPacket("Ignoring incoming msg, because we've already seen it", p);
|
||||||
|
Router::cancelSending(p->from, p->id); // cancel rebroadcast of this message *if* there was already one
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,4 +63,4 @@ void FloodingRouter::sniffReceived(const meshtastic_MeshPacket *p, const meshtas
|
||||||
}
|
}
|
||||||
// handle the packet as normal
|
// handle the packet as normal
|
||||||
Router::sniffReceived(p, c);
|
Router::sniffReceived(p, c);
|
||||||
}
|
}
|
Ładowanie…
Reference in New Issue