mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 02:48:35 -07:00
SubGhz: add some consts and fix unit tests
This commit is contained in:
@@ -61,8 +61,7 @@ void subghz_cli_command_tx_carrier(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
frequency = furi_hal_subghz_set_frequency_and_path(frequency);
|
||||
|
||||
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
||||
@@ -106,8 +105,7 @@ void subghz_cli_command_rx_carrier(Cli* cli, FuriString* args, void* context) {
|
||||
}
|
||||
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
frequency = furi_hal_subghz_set_frequency_and_path(frequency);
|
||||
printf("Receiving at frequency %lu Hz\r\n", frequency);
|
||||
printf("Press CTRL+C to stop\r\n");
|
||||
@@ -403,8 +401,7 @@ void subghz_cli_command_rx_raw(Cli* cli, FuriString* args, void* context) {
|
||||
|
||||
// Configure radio
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
frequency = furi_hal_subghz_set_frequency_and_path(frequency);
|
||||
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
|
||||
|
||||
|
||||
@@ -141,8 +141,7 @@ void subghz_test_carrier_enter(void* context) {
|
||||
SubGhzTestCarrier* subghz_test_carrier = context;
|
||||
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
|
||||
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeInput, GpioPullNo, GpioSpeedLow);
|
||||
|
||||
|
||||
@@ -195,8 +195,7 @@ void subghz_test_packet_enter(void* context) {
|
||||
SubGhzTestPacket* instance = context;
|
||||
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
|
||||
with_view_model(
|
||||
instance->view,
|
||||
|
||||
@@ -144,8 +144,7 @@ void subghz_test_static_enter(void* context) {
|
||||
SubGhzTestStatic* instance = context;
|
||||
|
||||
furi_hal_subghz_reset();
|
||||
furi_hal_subghz_load_custom_preset(
|
||||
(uint8_t*)subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
furi_hal_subghz_load_custom_preset(subghz_device_cc1101_preset_ook_650khz_async_regs);
|
||||
|
||||
furi_hal_gpio_init(&gpio_cc1101_g0, GpioModeOutputPushPull, GpioPullNo, GpioSpeedLow);
|
||||
furi_hal_gpio_write(&gpio_cc1101_g0, false);
|
||||
|
||||
Reference in New Issue
Block a user