Merge branch 'master' into 2264-feature-check-for-low-heap-before-adding-to-nodedb-was-reboot-loop-heap-too-low

This commit is contained in:
Thomas Göttgens
2023-03-04 17:24:16 +01:00
committed by GitHub
23 changed files with 123 additions and 65 deletions

View File

@@ -56,7 +56,7 @@ int32_t RangeTestModule::runOnce()
return (5000); // Sending first message 5 seconds after initilization.
} else {
LOG_INFO("Initializing Range Test Module -- Receiver\n");
return (INT32_MAX);
return disable();
// This thread does not need to run as a receiver
}
@@ -91,17 +91,9 @@ int32_t RangeTestModule::runOnce()
return disable();
}
meshtastic_MeshPacket *RangeTestModuleRadio::allocReply()
{
auto reply = allocDataPacket(); // Allocate a packet for sending
return reply;
}
void RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies)
{
meshtastic_MeshPacket *p = allocReply();
meshtastic_MeshPacket *p = allocDataPacket();
p->to = dest;
p->decoded.want_response = wantReplies;

View File

@@ -43,14 +43,7 @@ class RangeTestModuleRadio : public SinglePortModule
*/
bool appendFile(const meshtastic_MeshPacket &mp);
/**
* Kevin's magical calculation of two points to meters.
*/
float latLongToMeter(double lat_a, double lng_a, double lat_b, double lng_b);
protected:
virtual meshtastic_MeshPacket *allocReply() override;
/** Called to handle a particular incoming message
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for