Fixed encoders TX locking up, more icons

This commit is contained in:
furrtek 2017-01-08 21:52:54 +00:00
parent 1898a37c42
commit be3d477352
10 changed files with 193 additions and 101 deletions

View File

@ -29,98 +29,6 @@ namespace ui {
// Use firmware/tools/make_bitmap.py ! // Use firmware/tools/make_bitmap.py !
static constexpr uint8_t bitmap_icon_audiotx_data[] = {
0x00, 0x70,
0x00, 0x7F,
0xC0, 0x4F,
0xC0, 0x60,
0x40, 0x5E,
0xC0, 0x41,
0x40, 0x40,
0x40, 0x40,
0x40, 0x40,
0x40, 0x70,
0x70, 0x7C,
0x7C, 0x7E,
0x7E, 0x3E,
0x3E, 0x1C,
0x1C, 0x00,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_audiotx {
{ 16, 16 }, bitmap_icon_audiotx_data
};
static constexpr uint8_t bitmap_icon_capture_data[] = {
0xEF, 0x29,
0xEF, 0x69,
0xEF, 0xE9,
0xEF, 0xE9,
0xEF, 0xEF,
0x1F, 0xF0,
0xFF, 0xFF,
0xFF, 0xFF,
0x03, 0xC0,
0xFB, 0xDF,
0x0B, 0xD9,
0xFB, 0xDF,
0x4B, 0xDE,
0xFB, 0xDF,
0x03, 0xC0,
0xFE, 0x7F,
};
static constexpr Bitmap bitmap_icon_capture {
{ 16, 16 }, bitmap_icon_capture_data
};
static constexpr uint8_t bitmap_icon_codetx_data[] = {
0x00, 0x00,
0xF0, 0x07,
0x0C, 0x18,
0x03, 0x60,
0xE0, 0x83,
0x18, 0x0C,
0x04, 0x10,
0xC0, 0x01,
0x20, 0x02,
0x00, 0x00,
0x00, 0x00,
0xBB, 0x6D,
0x2A, 0x49,
0x2A, 0x49,
0x3A, 0x49,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_codetx {
{ 16, 16 }, bitmap_icon_codetx_data
};
static constexpr uint8_t bitmap_icon_receiver_data[] = {
0xC0, 0x07,
0x30, 0x18,
0x10, 0x10,
0x88, 0x23,
0x48, 0x24,
0x40, 0x24,
0x80, 0x10,
0x80, 0x10,
0xC0, 0x08,
0xE0, 0x08,
0x60, 0x04,
0x08, 0x04,
0x08, 0x02,
0x10, 0x01,
0xE0, 0x00,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_receiver {
{ 16, 16 }, bitmap_icon_receiver_data
};
static constexpr uint8_t bitmap_icon_adsb_data[] = { static constexpr uint8_t bitmap_icon_adsb_data[] = {
0x80, 0x01, 0x80, 0x01,
0xC0, 0x03, 0xC0, 0x03,
@ -144,6 +52,52 @@ static constexpr Bitmap bitmap_icon_adsb {
{ 16, 16 }, bitmap_icon_adsb_data { 16, 16 }, bitmap_icon_adsb_data
}; };
static constexpr uint8_t bitmap_icon_ais_data[] = {
0x00, 0x01,
0x80, 0x01,
0xC0, 0x0D,
0xC0, 0x3D,
0xE0, 0x3D,
0xF0, 0x7D,
0xF8, 0x7D,
0xF8, 0x7D,
0xFC, 0x7D,
0xFE, 0x7D,
0x00, 0x00,
0xF8, 0x3F,
0xF8, 0x1F,
0xFB, 0xCF,
0x00, 0x00,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_ais {
{ 16, 16 }, bitmap_icon_ais_data
};
static constexpr uint8_t bitmap_icon_audiotx_data[] = {
0x00, 0x70,
0x00, 0x7F,
0xC0, 0x4F,
0xC0, 0x60,
0x40, 0x5E,
0xC0, 0x41,
0x40, 0x40,
0x40, 0x40,
0x40, 0x40,
0x40, 0x70,
0x70, 0x7C,
0x7C, 0x7E,
0x7E, 0x3E,
0x3E, 0x1C,
0x1C, 0x00,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_audiotx {
{ 16, 16 }, bitmap_icon_audiotx_data
};
static constexpr uint8_t bitmap_icon_bht_data[] = { static constexpr uint8_t bitmap_icon_bht_data[] = {
0x00, 0x00, 0x00, 0x00,
0xE0, 0x07, 0xE0, 0x07,
@ -167,6 +121,29 @@ static constexpr Bitmap bitmap_icon_bht {
{ 16, 16 }, bitmap_icon_bht_data { 16, 16 }, bitmap_icon_bht_data
}; };
static constexpr uint8_t bitmap_icon_capture_data[] = {
0xEF, 0x29,
0xEF, 0x69,
0xEF, 0xE9,
0xEF, 0xE9,
0xEF, 0xEF,
0x1F, 0xF0,
0xFF, 0xFF,
0xFF, 0xFF,
0x03, 0xC0,
0xFB, 0xDF,
0x0B, 0xD9,
0xFB, 0xDF,
0x4B, 0xDE,
0xFB, 0xDF,
0x03, 0xC0,
0xFE, 0x7F,
};
static constexpr Bitmap bitmap_icon_capture {
{ 16, 16 }, bitmap_icon_capture_data
};
static constexpr uint8_t bitmap_icon_closecall_data[] = { static constexpr uint8_t bitmap_icon_closecall_data[] = {
0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x10,
@ -190,6 +167,52 @@ static constexpr Bitmap bitmap_icon_closecall {
{ 16, 16 }, bitmap_icon_closecall_data { 16, 16 }, bitmap_icon_closecall_data
}; };
static constexpr uint8_t bitmap_icon_codetx_data[] = {
0x00, 0x00,
0xF0, 0x07,
0x0C, 0x18,
0x03, 0x60,
0xE0, 0x83,
0x18, 0x0C,
0x04, 0x10,
0xC0, 0x01,
0x20, 0x02,
0x00, 0x00,
0x00, 0x00,
0xBB, 0x6D,
0x2A, 0x49,
0x2A, 0x49,
0x3A, 0x49,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_codetx {
{ 16, 16 }, bitmap_icon_codetx_data
};
static constexpr uint8_t bitmap_icon_ert_data[] = {
0x00, 0x00,
0x00, 0x00,
0x77, 0x77,
0x55, 0x41,
0x75, 0x77,
0x55, 0x44,
0x55, 0x44,
0x77, 0x77,
0x00, 0x00,
0x20, 0x04,
0x02, 0x26,
0x04, 0x12,
0x00, 0x03,
0x80, 0x01,
0xC3, 0x61,
0x80, 0x00,
};
static constexpr Bitmap bitmap_icon_ert {
{ 16, 16 }, bitmap_icon_ert_data
};
static constexpr uint8_t bitmap_icon_foxhunt_data[] = { static constexpr uint8_t bitmap_icon_foxhunt_data[] = {
0x18, 0x18, 0x18, 0x18,
0x28, 0x14, 0x28, 0x14,
@ -328,6 +351,29 @@ static constexpr Bitmap bitmap_icon_morse {
{ 16, 16 }, bitmap_icon_morse_data { 16, 16 }, bitmap_icon_morse_data
}; };
static constexpr uint8_t bitmap_icon_nordic_data[] = {
0x00, 0x00,
0x18, 0x18,
0x26, 0x6C,
0xC1, 0x8E,
0x07, 0x8F,
0x1F, 0x8C,
0x3F, 0x80,
0xFF, 0x80,
0xFF, 0x83,
0xFF, 0x87,
0xEF, 0x9F,
0x8F, 0xFF,
0x4F, 0xFF,
0x2E, 0x7C,
0x18, 0x18,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_nordic {
{ 16, 16 }, bitmap_icon_nordic_data
};
static constexpr uint8_t bitmap_icon_numbers_data[] = { static constexpr uint8_t bitmap_icon_numbers_data[] = {
0x00, 0x00, 0x00, 0x00,
0x68, 0x1B, 0x68, 0x1B,
@ -420,6 +466,29 @@ static constexpr Bitmap bitmap_icon_rds {
{ 16, 16 }, bitmap_icon_rds_data { 16, 16 }, bitmap_icon_rds_data
}; };
static constexpr uint8_t bitmap_icon_receiver_data[] = {
0xC0, 0x07,
0x30, 0x18,
0x10, 0x10,
0x88, 0x23,
0x48, 0x24,
0x40, 0x24,
0x80, 0x10,
0x80, 0x10,
0xC0, 0x08,
0xE0, 0x08,
0x60, 0x04,
0x08, 0x04,
0x08, 0x02,
0x10, 0x01,
0xE0, 0x00,
0x00, 0x00,
};
static constexpr Bitmap bitmap_icon_receiver {
{ 16, 16 }, bitmap_icon_receiver_data
};
static constexpr uint8_t bitmap_icon_remote_data[] = { static constexpr uint8_t bitmap_icon_remote_data[] = {
0x20, 0x00, 0x20, 0x00,
0x20, 0x00, 0x20, 0x00,
@ -466,6 +535,29 @@ static constexpr Bitmap bitmap_icon_soundboard {
{ 16, 16 }, bitmap_icon_soundboard_data { 16, 16 }, bitmap_icon_soundboard_data
}; };
static constexpr uint8_t bitmap_icon_tpms_data[] = {
0xE0, 0x07,
0xF8, 0x1A,
0x78, 0x10,
0x3C, 0x20,
0x34, 0x27,
0x9A, 0x4C,
0x96, 0x6C,
0xBA, 0x4C,
0x96, 0x6C,
0xB2, 0x4C,
0x92, 0x4E,
0x24, 0x27,
0x24, 0x20,
0x48, 0x10,
0xD8, 0x1A,
0xE0, 0x07,
};
static constexpr Bitmap bitmap_icon_tpms {
{ 16, 16 }, bitmap_icon_tpms_data
};
static constexpr uint8_t bitmap_icon_whistle_data[] = { static constexpr uint8_t bitmap_icon_whistle_data[] = {
0x00, 0x00, 0x00, 0x00,
0x60, 0x00, 0x60, 0x00,

View File

@ -118,10 +118,10 @@ void EncodersView::update_progress() {
} }
} }
void EncodersView::on_txdone(int n) { void EncodersView::on_txdone(int n, const bool txdone) {
//char str[16]; //char str[16];
if (n > 0) { if (!txdone) {
// Repeating... // Repeating...
repeat_index = n + 1; repeat_index = n + 1;
/*if (tx_mode == SCAN) { /*if (tx_mode == SCAN) {

View File

@ -68,7 +68,7 @@ private:
void generate_frame(); void generate_frame();
void update_progress(); void update_progress();
void start_tx(const bool scan); void start_tx(const bool scan);
void on_txdone(int n); void on_txdone(int n, const bool txdone);
const Style style_val { const Style style_val {
.font = font::fixed_8x16, .font = font::fixed_8x16,
@ -189,7 +189,7 @@ private:
Message::ID::TXDone, Message::ID::TXDone,
[this](const Message* const p) { [this](const Message* const p) {
const auto message = *reinterpret_cast<const TXDoneMessage*>(p); const auto message = *reinterpret_cast<const TXDoneMessage*>(p);
this->on_txdone(message.progress); this->on_txdone(message.progress, message.done);
} }
}; };
}; };

View File

@ -265,9 +265,9 @@ void NavigationView::focus() {
TranspondersMenuView::TranspondersMenuView(NavigationView& nav) { TranspondersMenuView::TranspondersMenuView(NavigationView& nav) {
add_items<4>({ { add_items<4>({ {
{ "ADS-B: Planes", ui::Color::grey(), &bitmap_icon_adsb, [&nav](){ nav.push<NotImplementedView>(); }, }, { "ADS-B: Planes", ui::Color::grey(), &bitmap_icon_adsb, [&nav](){ nav.push<NotImplementedView>(); }, },
{ "AIS: Boats", ui::Color::white(), nullptr, [&nav](){ nav.push<AISAppView>(); } }, { "AIS: Boats", ui::Color::white(), &bitmap_icon_ais, [&nav](){ nav.push<AISAppView>(); } },
{ "ERT: Utility Meters", ui::Color::white(), nullptr, [&nav](){ nav.push<ERTAppView>(); } }, { "ERT: Utility Meters", ui::Color::white(), &bitmap_icon_ert, [&nav](){ nav.push<ERTAppView>(); } },
{ "TPMS: Cars", ui::Color::white(), nullptr, [&nav](){ nav.push<TPMSAppView>(); } }, { "TPMS: Cars", ui::Color::white(), &bitmap_icon_tpms, [&nav](){ nav.push<TPMSAppView>(); } },
} }); } });
on_left = [&nav](){ nav.pop(); }; on_left = [&nav](){ nav.pop(); };
} }
@ -279,9 +279,9 @@ ReceiverMenuView::ReceiverMenuView(NavigationView& nav) {
// { "AFSK", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } }, // AFSKRXView // { "AFSK", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } }, // AFSKRXView
{ "Audio", ui::Color::green(), nullptr, [&nav](){ nav.push<AnalogAudioView>(); } }, { "Audio", ui::Color::green(), nullptr, [&nav](){ nav.push<AnalogAudioView>(); } },
{ "CCIR", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } }, { "CCIR", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } },
{ "Nordic/BTLE", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } }, { "Nordic/BTLE", ui::Color::grey(), &bitmap_icon_nordic_data, [&nav](){ nav.push<NotImplementedView>(); } },
{ "POCSAG 1200", ui::Color::cyan(), nullptr, [&nav](){ nav.push<POCSAGAppView>(); } }, { "POCSAG 1200", ui::Color::cyan(), nullptr, [&nav](){ nav.push<POCSAGAppView>(); } },
{ "SIGFOX", ui::Color::grey(), nullptr, [&nav](){ nav.push<NotImplementedView>(); } }, // SIGFRXView { "SIGFOX", ui::Color::grey(), &bitmap_icon_foxhunt, [&nav](){ nav.push<NotImplementedView>(); } }, // SIGFRXView
{ "Transponders", ui::Color::green(), nullptr, [&nav](){ nav.push<TranspondersMenuView>(); } }, { "Transponders", ui::Color::green(), nullptr, [&nav](){ nav.push<TranspondersMenuView>(); } },
} }); } });
on_left = [&nav](){ nav.pop(); }; on_left = [&nav](){ nav.pop(); };

Binary file not shown.

BIN
graphics/PP_AIS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 143 B

BIN
graphics/PP_ERT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

BIN
graphics/PP_NORDIC.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

BIN
graphics/PP_TPMS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B