Skip to content

Commit

Permalink
Fix direct sampling after subghz worker deletion.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 23, 2023
1 parent 63ea908 commit d1c86b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions view_direct_sampling.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ void view_enter_direct_sampling(ProtoViewApp *app) {
!app->txrx->debug_timer_sampling)
{
furi_hal_subghz_stop_async_rx();

// To read data asynchronously directly from the view, we need
// to put the CC1101 back into reception mode (the previous call
// to stop the async RX will put it into idle) and configure the
// G0 pin for reading.
furi_hal_subghz_rx();
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
} else {
raw_sampling_worker_stop(app);
}
Expand Down

0 comments on commit d1c86b3

Please sign in to comment.