mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-05 21:24:27 -04:00
ERT: Add gain controls.
This commit is contained in:
parent
aaa0e389b9
commit
00f542e96b
2 changed files with 21 additions and 1 deletions
|
@ -124,6 +124,9 @@ ERTAppView::ERTAppView(NavigationView&) {
|
||||||
baseband::run_image(portapack::spi_flash::image_tag_ert);
|
baseband::run_image(portapack::spi_flash::image_tag_ert);
|
||||||
|
|
||||||
add_children({ {
|
add_children({ {
|
||||||
|
&field_rf_amp,
|
||||||
|
&field_lna,
|
||||||
|
&field_vga,
|
||||||
&recent_entries_view,
|
&recent_entries_view,
|
||||||
} });
|
} });
|
||||||
|
|
||||||
|
@ -154,7 +157,7 @@ void ERTAppView::focus() {
|
||||||
|
|
||||||
void ERTAppView::set_parent_rect(const Rect new_parent_rect) {
|
void ERTAppView::set_parent_rect(const Rect new_parent_rect) {
|
||||||
View::set_parent_rect(new_parent_rect);
|
View::set_parent_rect(new_parent_rect);
|
||||||
recent_entries_view.set_parent_rect({ 0, 0, new_parent_rect.width(), new_parent_rect.height() });
|
recent_entries_view.set_parent_rect({ 0, header_height, new_parent_rect.width(), new_parent_rect.height() - header_height });
|
||||||
}
|
}
|
||||||
|
|
||||||
void ERTAppView::on_packet(const ert::Packet& packet) {
|
void ERTAppView::on_packet(const ert::Packet& packet) {
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#define __ERT_APP_H__
|
#define __ERT_APP_H__
|
||||||
|
|
||||||
#include "ui_navigation.hpp"
|
#include "ui_navigation.hpp"
|
||||||
|
#include "ui_receiver.hpp"
|
||||||
|
#include "ui_rssi.hpp"
|
||||||
|
#include "ui_channel.hpp"
|
||||||
|
|
||||||
#include "event_m0.hpp"
|
#include "event_m0.hpp"
|
||||||
|
|
||||||
|
@ -128,6 +131,20 @@ private:
|
||||||
|
|
||||||
ERTRecentEntriesView recent_entries_view { recent };
|
ERTRecentEntriesView recent_entries_view { recent };
|
||||||
|
|
||||||
|
static constexpr auto header_height = 1 * 16;
|
||||||
|
|
||||||
|
RFAmpField field_rf_amp {
|
||||||
|
{ 13 * 8, 0 * 16 }
|
||||||
|
};
|
||||||
|
|
||||||
|
LNAGainField field_lna {
|
||||||
|
{ 15 * 8, 0 * 16 }
|
||||||
|
};
|
||||||
|
|
||||||
|
VGAGainField field_vga {
|
||||||
|
{ 18 * 8, 0 * 16 }
|
||||||
|
};
|
||||||
|
|
||||||
MessageHandlerRegistration message_handler_packet {
|
MessageHandlerRegistration message_handler_packet {
|
||||||
Message::ID::ERTPacket,
|
Message::ID::ERTPacket,
|
||||||
[this](Message* const p) {
|
[this](Message* const p) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue