Rtty tx and rx (#2977)

This commit is contained in:
Totoo
2026-02-16 14:34:55 +01:00
committed by GitHub
parent 95eafeb812
commit 794daf5257
21 changed files with 1809 additions and 1 deletions
+23
View File
@@ -153,6 +153,7 @@ class Message {
MorseTXConfigure = 95,
MorseTXkey = 96,
StreamTXConfiguration = 97,
RTTYData = 98,
MAX
};
@@ -1770,4 +1771,26 @@ class StreamTXConfigurationMessage : public Message {
uint8_t mode = 0; // am = 0, 2fsk = 1
};
class RTTYDataMessage : public Message {
public:
constexpr RTTYDataMessage(uint16_t baud = 4545, uint16_t shift = 170, int16_t mark_tone = -85, int16_t space_tone = 85, uint8_t stopbits = 3, bool inverted = false)
: Message{ID::RTTYData},
baud(baud),
shift(shift),
mark_tone(mark_tone),
space_tone(space_tone),
inverted(inverted),
stopbits(stopbits) {
}
uint8_t data[490]{0}; // 5bit data, stored on 8 bits.
uint16_t data_len = 0; // count of data sent
uint16_t baud = 4545; // /100 baud 45.45 = 4545
uint16_t shift = 170; // hz
int16_t mark_tone = 0; // for tx., hz
int16_t space_tone = 170; // hz
bool inverted = false; // for tx, if true, mark and space tones are swapped.
uint8_t stopbits = 3; // doubled value is stored here, so stop 2 = 1 stop bit, 3 = 1.5, 4 = 2.
static constexpr uint16_t max_len = 490;
};
#endif /*__MESSAGE_H__*/
+2
View File
@@ -126,6 +126,8 @@ constexpr image_tag_t image_tag_noaaapt_rx{'P', 'N', 'O', 'A'};
constexpr image_tag_t image_tag_sstv_rx{'P', 'S', 'R', 'X'};
constexpr image_tag_t image_tag_morse{'P', 'M', 'R', 'S'};
constexpr image_tag_t image_tag_morsetx{'P', 'M', 'R', 'T'};
constexpr image_tag_t image_tag_rttyrx{'P', 'R', 'T', 'R'};
constexpr image_tag_t image_tag_rttytx{'P', 'R', 'T', 'T'};
constexpr image_tag_t image_tag_noop{'P', 'N', 'O', 'P'};