"CW generator" and "Whistle" merged in "Signal generator"
Added wave shape selection and tone frequency auto-update Converted color icons to B&W
@ -172,7 +172,7 @@ set(CPPSRC
|
||||
ui_channel.cpp
|
||||
ui_scanner.cpp
|
||||
ui_coasterp.cpp
|
||||
ui_cw.cpp
|
||||
ui_siggen.cpp
|
||||
ui_debug.cpp
|
||||
ui_encoders.cpp
|
||||
ui_font_fixed_8x16.cpp
|
||||
@ -204,7 +204,6 @@ set(CPPSRC
|
||||
ui_touch_calibration.cpp
|
||||
ui_transmitter.cpp
|
||||
ui_whipcalc.cpp
|
||||
ui_whistle.cpp
|
||||
# ui_loadmodule.cpp
|
||||
recent_entries.cpp
|
||||
receiver_model.cpp
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "baseband_api.hpp"
|
||||
|
||||
#include "audio.hpp"
|
||||
#include "tonesets.hpp"
|
||||
#include "dsp_iir_config.hpp"
|
||||
|
||||
#include "portapack_shared_memory.hpp"
|
||||
@ -228,6 +229,20 @@ void set_spectrum(const size_t sampling_rate, const size_t trigger) {
|
||||
send_message(&message);
|
||||
}
|
||||
|
||||
void set_siggen_tone(const uint32_t tone) {
|
||||
const SigGenToneMessage message {
|
||||
TONES_F2D(tone)
|
||||
};
|
||||
send_message(&message);
|
||||
}
|
||||
|
||||
void set_siggen_config(const uint32_t bw, const uint32_t shape, const uint32_t duration) {
|
||||
const SigGenConfigMessage message {
|
||||
bw, shape, duration * TONES_SAMPLERATE
|
||||
};
|
||||
send_message(&message);
|
||||
}
|
||||
|
||||
static bool baseband_image_running = false;
|
||||
|
||||
void run_image(const portapack::spi_flash::image_tag_t image_tag) {
|
||||
|
@ -76,6 +76,8 @@ void set_adsb();
|
||||
void set_jammer(const bool run, const jammer::JammerType type, const uint32_t speed);
|
||||
void set_rds_data(const uint16_t message_length);
|
||||
void set_spectrum(const size_t sampling_rate, const size_t trigger);
|
||||
void set_siggen_tone(const uint32_t tone);
|
||||
void set_siggen_config(const uint32_t bw, const uint32_t shape, const uint32_t duration);
|
||||
void request_beep();
|
||||
|
||||
void run_image(const portapack::spi_flash::image_tag_t image_tag);
|
||||
|
@ -241,6 +241,44 @@ static constexpr Bitmap bitmap_icon_sleep {
|
||||
{ 16, 16 }, bitmap_icon_sleep_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_cw_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0xFF, 0xFF, 0x7F,
|
||||
0xFE, 0xFF, 0xFF, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_cw {
|
||||
{ 32, 32 }, bitmap_sig_cw_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_speaker_data[] = {
|
||||
0x00, 0x00,
|
||||
0x00, 0x20,
|
||||
@ -351,6 +389,44 @@ static constexpr Bitmap bitmap_icon_ais {
|
||||
{ 16, 16 }, bitmap_icon_ais_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_square_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0xFE, 0x83, 0xFF, 0x60,
|
||||
0xFE, 0x83, 0xFF, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0x83, 0xC1, 0x60,
|
||||
0x06, 0xFF, 0xC1, 0x7F,
|
||||
0x06, 0xFF, 0xC1, 0x7F,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_square {
|
||||
{ 32, 32 }, bitmap_sig_square_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_nuoptix_data[] = {
|
||||
0x80, 0x01,
|
||||
0x80, 0x01,
|
||||
@ -629,6 +705,44 @@ static constexpr Bitmap bitmap_icon_setup {
|
||||
{ 16, 16 }, bitmap_icon_setup_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_saw_down_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x0E, 0x80, 0x00, 0x60,
|
||||
0x1E, 0x80, 0x01, 0x60,
|
||||
0x3E, 0x80, 0x03, 0x60,
|
||||
0x76, 0x80, 0x07, 0x60,
|
||||
0xE6, 0x80, 0x0F, 0x60,
|
||||
0xC6, 0x81, 0x1D, 0x60,
|
||||
0x86, 0x83, 0x39, 0x60,
|
||||
0x06, 0x87, 0x71, 0x60,
|
||||
0x06, 0x8E, 0xE1, 0x60,
|
||||
0x06, 0x9C, 0xC1, 0x61,
|
||||
0x06, 0xB8, 0x81, 0x63,
|
||||
0x06, 0xF0, 0x01, 0x67,
|
||||
0x06, 0xE0, 0x01, 0x6E,
|
||||
0x06, 0xC0, 0x01, 0x7C,
|
||||
0x06, 0x80, 0x01, 0x78,
|
||||
0x06, 0x00, 0x01, 0x70,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_saw_down {
|
||||
{ 32, 32 }, bitmap_sig_saw_down_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_rds_data[] = {
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
@ -717,6 +831,36 @@ static constexpr Bitmap bitmap_icon_cwgen {
|
||||
{ 16, 16 }, bitmap_icon_cwgen_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_bulb_on_data[] = {
|
||||
0x04, 0x3C, 0x20,
|
||||
0x08, 0xFF, 0x10,
|
||||
0x90, 0xFF, 0x09,
|
||||
0xC0, 0xFF, 0x03,
|
||||
0xE0, 0xFF, 0x07,
|
||||
0xE0, 0xFF, 0x07,
|
||||
0xF0, 0xE7, 0x0F,
|
||||
0xF0, 0xBD, 0x0F,
|
||||
0xF7, 0xBD, 0xEF,
|
||||
0xF0, 0xDB, 0x0F,
|
||||
0xF0, 0xDB, 0x0F,
|
||||
0xE0, 0xDB, 0x07,
|
||||
0xE0, 0xCB, 0x07,
|
||||
0xC0, 0xD3, 0x03,
|
||||
0x90, 0xCB, 0x09,
|
||||
0x08, 0xFD, 0x10,
|
||||
0x04, 0xE3, 0x20,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0x42, 0x00,
|
||||
0x00, 0x3C, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_bulb_on {
|
||||
{ 24, 24 }, bitmap_bulb_on_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_receivers_data[] = {
|
||||
0xC0, 0x07,
|
||||
0x30, 0x18,
|
||||
@ -783,6 +927,44 @@ static constexpr Bitmap bitmap_stop {
|
||||
{ 16, 16 }, bitmap_stop_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_saw_up_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x01, 0x70,
|
||||
0x06, 0x80, 0x01, 0x78,
|
||||
0x06, 0xC0, 0x01, 0x7C,
|
||||
0x06, 0xE0, 0x01, 0x6E,
|
||||
0x06, 0xF0, 0x01, 0x67,
|
||||
0x06, 0xB8, 0x81, 0x63,
|
||||
0x06, 0x9C, 0xC1, 0x61,
|
||||
0x06, 0x8E, 0xE1, 0x60,
|
||||
0x06, 0x87, 0x71, 0x60,
|
||||
0x86, 0x83, 0x39, 0x60,
|
||||
0xC6, 0x81, 0x1D, 0x60,
|
||||
0xE6, 0x80, 0x0F, 0x60,
|
||||
0x76, 0x80, 0x07, 0x60,
|
||||
0x3E, 0x80, 0x03, 0x60,
|
||||
0x1E, 0x80, 0x01, 0x60,
|
||||
0x0E, 0x80, 0x00, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_saw_up {
|
||||
{ 32, 32 }, bitmap_sig_saw_up_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_rssipwm_data[] = {
|
||||
0x00, 0x00, 0x00,
|
||||
0x8F, 0xE7, 0x7D,
|
||||
@ -865,6 +1047,36 @@ static constexpr Bitmap bitmap_icon_tpms {
|
||||
{ 16, 16 }, bitmap_icon_tpms_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_bulb_ignore_data[] = {
|
||||
0x00, 0x3C, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x80, 0x00, 0x01,
|
||||
0x40, 0x3C, 0x02,
|
||||
0x20, 0x7E, 0x04,
|
||||
0x20, 0xE7, 0x04,
|
||||
0x10, 0xC3, 0x08,
|
||||
0x10, 0xE3, 0x08,
|
||||
0x10, 0x70, 0x08,
|
||||
0x10, 0x38, 0x08,
|
||||
0x10, 0x18, 0x08,
|
||||
0x20, 0x18, 0x04,
|
||||
0x20, 0x00, 0x04,
|
||||
0x40, 0x18, 0x02,
|
||||
0x80, 0x18, 0x01,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xFF, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0x42, 0x00,
|
||||
0x00, 0x3C, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_bulb_ignore {
|
||||
{ 24, 24 }, bitmap_bulb_ignore_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_hackrf_data[] = {
|
||||
0x80, 0x00,
|
||||
0xC0, 0x01,
|
||||
@ -1063,6 +1275,82 @@ static constexpr Bitmap bitmap_icon_replay {
|
||||
{ 16, 16 }, bitmap_icon_replay_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_sine_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0xC0, 0x00,
|
||||
0x80, 0x07, 0xE0, 0x01,
|
||||
0xC0, 0x0F, 0xF0, 0x03,
|
||||
0xC0, 0x0C, 0x30, 0x03,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x18, 0x60, 0x06, 0x18,
|
||||
0x1E, 0xE0, 0x07, 0x78,
|
||||
0x0E, 0xC0, 0x03, 0x70,
|
||||
0x06, 0x80, 0x01, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_sine {
|
||||
{ 32, 32 }, bitmap_sig_sine_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_noise_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x20, 0x00, 0x00,
|
||||
0x00, 0x30, 0x80, 0x00,
|
||||
0x00, 0x30, 0x80, 0x01,
|
||||
0x40, 0x30, 0xC0, 0x03,
|
||||
0xC0, 0x30, 0xC0, 0x03,
|
||||
0xC0, 0x39, 0xC0, 0x72,
|
||||
0xC0, 0x7B, 0x60, 0x76,
|
||||
0x60, 0x6E, 0x60, 0x1E,
|
||||
0x60, 0xCE, 0x6C, 0x0C,
|
||||
0x66, 0xC4, 0x6E, 0x0C,
|
||||
0x66, 0xC0, 0x3E, 0x00,
|
||||
0x2C, 0xC0, 0x3B, 0x00,
|
||||
0x3C, 0xC0, 0x39, 0x00,
|
||||
0x3C, 0xC0, 0x18, 0x00,
|
||||
0x18, 0x40, 0x10, 0x00,
|
||||
0x18, 0x40, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_noise {
|
||||
{ 32, 32 }, bitmap_sig_noise_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_aprs_data[] = {
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
@ -1085,6 +1373,44 @@ static constexpr Bitmap bitmap_icon_aprs {
|
||||
{ 16, 16 }, bitmap_icon_aprs_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_sig_tri_data[] = {
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0xC0, 0x00,
|
||||
0x00, 0x03, 0xC0, 0x00,
|
||||
0x80, 0x07, 0xE0, 0x01,
|
||||
0x80, 0x07, 0xE0, 0x01,
|
||||
0xC0, 0x0C, 0x30, 0x03,
|
||||
0xC0, 0x0C, 0x30, 0x03,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x60, 0x18, 0x18, 0x06,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x30, 0x30, 0x0C, 0x0C,
|
||||
0x18, 0x60, 0x06, 0x18,
|
||||
0x18, 0x60, 0x06, 0x18,
|
||||
0x0E, 0xC0, 0x03, 0x70,
|
||||
0x0E, 0xC0, 0x03, 0x70,
|
||||
0x06, 0x80, 0x01, 0x60,
|
||||
0x06, 0x80, 0x01, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_sig_tri {
|
||||
{ 32, 32 }, bitmap_sig_tri_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_icon_soundboard_data[] = {
|
||||
0x00, 0x00,
|
||||
0xFF, 0xFF,
|
||||
@ -1233,6 +1559,36 @@ static constexpr Bitmap bitmap_icon_jammer {
|
||||
{ 16, 16 }, bitmap_icon_jammer_data
|
||||
};
|
||||
|
||||
static constexpr uint8_t bitmap_bulb_off_data[] = {
|
||||
0x00, 0x3C, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x80, 0x00, 0x01,
|
||||
0x40, 0x00, 0x02,
|
||||
0x20, 0x00, 0x04,
|
||||
0x20, 0x00, 0x04,
|
||||
0x10, 0x00, 0x08,
|
||||
0x10, 0x42, 0x08,
|
||||
0x10, 0x42, 0x08,
|
||||
0x10, 0x24, 0x08,
|
||||
0x10, 0x24, 0x08,
|
||||
0x20, 0x24, 0x04,
|
||||
0x20, 0x2C, 0x04,
|
||||
0x40, 0x34, 0x02,
|
||||
0x80, 0x3C, 0x01,
|
||||
0x00, 0xFF, 0x00,
|
||||
0x00, 0xE3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0xC3, 0x00,
|
||||
0x00, 0xBD, 0x00,
|
||||
0x00, 0x42, 0x00,
|
||||
0x00, 0x3C, 0x00,
|
||||
};
|
||||
static constexpr Bitmap bitmap_bulb_off {
|
||||
{ 24, 24 }, bitmap_bulb_off_data
|
||||
};
|
||||
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
|
@ -1,47 +0,0 @@
|
||||
const unsigned char bulb_ignore_bmp[] = {
|
||||
0x42, 0x4d, 0xc6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00,
|
||||
0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x70, 0x01,
|
||||
0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x08, 0x00,
|
||||
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x19, 0x19, 0x19, 0x00, 0x29, 0x2e, 0x21, 0x00, 0x1b, 0x1b,
|
||||
0x66, 0x00, 0x3f, 0x3f, 0x3f, 0x00, 0xff, 0x00, 0xff, 0x00, 0x55, 0x55,
|
||||
0x55, 0x00, 0x6c, 0x6c, 0x6c, 0x00, 0x95, 0x95, 0x95, 0x00, 0x0a, 0x44,
|
||||
0x02, 0x77, 0x02, 0x77, 0x0a, 0x44, 0x00, 0x00, 0x00, 0x18, 0x42, 0x24,
|
||||
0x44, 0x44, 0x47, 0x30, 0x03, 0x74, 0x44, 0x44, 0x42, 0x24, 0x00, 0x00,
|
||||
0x00, 0x18, 0x42, 0x22, 0x44, 0x44, 0x73, 0x66, 0x55, 0x37, 0x44, 0x44,
|
||||
0x22, 0x24, 0x00, 0x00, 0x00, 0x18, 0x44, 0x22, 0x24, 0x44, 0x76, 0x33,
|
||||
0x33, 0x57, 0x44, 0x42, 0x22, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x42,
|
||||
0x22, 0x44, 0x73, 0x66, 0x55, 0x37, 0x44, 0x22, 0x24, 0x44, 0x00, 0x00,
|
||||
0x00, 0x18, 0x44, 0x44, 0x22, 0x24, 0x76, 0x33, 0x33, 0x57, 0x42, 0x22,
|
||||
0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44, 0x42, 0x22, 0x73, 0x66,
|
||||
0x55, 0x37, 0x22, 0x24, 0x44, 0x44, 0x00, 0x00, 0x06, 0x44, 0x00, 0x0c,
|
||||
0x22, 0x26, 0x53, 0x35, 0x52, 0x22, 0x06, 0x44, 0x00, 0x00, 0x06, 0x44,
|
||||
0x00, 0x0c, 0x42, 0x22, 0x31, 0x13, 0x22, 0x24, 0x06, 0x44, 0x00, 0x00,
|
||||
0x06, 0x44, 0x00, 0x0c, 0x47, 0x22, 0x21, 0x12, 0x22, 0x74, 0x06, 0x44,
|
||||
0x00, 0x00, 0x06, 0x44, 0x00, 0x0c, 0x74, 0x42, 0x22, 0x22, 0x24, 0x47,
|
||||
0x06, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44, 0x47, 0x44, 0x44, 0x22,
|
||||
0x22, 0x44, 0x44, 0x74, 0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44,
|
||||
0x47, 0x44, 0x64, 0x22, 0x22, 0x44, 0x44, 0x74, 0x44, 0x44, 0x00, 0x00,
|
||||
0x00, 0x18, 0x44, 0x44, 0x74, 0x44, 0x62, 0x22, 0x22, 0x24, 0x44, 0x47,
|
||||
0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44, 0x74, 0x46, 0x22, 0x24,
|
||||
0x42, 0x22, 0x44, 0x47, 0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44,
|
||||
0x74, 0x42, 0x22, 0x44, 0x44, 0x22, 0x24, 0x47, 0x44, 0x44, 0x00, 0x00,
|
||||
0x00, 0x18, 0x44, 0x44, 0x74, 0x22, 0x23, 0x44, 0x44, 0x32, 0x22, 0x47,
|
||||
0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44, 0x72, 0x22, 0x60, 0x44,
|
||||
0x44, 0x00, 0x22, 0x27, 0x44, 0x44, 0x00, 0x00, 0x00, 0x18, 0x44, 0x44,
|
||||
0x22, 0x24, 0x66, 0x00, 0x00, 0x44, 0x42, 0x22, 0x44, 0x44, 0x00, 0x00,
|
||||
0x00, 0x0a, 0x44, 0x42, 0x22, 0x44, 0x46, 0x00, 0x08, 0x44, 0x00, 0x06,
|
||||
0x22, 0x24, 0x44, 0x00, 0x00, 0x00, 0x00, 0x08, 0x44, 0x22, 0x24, 0x74,
|
||||
0x08, 0x44, 0x00, 0x08, 0x47, 0x42, 0x22, 0x44, 0x00, 0x00, 0x00, 0x08,
|
||||
0x42, 0x22, 0x44, 0x47, 0x08, 0x44, 0x00, 0x08, 0x74, 0x44, 0x22, 0x24,
|
||||
0x00, 0x00, 0x00, 0x18, 0x42, 0x24, 0x44, 0x44, 0x74, 0x44, 0x44, 0x47,
|
||||
0x44, 0x44, 0x42, 0x24, 0x00, 0x00, 0x08, 0x44, 0x00, 0x08, 0x47, 0x77,
|
||||
0x77, 0x74, 0x08, 0x44, 0x00, 0x01
|
||||
};
|
||||
const unsigned int bulb_ignore_bmp_len = 522;
|
@ -1,43 +0,0 @@
|
||||
const unsigned char bulb_off_bmp[] = {
|
||||
0x42, 0x4d, 0x9a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x00,
|
||||
0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x48, 0x01,
|
||||
0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x07, 0x00,
|
||||
0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x39, 0x39, 0x39, 0x00, 0xff, 0x00, 0xff, 0x00, 0x55, 0x5f,
|
||||
0x45, 0x00, 0x5b, 0x5b, 0x5b, 0x00, 0x7d, 0x7d, 0x7d, 0x00, 0x9d, 0x9d,
|
||||
0x9d, 0x00, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x11, 0x02, 0x66, 0x02, 0x66,
|
||||
0x0a, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x16, 0x30, 0x03, 0x61,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x63, 0x55, 0x44, 0x36,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x65, 0x33, 0x33, 0x46,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x63, 0x55, 0x44, 0x36,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x65, 0x33, 0x33, 0x46,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x63, 0x55, 0x44, 0x36,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x65, 0x43, 0x34, 0x46,
|
||||
0x08, 0x11, 0x00, 0x00, 0x08, 0x11, 0x00, 0x08, 0x63, 0x32, 0x23, 0x36,
|
||||
0x08, 0x11, 0x00, 0x00, 0x06, 0x11, 0x00, 0x0c, 0x16, 0x11, 0x22, 0x22,
|
||||
0x11, 0x61, 0x06, 0x11, 0x00, 0x00, 0x06, 0x11, 0x00, 0x0c, 0x61, 0x11,
|
||||
0x24, 0x22, 0x11, 0x16, 0x06, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11,
|
||||
0x16, 0x11, 0x11, 0x24, 0x22, 0x11, 0x11, 0x61, 0x11, 0x11, 0x00, 0x00,
|
||||
0x00, 0x18, 0x11, 0x11, 0x16, 0x11, 0x51, 0x34, 0x43, 0x11, 0x11, 0x61,
|
||||
0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x61, 0x11, 0x51, 0x31,
|
||||
0x13, 0x11, 0x11, 0x16, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11,
|
||||
0x61, 0x15, 0x51, 0x31, 0x13, 0x11, 0x11, 0x16, 0x11, 0x11, 0x00, 0x00,
|
||||
0x00, 0x18, 0x11, 0x11, 0x61, 0x15, 0x53, 0x11, 0x11, 0x31, 0x11, 0x16,
|
||||
0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x61, 0x15, 0x53, 0x11,
|
||||
0x11, 0x31, 0x11, 0x16, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11,
|
||||
0x61, 0x11, 0x50, 0x11, 0x11, 0x00, 0x11, 0x16, 0x11, 0x11, 0x00, 0x00,
|
||||
0x00, 0x18, 0x11, 0x11, 0x16, 0x11, 0x55, 0x00, 0x00, 0x11, 0x11, 0x61,
|
||||
0x11, 0x11, 0x00, 0x00, 0x00, 0x0a, 0x11, 0x11, 0x16, 0x11, 0x15, 0x00,
|
||||
0x08, 0x11, 0x00, 0x06, 0x61, 0x11, 0x11, 0x00, 0x00, 0x00, 0x06, 0x11,
|
||||
0x02, 0x61, 0x08, 0x11, 0x02, 0x16, 0x06, 0x11, 0x00, 0x00, 0x06, 0x11,
|
||||
0x02, 0x16, 0x08, 0x11, 0x02, 0x61, 0x06, 0x11, 0x00, 0x00, 0x08, 0x11,
|
||||
0x00, 0x08, 0x61, 0x11, 0x11, 0x16, 0x08, 0x11, 0x00, 0x00, 0x08, 0x11,
|
||||
0x00, 0x08, 0x16, 0x66, 0x66, 0x61, 0x08, 0x11, 0x00, 0x01
|
||||
};
|
||||
const unsigned int bulb_off_bmp_len = 478;
|
@ -1,46 +0,0 @@
|
||||
const unsigned char bulb_on_bmp[] = {
|
||||
0x42, 0x4d, 0xba, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00,
|
||||
0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x60, 0x01,
|
||||
0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x09, 0x00,
|
||||
0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x39, 0x39, 0x39, 0x00, 0xff, 0x00, 0xff, 0x00, 0x5b, 0x5b,
|
||||
0x5b, 0x00, 0x7d, 0x7d, 0x7d, 0x00, 0x90, 0xa0, 0x75, 0x00, 0x9d, 0x9d,
|
||||
0x9d, 0x00, 0x44, 0xe5, 0xff, 0x00, 0x85, 0xfe, 0xff, 0x00, 0xff, 0xff,
|
||||
0xff, 0x00, 0x0a, 0x11, 0x02, 0x88, 0x02, 0x88, 0x0a, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x18, 0x20, 0x02, 0x81, 0x08, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x82, 0x55, 0x33, 0x28, 0x08, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x85, 0x22, 0x22, 0x38, 0x08, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x82, 0x55, 0x33, 0x28, 0x08, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x85, 0x22, 0x22, 0x38, 0x08, 0x11, 0x00, 0x00,
|
||||
0x08, 0x11, 0x00, 0x08, 0x82, 0x55, 0x32, 0x28, 0x08, 0x11, 0x00, 0x00,
|
||||
0x00, 0x18, 0x11, 0x61, 0x11, 0x11, 0x85, 0x33, 0x33, 0x28, 0x11, 0x11,
|
||||
0x16, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x16, 0x11, 0x11, 0x83, 0x54,
|
||||
0x45, 0x38, 0x11, 0x11, 0x61, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11,
|
||||
0x61, 0x18, 0x77, 0x44, 0x44, 0x77, 0x81, 0x16, 0x11, 0x11, 0x00, 0x00,
|
||||
0x06, 0x11, 0x00, 0x0c, 0x87, 0x66, 0x48, 0x44, 0x66, 0x78, 0x06, 0x11,
|
||||
0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x18, 0x76, 0x66, 0x48, 0x44, 0x66,
|
||||
0x67, 0x81, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x18, 0x66,
|
||||
0x86, 0x38, 0x83, 0x66, 0x66, 0x81, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18,
|
||||
0x11, 0x11, 0x87, 0x67, 0x87, 0x37, 0x63, 0x76, 0x66, 0x78, 0x11, 0x11,
|
||||
0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x86, 0x78, 0x86, 0x36, 0x73, 0x67,
|
||||
0x67, 0x68, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18, 0x66, 0x61, 0x86, 0x68,
|
||||
0x83, 0x67, 0x76, 0x36, 0x76, 0x68, 0x16, 0x66, 0x00, 0x00, 0x00, 0x18,
|
||||
0x11, 0x11, 0x86, 0x78, 0x85, 0x77, 0x77, 0x57, 0x77, 0x68, 0x11, 0x11,
|
||||
0x00, 0x00, 0x00, 0x18, 0x11, 0x11, 0x87, 0x67, 0x88, 0x78, 0x77, 0x88,
|
||||
0x76, 0x78, 0x11, 0x11, 0x00, 0x00, 0x00, 0x08, 0x11, 0x11, 0x18, 0x66,
|
||||
0x06, 0x88, 0x00, 0x0a, 0x77, 0x77, 0x81, 0x11, 0x11, 0x00, 0x00, 0x00,
|
||||
0x00, 0x18, 0x11, 0x11, 0x18, 0x76, 0x78, 0x77, 0x77, 0x76, 0x76, 0x81,
|
||||
0x11, 0x11, 0x00, 0x00, 0x06, 0x11, 0x02, 0x87, 0x08, 0x67, 0x02, 0x68,
|
||||
0x06, 0x11, 0x00, 0x00, 0x00, 0x0a, 0x11, 0x11, 0x61, 0x18, 0x76, 0x00,
|
||||
0x06, 0x66, 0x00, 0x08, 0x81, 0x16, 0x11, 0x11, 0x00, 0x00, 0x00, 0x18,
|
||||
0x11, 0x16, 0x11, 0x11, 0x87, 0x77, 0x77, 0x78, 0x11, 0x11, 0x61, 0x11,
|
||||
0x00, 0x00, 0x00, 0x18, 0x11, 0x61, 0x11, 0x11, 0x18, 0x88, 0x88, 0x81,
|
||||
0x11, 0x11, 0x16, 0x11, 0x00, 0x01
|
||||
};
|
||||
const unsigned int bulb_on_bmp_len = 510;
|
@ -86,14 +86,15 @@ private:
|
||||
flags flag;
|
||||
} credits_t;
|
||||
|
||||
const credits_t credits[14] = { {"Portapack|HAVOC", "Git hash " GIT_REVISION, SECTION},
|
||||
const credits_t credits[15] = { {"Portapack|HAVOC", "Git hash " GIT_REVISION, SECTION},
|
||||
{"Gurus", "J. Boone", TITLE},
|
||||
{"M. Ossmann", "", MEMBER_LF},
|
||||
{"Immaturity", "Furrtek", TITLE_LF},
|
||||
{"HAVOC", "Furrtek", TITLE_LF},
|
||||
{"POCSAG rx", "T. Sailer", TITLE},
|
||||
{"E. Oenal", "", MEMBER_LF},
|
||||
{"RDS waveform", "C. Jacquet", TITLE_LF},
|
||||
{"Xy. infos", "cLx", TITLE_LF},
|
||||
{"ADS-B map", "ShadeRelief", TITLE_LF},
|
||||
{"Thanks", "", SECTION},
|
||||
{"Rainer Matla", "Keld Norman", TITLE},
|
||||
{"Giorgio C.", "DC1RDB", TITLE},
|
||||
|
@ -26,11 +26,8 @@
|
||||
#include "ui_transmitter.hpp"
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
#include "bmp_bulb_on.hpp"
|
||||
#include "bmp_bulb_off.hpp"
|
||||
#include "bmp_bulb_ignore.hpp"
|
||||
|
||||
#include "bht.hpp"
|
||||
#include "bitmap.hpp"
|
||||
#include "message.hpp"
|
||||
#include "transmitter_model.hpp"
|
||||
#include "encoders.hpp"
|
||||
@ -198,9 +195,9 @@ private:
|
||||
std::array<ImageOptionsField, 4> relay_states { };
|
||||
|
||||
ImageOptionsField::options_t relay_options = {
|
||||
{ &bulb_ignore_bmp[0], 0 },
|
||||
{ &bulb_off_bmp[0], 1 },
|
||||
{ &bulb_on_bmp[0], 2 }
|
||||
{ &bitmap_bulb_ignore, 0 },
|
||||
{ &bitmap_bulb_off, 1 },
|
||||
{ &bitmap_bulb_on, 2 }
|
||||
};
|
||||
|
||||
ProgressBar progressbar {
|
||||
|
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "ui_cw.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
void CWTXView::focus() {
|
||||
tx_view.focus();
|
||||
}
|
||||
|
||||
CWTXView::~CWTXView() {
|
||||
transmitter_model.disable();
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
void CWTXView::start_tx() {
|
||||
transmitter_model.set_sampling_rate(1536000U); // Not important
|
||||
transmitter_model.set_rf_amp(true);
|
||||
transmitter_model.set_baseband_bandwidth(1750000); // Not important
|
||||
transmitter_model.enable();
|
||||
}
|
||||
|
||||
void CWTXView::stop_tx() {
|
||||
transmitter_model.disable();
|
||||
}
|
||||
|
||||
CWTXView::CWTXView(
|
||||
NavigationView& nav
|
||||
)
|
||||
{
|
||||
baseband::run_image(portapack::spi_flash::image_tag_noop);
|
||||
|
||||
add_children({
|
||||
&tx_view
|
||||
});
|
||||
|
||||
tx_view.on_edit_frequency = [this, &nav]() {
|
||||
auto new_view = nav.push<FrequencyKeypadView>(receiver_model.tuning_frequency());
|
||||
new_view->on_changed = [this](rf::Frequency f) {
|
||||
receiver_model.set_tuning_frequency(f);
|
||||
};
|
||||
};
|
||||
|
||||
tx_view.on_start = [this]() {
|
||||
start_tx();
|
||||
tx_view.set_transmitting(true);
|
||||
};
|
||||
|
||||
tx_view.on_stop = [this]() {
|
||||
stop_tx();
|
||||
tx_view.set_transmitting(false);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2016 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CW_TX_H__
|
||||
#define __CW_TX_H__
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
#include "message.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
class CWTXView : public View {
|
||||
public:
|
||||
CWTXView(NavigationView& nav);
|
||||
~CWTXView();
|
||||
|
||||
void focus() override;
|
||||
|
||||
std::string title() const override { return "CW generator"; };
|
||||
|
||||
private:
|
||||
void start_tx();
|
||||
void stop_tx();
|
||||
|
||||
TransmitterView tx_view {
|
||||
8 * 16,
|
||||
10000,
|
||||
12
|
||||
};
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif/*__CW_TX_H__*/
|
@ -36,7 +36,7 @@
|
||||
#include "ui_aprstx.hpp"
|
||||
#include "ui_bht_tx.hpp"
|
||||
#include "ui_coasterp.hpp"
|
||||
#include "ui_cw.hpp"
|
||||
#include "ui_siggen.hpp"
|
||||
#include "ui_debug.hpp"
|
||||
#include "ui_encoders.hpp"
|
||||
#include "ui_freqman.hpp"
|
||||
@ -55,7 +55,6 @@
|
||||
#include "ui_soundboard.hpp"
|
||||
#include "ui_sstvtx.hpp"
|
||||
#include "ui_whipcalc.hpp"
|
||||
#include "ui_whistle.hpp"
|
||||
|
||||
#include "analog_audio_app.hpp"
|
||||
#include "ais_app.hpp"
|
||||
@ -283,17 +282,19 @@ void NavigationView::focus() {
|
||||
|
||||
ReceiversMenuView::ReceiversMenuView(NavigationView& nav) {
|
||||
add_items({
|
||||
{ "ADS-B: Planes", ui::Color::orange(), &bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
|
||||
{ "ADS-B: Planes", ui::Color::yellow(),&bitmap_icon_adsb, [&nav](){ nav.push<ADSBRxView>(); }, },
|
||||
{ "AIS: Boats", ui::Color::green(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
|
||||
{ "APRS", ui::Color::grey(), &bitmap_icon_aprs, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||
{ "Audio", ui::Color::green(), nullptr, [&nav](){ nav.push<AnalogAudioView>(false); } },
|
||||
{ "Audio", ui::Color::green(), &bitmap_icon_speaker, [&nav](){ nav.push<AnalogAudioView>(false); } },
|
||||
{ "ERT: Utility Meters", ui::Color::green(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
|
||||
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGAppView>(); } },
|
||||
{ "SIGFOX", ui::Color::grey(), &bitmap_icon_fox, [&nav](){ nav.push<NotImplementedView>(); } }, // SIGFRXView
|
||||
{ "LoRa", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||
{ "SSTV", ui::Color::grey(), &bitmap_icon_sstv, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||
{ "TPMS: Cars", ui::Color::green(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
|
||||
});
|
||||
on_left = [&nav](){ nav.pop(); };
|
||||
//set_highlighted(3); // Default selection is "Audio"
|
||||
}
|
||||
|
||||
/* TransmittersMenuView **************************************************/
|
||||
@ -312,10 +313,10 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
||||
{ "OOK remote encoders", ui::Color::yellow(), &bitmap_icon_remote, [&nav](){ nav.push<EncodersView>(); } },
|
||||
{ "POCSAG", ui::Color::green(), &bitmap_icon_pocsag, [&nav](){ nav.push<POCSAGTXView>(); } },
|
||||
{ "RDS", ui::Color::green(), &bitmap_icon_rds, [&nav](){ nav.push<RDSView>(); } },
|
||||
{ "Signal generator", ui::Color::green(), &bitmap_icon_cwgen, [&nav](){ nav.push<SigGenView>(); } },
|
||||
{ "Soundboard", ui::Color::green(), &bitmap_icon_soundboard, [&nav](){ nav.push<SoundBoardView>(); } },
|
||||
{ "SSTV", ui::Color::green(), &bitmap_icon_sstv, [&nav](){ nav.push<SSTVTXView>(); } },
|
||||
{ "TEDI/LCR AFSK", ui::Color::yellow(), &bitmap_icon_lcr, [&nav](){ nav.push<LCRView>(); } },
|
||||
{ "Whistle", ui::Color::green(), &bitmap_icon_whistle, [&nav](){ nav.push<WhistleView>(); } },
|
||||
});
|
||||
on_left = [&nav](){ nav.pop(); };
|
||||
}
|
||||
@ -325,7 +326,6 @@ TransmittersMenuView::TransmittersMenuView(NavigationView& nav) {
|
||||
UtilitiesMenuView::UtilitiesMenuView(NavigationView& nav) {
|
||||
add_items({
|
||||
{ "Frequency manager", ui::Color::green(), &bitmap_icon_freqman, [&nav](){ nav.push<FrequencyManagerView>(); } },
|
||||
{ "CW generator", ui::Color::green(), &bitmap_icon_cwgen, [&nav](){ nav.push<CWTXView>(); } },
|
||||
{ "Whip antenna length", ui::Color::yellow(),nullptr, [&nav](){ nav.push<WhipCalcView>(); } },
|
||||
{ "Notepad", ui::Color::grey(), &bitmap_icon_notepad, [&nav](){ nav.push<NotImplementedView>(); } },
|
||||
{ "Wipe SD card", ui::Color::red(), nullptr, [&nav](){ nav.push<WipeSDView>(); } },
|
||||
|
@ -20,10 +20,10 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "ui_whistle.hpp"
|
||||
#include "ui_receiver.hpp"
|
||||
#include "tonesets.hpp"
|
||||
#include "ui_siggen.hpp"
|
||||
|
||||
#include "tonesets.hpp"
|
||||
#include "portapack.hpp"
|
||||
#include "baseband_api.hpp"
|
||||
|
||||
#include <cstring>
|
||||
@ -33,57 +33,75 @@ using namespace portapack;
|
||||
|
||||
namespace ui {
|
||||
|
||||
void WhistleView::start_tx() {
|
||||
baseband::set_tone(
|
||||
0,
|
||||
field_tone.value() * TONES_DELTA_COEF,
|
||||
(checkbox_stop.value()) ? field_stop.value() * TONES_SAMPLERATE : 0xFFFFFFFF); // (Almost) infinite duration :)
|
||||
|
||||
shared_memory.bb_data.tones_data.message[0] = 0;
|
||||
|
||||
void SigGenView::focus() {
|
||||
options_shape.focus();
|
||||
}
|
||||
|
||||
SigGenView::~SigGenView() {
|
||||
transmitter_model.disable();
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
void SigGenView::start_tx() {
|
||||
transmitter_model.set_sampling_rate(1536000);
|
||||
transmitter_model.set_rf_amp(true);
|
||||
transmitter_model.set_baseband_bandwidth(1750000);
|
||||
transmitter_model.enable();
|
||||
|
||||
baseband::set_tones_config(transmitter_model.bandwidth(), 0, 1, false, false);
|
||||
baseband::set_siggen_tone(symfield_tone.value_dec_u32());
|
||||
|
||||
tx_mode = SINGLE;
|
||||
auto duration = field_stop.value();
|
||||
if (!checkbox_auto.value())
|
||||
duration = 0;
|
||||
baseband::set_siggen_config(transmitter_model.bandwidth(), options_shape.selected_index_value(), field_stop.value());
|
||||
}
|
||||
|
||||
void WhistleView::on_tx_progress(const bool done) {
|
||||
if (done) {
|
||||
transmitter_model.disable();
|
||||
void SigGenView::update_tone() {
|
||||
baseband::set_siggen_tone(symfield_tone.value_dec_u32());
|
||||
}
|
||||
|
||||
void SigGenView::on_tx_progress(const bool done) {
|
||||
if (done)
|
||||
tx_view.set_transmitting(false);
|
||||
tx_mode = IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
void WhistleView::focus() {
|
||||
tx_view.focus();
|
||||
}
|
||||
|
||||
WhistleView::~WhistleView() {
|
||||
transmitter_model.disable();
|
||||
baseband::shutdown();
|
||||
}
|
||||
|
||||
WhistleView::WhistleView(
|
||||
SigGenView::SigGenView(
|
||||
NavigationView& nav
|
||||
)
|
||||
{
|
||||
baseband::run_image(portapack::spi_flash::image_tag_tones);
|
||||
baseband::run_image(portapack::spi_flash::image_tag_siggen);
|
||||
|
||||
add_children({
|
||||
&labels,
|
||||
&field_tone,
|
||||
&options_shape,
|
||||
&text_shape,
|
||||
&symfield_tone,
|
||||
&button_update,
|
||||
&checkbox_auto,
|
||||
&checkbox_stop,
|
||||
&field_stop,
|
||||
&tx_view
|
||||
});
|
||||
|
||||
field_tone.set_value(1520);
|
||||
field_stop.set_value(15);
|
||||
options_shape.on_change = [this](size_t, OptionsField::value_t v) {
|
||||
text_shape.set(shape_strings[v]);
|
||||
};
|
||||
options_shape.set_selected_index(0);
|
||||
text_shape.set(shape_strings[0]);
|
||||
|
||||
symfield_tone.set_sym(1, 1); // Default: 1000 Hz
|
||||
symfield_tone.on_change = [this]() {
|
||||
if (auto_update)
|
||||
update_tone();
|
||||
};
|
||||
|
||||
button_update.on_select = [this](Button&) {
|
||||
update_tone();
|
||||
};
|
||||
|
||||
checkbox_auto.on_select = [this](Checkbox&, bool v) {
|
||||
auto_update = v;
|
||||
};
|
||||
|
||||
tx_view.on_edit_frequency = [this, &nav]() {
|
||||
auto new_view = nav.push<FrequencyKeypadView>(receiver_model.tuning_frequency());
|
||||
@ -93,15 +111,15 @@ WhistleView::WhistleView(
|
||||
};
|
||||
|
||||
tx_view.on_start = [this]() {
|
||||
if (tx_mode == IDLE) {
|
||||
tx_view.set_transmitting(true);
|
||||
start_tx();
|
||||
}
|
||||
start_tx();
|
||||
tx_view.set_transmitting(true);
|
||||
};
|
||||
|
||||
tx_view.on_stop = [this]() {
|
||||
baseband::kill_tone();
|
||||
transmitter_model.disable();
|
||||
tx_view.set_transmitting(false);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
} /* namespace ui */
|
@ -20,57 +20,97 @@
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __SIGGEN_H__
|
||||
#define __SIGGEN_H__
|
||||
|
||||
#include "ui.hpp"
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "ui_transmitter.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
#include "message.hpp"
|
||||
#include "transmitter_model.hpp"
|
||||
|
||||
namespace ui {
|
||||
|
||||
class WhistleView : public View {
|
||||
class SigGenView : public View {
|
||||
public:
|
||||
WhistleView(NavigationView& nav);
|
||||
~WhistleView();
|
||||
SigGenView(NavigationView& nav);
|
||||
~SigGenView();
|
||||
|
||||
void focus() override;
|
||||
|
||||
std::string title() const override { return "Whistle"; };
|
||||
std::string title() const override { return "Signal generator"; };
|
||||
|
||||
private:
|
||||
void start_tx();
|
||||
void update_tone();
|
||||
void on_tx_progress(const bool done);
|
||||
|
||||
enum tx_modes {
|
||||
IDLE = 0,
|
||||
SINGLE
|
||||
|
||||
const std::string shape_strings[7] = {
|
||||
"CW",
|
||||
"Sine",
|
||||
"Triangle",
|
||||
"Saw up",
|
||||
"Saw down",
|
||||
"Square",
|
||||
"Noise"
|
||||
};
|
||||
|
||||
tx_modes tx_mode = IDLE;
|
||||
|
||||
bool auto_update { false };
|
||||
|
||||
Labels labels {
|
||||
{ { 3 * 8, 4 * 8 }, "Tone frequency: Hz", Color::light_grey() },
|
||||
{ { 22 * 8, 8 * 8 + 4 }, "s.", Color::light_grey() }
|
||||
{ { 6 * 8, 4 + 10 }, "Shape:", Color::light_grey() },
|
||||
{ { 7 * 8, 7 * 8 }, "Tone: Hz", Color::light_grey() },
|
||||
{ { 22 * 8, 15 * 8 + 4 }, "s.", Color::light_grey() },
|
||||
{ { 8 * 8, 20 * 8 }, "Modulation: FM", Color::light_grey() }
|
||||
};
|
||||
|
||||
NumberField field_tone {
|
||||
{ 19 * 8, 4 * 8 },
|
||||
4,
|
||||
{ 1, 9999 },
|
||||
ImageOptionsField options_shape {
|
||||
{ 13 * 8, 4, 32, 32 },
|
||||
Color::white(),
|
||||
Color::black(),
|
||||
{
|
||||
{ &bitmap_sig_cw, 0 },
|
||||
{ &bitmap_sig_sine, 1 },
|
||||
{ &bitmap_sig_tri, 2 },
|
||||
{ &bitmap_sig_saw_up, 3 },
|
||||
{ &bitmap_sig_saw_down, 4 },
|
||||
{ &bitmap_sig_square, 5 },
|
||||
{ &bitmap_sig_noise, 6 }
|
||||
}
|
||||
};
|
||||
|
||||
Text text_shape {
|
||||
{ 18 * 8, 4 + 10, 8 * 8, 16 },
|
||||
""
|
||||
};
|
||||
|
||||
SymField symfield_tone {
|
||||
{ 13 * 8, 7 * 8 },
|
||||
5,
|
||||
' '
|
||||
SymField::SYMFIELD_DEC
|
||||
};
|
||||
|
||||
Button button_update {
|
||||
{ 6 * 8, 10 * 8, 8 * 8, 3 * 8 },
|
||||
"Update"
|
||||
};
|
||||
|
||||
Checkbox checkbox_auto {
|
||||
{ 16 * 8, 10 * 8 },
|
||||
4,
|
||||
"Auto"
|
||||
};
|
||||
|
||||
Checkbox checkbox_stop {
|
||||
{ 5 * 8, 8 * 8 },
|
||||
{ 5 * 8, 15 * 8 },
|
||||
10,
|
||||
"Stop after"
|
||||
};
|
||||
|
||||
NumberField field_stop {
|
||||
{ 20 * 8, 8 * 8 + 4 },
|
||||
{ 20 * 8, 15 * 8 + 4 },
|
||||
2,
|
||||
{ 1, 99 },
|
||||
1,
|
||||
@ -93,3 +133,5 @@ private:
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
||||
#endif/*__SIGGEN_H__*/
|
@ -100,7 +100,7 @@ private:
|
||||
};
|
||||
|
||||
Text text_bw {
|
||||
{ 11 * 8, 2 * 8, 9 * 8, 1 * 16 },
|
||||
{ 11 * 8, 1 * 8, 9 * 8, 1 * 16 },
|
||||
"BW: kHz"
|
||||
};
|
||||
NumberField field_bw {
|
||||
|
@ -387,6 +387,13 @@ set(MODE_CPPSRC
|
||||
)
|
||||
DeclareTargets(PREP replay)
|
||||
|
||||
### Signal generator
|
||||
|
||||
set(MODE_CPPSRC
|
||||
proc_siggen.cpp
|
||||
)
|
||||
DeclareTargets(PSIG siggen)
|
||||
|
||||
### SSTV TX
|
||||
|
||||
set(MODE_CPPSRC
|
||||
|
@ -39,8 +39,8 @@ CaptureProcessor::CaptureProcessor() {
|
||||
decim_0.configure(decim_0_filter.taps, 33554432);
|
||||
decim_1.configure(decim_1_filter.taps, 131072);
|
||||
|
||||
channel_filter_pass_f = decim_1_filter.pass_frequency_normalized * decim_1_input_fs;
|
||||
channel_filter_stop_f = decim_1_filter.stop_frequency_normalized * decim_1_input_fs;
|
||||
channel_filter_pass_f = decim_1_filter.pass_frequency_normalized * decim_1_input_fs; // 162760.416666667
|
||||
channel_filter_stop_f = decim_1_filter.stop_frequency_normalized * decim_1_input_fs; // 337239.583333333
|
||||
|
||||
spectrum_interval_samples = decim_1_output_fs / spectrum_rate_hz;
|
||||
spectrum_samples = 0;
|
||||
|
@ -87,9 +87,9 @@ void JammerProcessor::execute(const buffer_c8_t& buffer) {
|
||||
};
|
||||
|
||||
void JammerProcessor::on_message(const Message* const msg) {
|
||||
const auto message = *reinterpret_cast<const JammerConfigureMessage*>(msg);
|
||||
|
||||
if (message.id == Message::ID::JammerConfigure) {
|
||||
if (msg->id == Message::ID::JammerConfigure) {
|
||||
const auto message = *reinterpret_cast<const JammerConfigureMessage*>(msg);
|
||||
|
||||
if (message.run) {
|
||||
jammer_channels = (JammerChannel*)shared_memory.bb_data.data;
|
||||
noise_type = message.type;
|
||||
|
124
firmware/baseband/proc_siggen.cpp
Normal file
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2017 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "proc_siggen.hpp"
|
||||
#include "portapack_shared_memory.hpp"
|
||||
#include "sine_table_int8.hpp"
|
||||
#include "event_m4.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
void SigGenProcessor::execute(const buffer_c8_t& buffer) {
|
||||
if (!configured) return;
|
||||
|
||||
for (size_t i = 0; i < buffer.count; i++) {
|
||||
|
||||
if (!sample_count && auto_off) {
|
||||
message.done = true;
|
||||
shared_memory.application_queue.push(message);
|
||||
} else
|
||||
sample_count--;
|
||||
|
||||
if (tone_shape == 0) {
|
||||
// CW
|
||||
re = 0;
|
||||
im = 0;
|
||||
} else {
|
||||
|
||||
if (tone_shape == 1) {
|
||||
// Sine
|
||||
sample = (sine_table_i8[(tone_phase & 0xFF000000) >> 24]);
|
||||
} else if (tone_shape == 2) {
|
||||
// Tri
|
||||
int8_t a = (tone_phase & 0xFF000000) >> 24;
|
||||
sample = (a & 0x80) ? ((a << 1) ^ 0xFF) - 0x80 : (a << 1) + 0x80;
|
||||
} else if (tone_shape == 3) {
|
||||
// Saw up
|
||||
sample = ((tone_phase & 0xFF000000) >> 24);
|
||||
} else if (tone_shape == 4) {
|
||||
// Saw down
|
||||
sample = ((tone_phase & 0xFF000000) >> 24) ^ 0xFF;
|
||||
} else if (tone_shape == 5) {
|
||||
// Square
|
||||
sample = (((tone_phase & 0xFF000000) >> 24) & 0x80) ? 127 : -128;
|
||||
} else if (tone_shape == 6) {
|
||||
// Noise
|
||||
sample = (lfsr & 0xFF000000) >> 24;
|
||||
feedback = ((lfsr >> 31) ^ (lfsr >> 29) ^ (lfsr >> 15) ^ (lfsr >> 11)) & 1;
|
||||
lfsr = (lfsr << 1) | feedback;
|
||||
if (!lfsr) lfsr = 0x1337; // Shouldn't do this :(
|
||||
}
|
||||
|
||||
tone_phase += tone_delta;
|
||||
|
||||
// Do FM
|
||||
delta = sample * fm_delta;
|
||||
|
||||
phase += delta;
|
||||
sphase = phase + (64 << 24);
|
||||
|
||||
re = (sine_table_i8[(sphase & 0xFF000000) >> 24]);
|
||||
im = (sine_table_i8[(phase & 0xFF000000) >> 24]);
|
||||
}
|
||||
|
||||
buffer.p[i] = {re, im};
|
||||
}
|
||||
};
|
||||
|
||||
void SigGenProcessor::on_message(const Message* const msg) {
|
||||
const auto message = *reinterpret_cast<const SigGenConfigMessage*>(msg);
|
||||
|
||||
switch(msg->id) {
|
||||
case Message::ID::SigGenConfig:
|
||||
if (!message.bw) {
|
||||
configured = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.duration) {
|
||||
sample_count = message.duration;
|
||||
auto_off = true;
|
||||
} else
|
||||
auto_off = false;
|
||||
|
||||
fm_delta = message.bw * (0xFFFFFFULL / 1536000);
|
||||
tone_shape = message.shape;
|
||||
|
||||
lfsr = 0x54DF0119;
|
||||
|
||||
configured = true;
|
||||
break;
|
||||
|
||||
case Message::ID::SigGenTone:
|
||||
tone_delta = reinterpret_cast<const SigGenToneMessage*>(msg)->tone_delta;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
EventDispatcher event_dispatcher { std::make_unique<SigGenProcessor>() };
|
||||
event_dispatcher.run();
|
||||
return 0;
|
||||
}
|
52
firmware/baseband/proc_siggen.hpp
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Jared Boone, ShareBrained Technology, Inc.
|
||||
* Copyright (C) 2017 Furrtek
|
||||
*
|
||||
* This file is part of PortaPack.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PROC_SIGGEN_H__
|
||||
#define __PROC_SIGGEN_H__
|
||||
|
||||
#include "baseband_processor.hpp"
|
||||
#include "baseband_thread.hpp"
|
||||
#include "portapack_shared_memory.hpp"
|
||||
|
||||
class SigGenProcessor : public BasebandProcessor {
|
||||
public:
|
||||
void execute(const buffer_c8_t& buffer) override;
|
||||
|
||||
void on_message(const Message* const msg) override;
|
||||
|
||||
private:
|
||||
bool configured { false };
|
||||
|
||||
BasebandThread baseband_thread { 1536000, this, NORMALPRIO + 20, baseband::Direction::Transmit };
|
||||
|
||||
uint32_t tone_delta { 0 }, fm_delta { };
|
||||
uint32_t lfsr { }, feedback { }, tone_shape { };
|
||||
uint32_t sample_count { 0 };
|
||||
bool auto_off { };
|
||||
uint32_t tone_phase { 0 }, phase { 0 }, delta { 0 }, sphase { 0 };
|
||||
int8_t sample { 0 };
|
||||
int8_t re { 0 }, im { 0 };
|
||||
|
||||
TXDoneMessage message { };
|
||||
};
|
||||
|
||||
#endif
|
@ -87,6 +87,8 @@ public:
|
||||
WidebandSpectrumConfig = 42,
|
||||
FSKConfigure = 43,
|
||||
SSTVConfigure = 44,
|
||||
SigGenConfig = 43,
|
||||
SigGenTone = 44,
|
||||
|
||||
POCSAGPacket = 50,
|
||||
|
||||
@ -683,6 +685,36 @@ public:
|
||||
const bool ctcss_enabled;
|
||||
};
|
||||
|
||||
class SigGenConfigMessage : public Message {
|
||||
public:
|
||||
constexpr SigGenConfigMessage(
|
||||
const uint32_t bw,
|
||||
const uint32_t shape,
|
||||
const uint32_t duration
|
||||
) : Message { ID::SigGenConfig },
|
||||
bw(bw),
|
||||
shape(shape),
|
||||
duration(duration)
|
||||
{
|
||||
}
|
||||
|
||||
const uint32_t bw;
|
||||
const uint32_t shape;
|
||||
const uint32_t duration;
|
||||
};
|
||||
|
||||
class SigGenToneMessage : public Message {
|
||||
public:
|
||||
constexpr SigGenToneMessage(
|
||||
const uint32_t tone_delta
|
||||
) : Message { ID::SigGenTone },
|
||||
tone_delta(tone_delta)
|
||||
{
|
||||
}
|
||||
|
||||
const uint32_t tone_delta;
|
||||
};
|
||||
|
||||
class AFSKConfigureMessage : public Message {
|
||||
public:
|
||||
constexpr AFSKConfigureMessage(
|
||||
|
@ -84,6 +84,7 @@ 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_siggen { 'P', 'S', 'I', 'G' };
|
||||
|
||||
constexpr image_tag_t image_tag_noop { 'P', 'N', 'O', 'P' };
|
||||
|
||||
|
@ -948,10 +948,14 @@ bool ImageButton::on_touch(const TouchEvent event) {
|
||||
/* ImageOptionsField *****************************************************/
|
||||
|
||||
ImageOptionsField::ImageOptionsField(
|
||||
Rect parent_rect,
|
||||
options_t options
|
||||
const Rect parent_rect,
|
||||
const Color foreground,
|
||||
const Color background,
|
||||
const options_t options
|
||||
) : Widget { parent_rect },
|
||||
options { options }
|
||||
options { options },
|
||||
foreground_ { foreground },
|
||||
background_ { background }
|
||||
{
|
||||
set_focusable(true);
|
||||
}
|
||||
@ -994,14 +998,20 @@ void ImageOptionsField::set_options(options_t new_options) {
|
||||
}
|
||||
|
||||
void ImageOptionsField::paint(Painter& painter) {
|
||||
const auto paint_style = has_focus() ? style().invert() : style();
|
||||
|
||||
if( selected_index() < options.size() ) {
|
||||
const auto bmp_ptr = options[selected_index()].first;
|
||||
painter.fill_rectangle({screen_rect().location(), {screen_rect().size().width() + 4, screen_rect().size().height() + 4}}, ui::Color::black());
|
||||
painter.draw_rectangle({screen_rect().location(), {screen_rect().size().width() + 4, screen_rect().size().height() + 4}}, paint_style.background);
|
||||
portapack::display.drawBMP({screen_pos().x() + 2, screen_pos().y() + 1}, bmp_ptr, true);
|
||||
}
|
||||
const bool selected = (has_focus() || highlighted());
|
||||
const auto paint_style = selected ? style().invert() : style();
|
||||
|
||||
painter.draw_rectangle(
|
||||
{ screen_rect().location(), { screen_rect().size().width() + 4, screen_rect().size().height() + 4 } },
|
||||
paint_style.background
|
||||
);
|
||||
|
||||
painter.draw_bitmap(
|
||||
{screen_pos().x() + 2, screen_pos().y() + 2},
|
||||
*options[selected_index_].first,
|
||||
foreground_,
|
||||
background_
|
||||
);
|
||||
}
|
||||
|
||||
void ImageOptionsField::on_focus() {
|
||||
|
@ -406,18 +406,22 @@ public:
|
||||
|
||||
class ImageOptionsField : public Widget {
|
||||
public:
|
||||
using image_t = const unsigned char *;
|
||||
using value_t = int32_t;
|
||||
using option_t = std::pair<image_t, value_t>;
|
||||
using option_t = std::pair<const Bitmap*, value_t>;
|
||||
using options_t = std::vector<option_t>;
|
||||
|
||||
std::function<void(size_t, value_t)> on_change { };
|
||||
std::function<void(void)> on_show_options { };
|
||||
|
||||
ImageOptionsField(Rect parent_rect, options_t options);
|
||||
ImageOptionsField(
|
||||
const Rect parent_rect,
|
||||
const Color foreground,
|
||||
const Color background,
|
||||
const options_t options
|
||||
);
|
||||
|
||||
ImageOptionsField(
|
||||
) : ImageOptionsField { { }, { } }
|
||||
) : ImageOptionsField { { }, Color::white(), Color::black(), { } }
|
||||
{
|
||||
}
|
||||
|
||||
@ -438,6 +442,8 @@ public:
|
||||
private:
|
||||
options_t options;
|
||||
size_t selected_index_ { 0 };
|
||||
Color foreground_;
|
||||
Color background_;
|
||||
};
|
||||
|
||||
class OptionsField : public Widget {
|
||||
|
Before Width: | Height: | Size: 522 B |
BIN
firmware/graphics/bulb_ignore.png
Normal file
After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 478 B |
BIN
firmware/graphics/bulb_off.png
Normal file
After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 510 B |
BIN
firmware/graphics/bulb_on.png
Normal file
After Width: | Height: | Size: 206 B |
BIN
firmware/graphics/sig_cw.png
Normal file
After Width: | Height: | Size: 107 B |
BIN
firmware/graphics/sig_noise.png
Normal file
After Width: | Height: | Size: 194 B |
BIN
firmware/graphics/sig_saw_down.png
Normal file
After Width: | Height: | Size: 205 B |
BIN
firmware/graphics/sig_saw_up.png
Normal file
After Width: | Height: | Size: 197 B |
BIN
firmware/graphics/sig_sine.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
firmware/graphics/sig_square.png
Normal file
After Width: | Height: | Size: 125 B |
BIN
firmware/graphics/sig_tri.png
Normal file
After Width: | Height: | Size: 164 B |