Skip to content

Commit

Permalink
multi_vfo: prevent crash when switching from MODE_OFF
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisslav2011 committed Aug 2, 2023
1 parent 1b986a3 commit 284c115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/receivers/nbrx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ bool nbrx::stop()
void nbrx::set_filter(int low, int high, int tw)
{
receiver_base_cf::set_filter(low, high, tw);
filter->set_param(double(low), double(high), double(tw));
if(get_demod()!=Modulations::MODE_OFF)
filter->set_param(double(low), double(high), double(tw));
}

void nbrx::set_cw_offset(int offset)
Expand Down
3 changes: 2 additions & 1 deletion src/receivers/wfmrx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ bool wfmrx::stop()
void wfmrx::set_filter(int low, int high, int tw)
{
receiver_base_cf::set_filter(low, high, tw);
filter->set_param(double(low), double(high), double(tw));
if(get_demod()!=Modulations::MODE_OFF)
filter->set_param(double(low), double(high), double(tw));
}

void wfmrx::set_demod(Modulations::idx demod)
Expand Down

0 comments on commit 284c115

Please sign in to comment.