mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-13 15:11:20 +10:00
Implement ATAK Plugin V2 and drop unishox2 compression support (#10105)
* Implement ATAK Plugin V2 and drop unishox2 compression support * Fix course calculation and improve error handling in allocAtakPli * Update src/modules/AtakPluginModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix buffer overflow in allocAtakPli by ensuring null termination for callsigns * Add missing include for concurrency::OSThread in AtakPluginModule.h * Update src/modules/AtakPluginModule.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactor allocAtakPli to use configurable team and role; improve position source mapping * Update src/modules/PositionModule.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * 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> * Apply clang-format (trunk fmt) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot
thebentern
copilot-swe-agent[bot]
parent
32dcd90abf
commit
a076d97eb6
@@ -1,11 +1,15 @@
|
||||
#pragma once
|
||||
#include "ProtobufModule.h"
|
||||
#include "meshtastic/atak.pb.h"
|
||||
#include "SinglePortModule.h"
|
||||
|
||||
/**
|
||||
* Waypoint message handling for meshtastic
|
||||
* ATAK Plugin V2 module - passthrough for ATAK_PLUGIN_V2 payloads.
|
||||
* The wire format includes a leading flags byte followed by opaque payload bytes.
|
||||
* Depending on the flags, the payload may be zstd dictionary-compressed or raw/uncompressed protobuf.
|
||||
* Compression/decompression and payload interpretation are handled by the apps
|
||||
* (Android, iOS, ATAK plugin); firmware forwards the bytes unchanged on the
|
||||
* ATAK_PLUGIN_V2 port.
|
||||
*/
|
||||
class AtakPluginModule : public ProtobufModule<meshtastic_TAKPacket>, private concurrency::OSThread
|
||||
class AtakPluginModule : public SinglePortModule
|
||||
{
|
||||
public:
|
||||
/** Constructor
|
||||
@@ -14,13 +18,7 @@ class AtakPluginModule : public ProtobufModule<meshtastic_TAKPacket>, private co
|
||||
AtakPluginModule();
|
||||
|
||||
protected:
|
||||
virtual bool handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshtastic_TAKPacket *t) override;
|
||||
virtual void alterReceivedProtobuf(meshtastic_MeshPacket &mp, meshtastic_TAKPacket *t) override;
|
||||
/* Does our periodic broadcast */
|
||||
int32_t runOnce() override;
|
||||
|
||||
private:
|
||||
meshtastic_TAKPacket cloneTAKPacketData(meshtastic_TAKPacket *t);
|
||||
virtual ProcessMessage handleReceived(const meshtastic_MeshPacket &mp) override;
|
||||
};
|
||||
|
||||
extern AtakPluginModule *atakPluginModule;
|
||||
extern AtakPluginModule *atakPluginModule;
|
||||
|
||||
Reference in New Issue
Block a user