mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 01:42:15 +00:00
remove a few DSR Router bits for S&F Module
This commit is contained in:
parent
bd2bfd6822
commit
efc3f4c0ee
@ -8,8 +8,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
// #include "rom/rtc.h"
|
|
||||||
//#include "DSRRouter.h"
|
|
||||||
#include "ReliableRouter.h"
|
#include "ReliableRouter.h"
|
||||||
// #include "debug.h"
|
// #include "debug.h"
|
||||||
#include "FSCommon.h"
|
#include "FSCommon.h"
|
||||||
@ -217,7 +215,6 @@ void setup()
|
|||||||
|
|
||||||
fsInit();
|
fsInit();
|
||||||
|
|
||||||
// router = new DSRRouter();
|
|
||||||
router = new ReliableRouter();
|
router = new ReliableRouter();
|
||||||
|
|
||||||
#ifdef I2C_SDA1
|
#ifdef I2C_SDA1
|
||||||
|
@ -90,8 +90,7 @@ void ReliableRouter::sniffReceived(const MeshPacket *p, const Routing *c)
|
|||||||
{
|
{
|
||||||
NodeNum ourNode = getNodeNum();
|
NodeNum ourNode = getNodeNum();
|
||||||
|
|
||||||
if (p->to == ourNode) { // ignore ack/nak/want_ack packets that are not address to us (we only handle 0 hop reliability
|
if (p->to == ourNode) { // ignore ack/nak/want_ack packets that are not address to us (we only handle 0 hop reliability)
|
||||||
// - not DSR routing)
|
|
||||||
if (p->want_ack) {
|
if (p->want_ack) {
|
||||||
if (MeshModule::currentReply)
|
if (MeshModule::currentReply)
|
||||||
DEBUG_MSG("Some other module has replied to this message, no need for a 2nd ack\n");
|
DEBUG_MSG("Some other module has replied to this message, no need for a 2nd ack\n");
|
||||||
@ -200,8 +199,7 @@ int32_t ReliableRouter::doRetransmissions()
|
|||||||
DEBUG_MSG("Reliable send failed, returning a nak for fr=0x%x,to=0x%x,id=0x%x\n", p.packet->from, p.packet->to,
|
DEBUG_MSG("Reliable send failed, returning a nak for fr=0x%x,to=0x%x,id=0x%x\n", p.packet->from, p.packet->to,
|
||||||
p.packet->id);
|
p.packet->id);
|
||||||
sendAckNak(Routing_Error_MAX_RETRANSMIT, getFrom(p.packet), p.packet->id, p.packet->channel);
|
sendAckNak(Routing_Error_MAX_RETRANSMIT, getFrom(p.packet), p.packet->id, p.packet->channel);
|
||||||
// Note: we don't stop retransmission here, instead the Nak packet gets processed in sniffReceived - which
|
// Note: we don't stop retransmission here, instead the Nak packet gets processed in sniffReceived
|
||||||
// allows the DSR version to still be able to look at the PendingPacket
|
|
||||||
stopRetransmission(it->first);
|
stopRetransmission(it->first);
|
||||||
stillValid = false; // just deleted it
|
stillValid = false; // just deleted it
|
||||||
} else {
|
} else {
|
||||||
|
@ -38,12 +38,6 @@ struct PendingPacket {
|
|||||||
/** Starts at NUM_RETRANSMISSIONS -1(normally 3) and counts down. Once zero it will be removed from the list */
|
/** Starts at NUM_RETRANSMISSIONS -1(normally 3) and counts down. Once zero it will be removed from the list */
|
||||||
uint8_t numRetransmissions = 0;
|
uint8_t numRetransmissions = 0;
|
||||||
|
|
||||||
/** True if we have started trying to find a route - for DSR usage
|
|
||||||
* While trying to find a route we don't actually send the data packet. We just leave it here pending until
|
|
||||||
* we have a route or we've failed to find one.
|
|
||||||
*/
|
|
||||||
bool wantRoute = false;
|
|
||||||
|
|
||||||
PendingPacket() {}
|
PendingPacket() {}
|
||||||
explicit PendingPacket(MeshPacket *p);
|
explicit PendingPacket(MeshPacket *p);
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,6 @@ extern "C" {
|
|||||||
* DONE: Implement basic interface and use it elsewhere in app
|
* DONE: Implement basic interface and use it elsewhere in app
|
||||||
* Add naive flooding mixin (& drop duplicate rx broadcasts), add tools for sending broadcasts with incrementing sequence #s
|
* Add naive flooding mixin (& drop duplicate rx broadcasts), add tools for sending broadcasts with incrementing sequence #s
|
||||||
* Add an optional adjacent node only 'send with ack' mixin. If we timeout waiting for the ack, call handleAckTimeout(packet)
|
* Add an optional adjacent node only 'send with ack' mixin. If we timeout waiting for the ack, call handleAckTimeout(packet)
|
||||||
* Add DSR mixin
|
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ esp_sleep_wakeup_cause_t doLightSleep(uint64_t sleepMsec) // FIXME, use a more r
|
|||||||
// We want RTC peripherals to stay on
|
// We want RTC peripherals to stay on
|
||||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||||
|
|
||||||
#ifdef BUTTON_NEED_PULLUP
|
#if defined(BUTTON_PIN) && defined(BUTTON_NEED_PULLUP)
|
||||||
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user