mirror of
https://github.com/meshtastic/firmware.git
synced 2025-05-01 11:42:45 +00:00
Merge branch 'ESP32C3-RISC' of github.com:meshtastic/firmware into ESP32C3-RISC
This commit is contained in:
commit
0243922d64
@ -56,7 +56,7 @@ int32_t RangeTestModule::runOnce()
|
|||||||
return (5000); // Sending first message 5 seconds after initilization.
|
return (5000); // Sending first message 5 seconds after initilization.
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("Initializing Range Test Module -- Receiver\n");
|
LOG_INFO("Initializing Range Test Module -- Receiver\n");
|
||||||
return (INT32_MAX);
|
return disable();
|
||||||
// This thread does not need to run as a receiver
|
// This thread does not need to run as a receiver
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,17 +91,9 @@ int32_t RangeTestModule::runOnce()
|
|||||||
return disable();
|
return disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
meshtastic_MeshPacket *RangeTestModuleRadio::allocReply()
|
|
||||||
{
|
|
||||||
|
|
||||||
auto reply = allocDataPacket(); // Allocate a packet for sending
|
|
||||||
|
|
||||||
return reply;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies)
|
void RangeTestModuleRadio::sendPayload(NodeNum dest, bool wantReplies)
|
||||||
{
|
{
|
||||||
meshtastic_MeshPacket *p = allocReply();
|
meshtastic_MeshPacket *p = allocDataPacket();
|
||||||
p->to = dest;
|
p->to = dest;
|
||||||
p->decoded.want_response = wantReplies;
|
p->decoded.want_response = wantReplies;
|
||||||
|
|
||||||
|
@ -43,14 +43,7 @@ class RangeTestModuleRadio : public SinglePortModule
|
|||||||
*/
|
*/
|
||||||
bool appendFile(const meshtastic_MeshPacket &mp);
|
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:
|
protected:
|
||||||
virtual meshtastic_MeshPacket *allocReply() override;
|
|
||||||
|
|
||||||
/** Called to handle a particular incoming message
|
/** 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
|
@return ProcessMessage::STOP if you've guaranteed you've handled this message and no other handlers should be considered for
|
||||||
|
Loading…
Reference in New Issue
Block a user