mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-17 17:35:18 +00:00
"CW generator" and "Whistle" merged in "Signal generator"
Added wave shape selection and tone frequency auto-update Converted color icons to B&W
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user