FLEX pager app (#2883)

* Add FLEX pager support

- Introduced a new FLEX configuration function in baseband_api.
- Added FLEX application view and associated UI elements.
- Implemented FLEX processing logic in proc_flex, including demodulation and message handling.
- Updated CMakeLists to include new FLEX source files and headers.
- Enhanced message system to support FLEX-specific messages and statistics.

This commit lays the groundwork for FLEX pager functionality, allowing for the reception and processing of FLEX messages.

* Fixed baseband and moved app to external with some other fixes.

* Format code

---------

Co-authored-by: RocketGod <57732082+RocketGod-git@users.noreply.github.com>
This commit is contained in:
Tim Elfelt
2025-12-12 10:43:51 -06:00
committed by GitHub
parent 4129d57c09
commit 106e56abc3
14 changed files with 1425 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#ifndef __FLEX_DEFS_H__
#define __FLEX_DEFS_H__
#include <cstdint>
#include <array>
#include "baseband.hpp"
namespace flex {
enum class FlexMode : uint8_t {
FLEX_1600_2FSK,
FLEX_3200_2FSK,
FLEX_3200_4FSK,
FLEX_6400_4FSK
};
struct FlexStats {
uint32_t symbols_processed;
uint32_t total_frames;
uint32_t correct_frames;
};
struct FlexPacket {
uint32_t bitrate; // 1600, 3200, 6400
uint32_t capcode;
uint32_t function; // 0-3
uint32_t type; // Message type (e.g. ALN, NUM, etc - could use enum)
char message[128]; // Decoded message text
uint32_t status; // 0=OK, other=Errors
};
} /* namespace flex */
#endif /*__FLEX_DEFS_H__*/
+50
View File
@@ -35,6 +35,7 @@
#include "adsb_frame.hpp"
#include "ert_packet.hpp"
#include "pocsag_packet.hpp"
#include "flex_defs.hpp"
#include "aprs_packet.hpp"
#include "sonde_packet.hpp"
#include "tpms_packet.hpp"
@@ -136,6 +137,10 @@ class Message {
NoaaAptRxImageData = 79,
FSKPacket = 80,
EPIRBPacket = 81,
FlexPacket = 82,
FlexStats = 83,
FlexConfigure = 84,
FlexDebug = 85,
MAX
};
@@ -1569,4 +1574,49 @@ class NoaaAptRxImageDataMessage : public Message {
uint32_t cnt = 0;
};
class FlexPacketMessage : public Message {
public:
constexpr FlexPacketMessage(const flex::FlexPacket& packet)
: Message{ID::FlexPacket},
packet{packet} {
}
flex::FlexPacket packet;
};
class FlexStatsMessage : public Message {
public:
constexpr FlexStatsMessage(const flex::FlexStats& stats)
: Message{ID::FlexStats},
stats{stats} {
}
flex::FlexStats stats;
};
class FlexConfigureMessage : public Message {
public:
constexpr FlexConfigureMessage()
: Message{ID::FlexConfigure} {
}
};
class FlexDebugMessage : public Message {
public:
constexpr FlexDebugMessage(const uint32_t val1, const uint32_t val2, const char* msg)
: Message{ID::FlexDebug},
val1{val1},
val2{val2},
text{} {
size_t i = 0;
while (i < sizeof(text) - 1 && msg[i] != '\0') {
text[i] = msg[i];
i++;
}
text[i] = '\0';
}
uint32_t val1;
uint32_t val2;
char text[64];
};
#endif /*__MESSAGE_H__*/
+1
View File
@@ -91,6 +91,7 @@ constexpr image_tag_t image_tag_epirb_rx{'P', 'E', 'P', 'I'};
constexpr image_tag_t image_tag_nfm_audio{'P', 'N', 'F', 'M'};
constexpr image_tag_t image_tag_pocsag{'P', 'P', 'O', 'C'};
constexpr image_tag_t image_tag_pocsag2{'P', 'P', 'O', '2'};
constexpr image_tag_t image_tag_flex{'P', 'F', 'L', 'X'};
constexpr image_tag_t image_tag_sonde{'P', 'S', 'O', 'N'};
constexpr image_tag_t image_tag_tpms{'P', 'T', 'P', 'M'};
constexpr image_tag_t image_tag_wfm_audio{'P', 'W', 'F', 'M'};