|
@@ -105,9 +105,11 @@ static bool subghz_tx(SubGhz* subghz, uint32_t frequency) {
|
|
|
furi_hal_subghz_set_frequency_and_path(frequency);
|
|
furi_hal_subghz_set_frequency_and_path(frequency);
|
|
|
furi_hal_gpio_write(&gpio_cc1101_g0, false);
|
|
furi_hal_gpio_write(&gpio_cc1101_g0, false);
|
|
|
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
|
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
|
|
- subghz_speaker_on(subghz);
|
|
|
|
|
bool ret = furi_hal_subghz_tx();
|
|
bool ret = furi_hal_subghz_tx();
|
|
|
- subghz->txrx->txrx_state = SubGhzTxRxStateTx;
|
|
|
|
|
|
|
+ if(ret) {
|
|
|
|
|
+ subghz_speaker_on(subghz);
|
|
|
|
|
+ subghz->txrx->txrx_state = SubGhzTxRxStateTx;
|
|
|
|
|
+ }
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -115,6 +117,7 @@ void subghz_idle(SubGhz* subghz) {
|
|
|
furi_assert(subghz);
|
|
furi_assert(subghz);
|
|
|
furi_assert(subghz->txrx->txrx_state != SubGhzTxRxStateSleep);
|
|
furi_assert(subghz->txrx->txrx_state != SubGhzTxRxStateSleep);
|
|
|
furi_hal_subghz_idle();
|
|
furi_hal_subghz_idle();
|
|
|
|
|
+ subghz_speaker_off(subghz);
|
|
|
subghz->txrx->txrx_state = SubGhzTxRxStateIDLE;
|
|
subghz->txrx->txrx_state = SubGhzTxRxStateIDLE;
|
|
|
}
|
|
}
|
|
|
|
|
|