Skip to content

Commit

Permalink
Fix switching between direct sampling and subghz.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 10, 2023
1 parent 549f83a commit b61cbf6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions view_settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,14 @@ void process_input_settings(ProtoViewApp *app, InputEvent input) {
} else if (input.type == InputTypeLong && input.key == InputKeyDown) {
/* Long pressing to down switches between normal and debug
* direct sampling mode. */

/* We have to stop the previous sampling system. */
radio_rx_end(app);

/* Then switch mode and start the new one. */
app->txrx->debug_direct_sampling = !app->txrx->debug_direct_sampling;
radio_begin(app);
radio_rx(app);
} else if (input.type == InputTypePress &&
(input.key != InputKeyDown || input.key != InputKeyUp))
{
Expand Down

0 comments on commit b61cbf6

Please sign in to comment.