Remove unused ReceiverView() receiver_model arg.

This commit is contained in:
Jared Boone 2016-01-24 22:12:16 -08:00
parent db2f78f0f8
commit e04e72abe7
3 changed files with 5 additions and 9 deletions

View File

@ -92,7 +92,7 @@ void NavigationView::focus() {
SystemMenuView::SystemMenuView(NavigationView& nav) {
add_items<7>({ {
{ "Receiver", [&nav](){ nav.push<ReceiverView>(portapack::receiver_model); } },
{ "Receiver", [&nav](){ nav.push<ReceiverView>(); } },
{ "Capture", [&nav](){ nav.push<NotImplementedView>(); } },
{ "Analyze", [&nav](){ nav.push<NotImplementedView>(); } },
{ "Setup", [&nav](){ nav.push<SetupMenuView>(); } },

View File

@ -363,10 +363,8 @@ void LNAGainField::on_focus() {
/* ReceiverView **********************************************************/
ReceiverView::ReceiverView(
NavigationView& nav,
ReceiverModel& receiver_model
) : receiver_model(receiver_model)
{
NavigationView& nav
) {
add_children({ {
&rssi,
&channel,
@ -394,7 +392,7 @@ ReceiverView::ReceiverView(
};
field_frequency.on_edit = [this, &nav]() {
// TODO: Provide separate modal method/scheme?
auto new_view = nav.push<FrequencyKeypadView>(this->receiver_model.tuning_frequency());
auto new_view = nav.push<FrequencyKeypadView>(receiver_model.tuning_frequency());
new_view->on_changed = [this](rf::Frequency f) {
this->on_tuning_frequency_changed(f);
this->field_frequency.set_value(f);

View File

@ -354,7 +354,7 @@ constexpr Style style_options_group {
class ReceiverView : public View {
public:
ReceiverView(NavigationView& nav, ReceiverModel& receiver_model);
ReceiverView(NavigationView& nav);
~ReceiverView();
void on_show() override;
@ -363,8 +363,6 @@ public:
void focus() override;
private:
ReceiverModel& receiver_model;
RSSI rssi {
{ 19 * 8, 0, 11 * 8, 4 },
};