SSTV transmit beta (320x256 24bpp Scottie 2 only)

This commit is contained in:
furrtek
2017-03-23 04:29:58 +00:00
parent 5b74b83458
commit 6a0bcb9cca
13 changed files with 410 additions and 45 deletions

View File

@@ -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(

View File

@@ -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' };

View File

@@ -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__*/