mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 18:28:11 +00:00
SSTV transmit beta (320x256 24bpp Scottie 2 only)
This commit is contained in:
@@ -86,6 +86,7 @@ public:
|
||||
JammerConfigure = 41,
|
||||
WidebandSpectrumConfig = 42,
|
||||
FSKConfigure = 43,
|
||||
SSTVConfigure = 44,
|
||||
|
||||
POCSAGPacket = 50,
|
||||
|
||||
@@ -712,6 +713,21 @@ public:
|
||||
const uint32_t pause_symbols;
|
||||
};
|
||||
|
||||
class SSTVConfigureMessage : public Message {
|
||||
public:
|
||||
constexpr SSTVConfigureMessage(
|
||||
const uint8_t vis_code,
|
||||
const uint32_t pixel_duration
|
||||
) : Message { ID::SSTVConfigure },
|
||||
vis_code(vis_code),
|
||||
pixel_duration(pixel_duration)
|
||||
{
|
||||
}
|
||||
|
||||
const uint8_t vis_code;
|
||||
const uint32_t pixel_duration;
|
||||
};
|
||||
|
||||
class FSKConfigureMessage : public Message {
|
||||
public:
|
||||
constexpr FSKConfigureMessage(
|
||||
|
@@ -76,7 +76,6 @@ constexpr image_tag_t image_tag_wideband_spectrum { 'P', 'S', 'P', 'E' };
|
||||
constexpr image_tag_t image_tag_jammer { 'P', 'J', 'A', 'M' };
|
||||
constexpr image_tag_t image_tag_audio_tx { 'P', 'A', 'T', 'X' };
|
||||
constexpr image_tag_t image_tag_afsk { 'P', 'A', 'F', 'S' };
|
||||
constexpr image_tag_t image_tag_epar { 'P', 'E', 'P', 'R' };
|
||||
constexpr image_tag_t image_tag_tones { 'P', 'T', 'O', 'N' };
|
||||
constexpr image_tag_t image_tag_rds { 'P', 'R', 'D', 'S' };
|
||||
constexpr image_tag_t image_tag_ook { 'P', 'O', 'O', 'K' };
|
||||
@@ -84,6 +83,7 @@ constexpr image_tag_t image_tag_adsb_tx { 'P', 'A', 'D', 'S' };
|
||||
constexpr image_tag_t image_tag_replay { 'P', 'R', 'E', 'P' };
|
||||
constexpr image_tag_t image_tag_fsktx { 'P', 'F', 'S', 'K' };
|
||||
constexpr image_tag_t image_tag_mic_tx { 'P', 'M', 'T', 'X' };
|
||||
constexpr image_tag_t image_tag_sstv_tx { 'P', 'S', 'T', 'X' };
|
||||
|
||||
constexpr image_tag_t image_tag_noop { 'P', 'N', 'O', 'P' };
|
||||
|
||||
|
@@ -19,12 +19,25 @@
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SSTV_H__
|
||||
#define __SSTV_H__
|
||||
|
||||
namespace sstv {
|
||||
|
||||
#define SSTV_SAMPLERATE 3072000
|
||||
#define SSTV_DELTA_COEF ((1ULL << 32) / SSTV_SAMPLERATE)
|
||||
|
||||
#define SSTV_F2D(f) (uint32_t)((f) * SSTV_DELTA_COEF)
|
||||
#define SSTV_MS2S(f) (uint32_t)((f) / 1000.0 * (float)SSTV_SAMPLERATE)
|
||||
|
||||
#define SSTV_VIS_SS SSTV_F2D(1200)
|
||||
#define SSTV_VIS_ZERO SSTV_F2D(1300)
|
||||
#define SSTV_VIS_ONE SSTV_F2D(1100)
|
||||
|
||||
struct sstv_tone {
|
||||
uint16_t frequency;
|
||||
uint16_t duration;
|
||||
uint32_t frequency;
|
||||
uint32_t duration;
|
||||
};
|
||||
|
||||
struct sstv_scanline {
|
||||
@@ -35,3 +48,4 @@ struct sstv_scanline {
|
||||
|
||||
} /* namespace sstv */
|
||||
|
||||
#endif/*__SSTV_H__*/
|
||||
|
Reference in New Issue
Block a user