mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-22 03:02:08 +10:00
Remove OSThread inheritance from AtakPluginModule - pure passthrough needs no periodic scheduling
Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/bdc82eb6-77c4-4711-839c-04bcbb1aa9cd Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
This commit is contained in:
co-authored by
thebentern
parent
a5afef12b4
commit
b2e862006d
@@ -1,21 +1,12 @@
|
|||||||
#include "AtakPluginModule.h"
|
#include "AtakPluginModule.h"
|
||||||
#include "Default.h"
|
|
||||||
#include "MeshService.h"
|
|
||||||
#include "configuration.h"
|
|
||||||
#include "main.h"
|
|
||||||
|
|
||||||
AtakPluginModule *atakPluginModule;
|
AtakPluginModule *atakPluginModule;
|
||||||
|
|
||||||
AtakPluginModule::AtakPluginModule()
|
AtakPluginModule::AtakPluginModule()
|
||||||
: SinglePortModule("atak", meshtastic_PortNum_ATAK_PLUGIN_V2), concurrency::OSThread("AtakPlugin")
|
: SinglePortModule("atak", meshtastic_PortNum_ATAK_PLUGIN_V2)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t AtakPluginModule::runOnce()
|
|
||||||
{
|
|
||||||
return default_broadcast_interval_secs * 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
ProcessMessage AtakPluginModule::handleReceived(const meshtastic_MeshPacket &mp)
|
ProcessMessage AtakPluginModule::handleReceived(const meshtastic_MeshPacket &mp)
|
||||||
{
|
{
|
||||||
(void)mp; // Passthrough — no processing needed, apps handle compression/decompression
|
(void)mp; // Passthrough — no processing needed, apps handle compression/decompression
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "SinglePortModule.h"
|
#include "SinglePortModule.h"
|
||||||
#include "concurrency/OSThread.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ATAK Plugin V2 module - passthrough for ATAK_PLUGIN_V2 payloads.
|
* ATAK Plugin V2 module - passthrough for ATAK_PLUGIN_V2 payloads.
|
||||||
@@ -10,7 +9,7 @@
|
|||||||
* (Android, iOS, ATAK plugin); firmware forwards the bytes unchanged on the
|
* (Android, iOS, ATAK plugin); firmware forwards the bytes unchanged on the
|
||||||
* ATAK_PLUGIN_V2 port.
|
* ATAK_PLUGIN_V2 port.
|
||||||
*/
|
*/
|
||||||
class AtakPluginModule : public SinglePortModule, private concurrency::OSThread
|
class AtakPluginModule : public SinglePortModule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/** Constructor
|
/** Constructor
|
||||||
@@ -20,8 +19,6 @@ class AtakPluginModule : public SinglePortModule, private concurrency::OSThread
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;
|
virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;
|
||||||
/* Does our periodic broadcast */
|
|
||||||
int32_t runOnce() override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern AtakPluginModule *atakPluginModule;
|
extern AtakPluginModule *atakPluginModule;
|
||||||
|
|||||||
Reference in New Issue
Block a user