From f7c128cb5861b4b35bbe3c1355d359015d482740 Mon Sep 17 00:00:00 2001 From: Mik13 Date: Tue, 2 Aug 2022 16:39:20 +0200 Subject: [PATCH] Add GFSK to SubGHZ --- applications/subghz/subghz_i.c | 2 ++ applications/subghz/subghz_setting.c | 5 +++++ lib/subghz/blocks/generic.c | 2 ++ 3 files changed, 9 insertions(+) diff --git a/applications/subghz/subghz_i.c b/applications/subghz/subghz_i.c index 2367891295e..f41d5e25b0a 100644 --- a/applications/subghz/subghz_i.c +++ b/applications/subghz/subghz_i.c @@ -41,6 +41,8 @@ bool subghz_set_preset(SubGhz* subghz, const char* preset) { string_set(subghz->txrx->preset->name, "FM238"); } else if(!strcmp(preset, "FuriHalSubGhzPreset2FSKDev476Async")) { string_set(subghz->txrx->preset->name, "FM476"); + } else if(!strcmp(preset, "FuriHalSubGhzPresetGFSK9_99KbAsync")) { + string_set(subghz->txrx->preset->name, "GFSK9"); } else if(!strcmp(preset, "FuriHalSubGhzPresetCustom")) { string_set(subghz->txrx->preset->name, "CUSTOM"); } else { diff --git a/applications/subghz/subghz_setting.c b/applications/subghz/subghz_setting.c index 7fb9c40d235..997d16e5556 100644 --- a/applications/subghz/subghz_setting.c +++ b/applications/subghz/subghz_setting.c @@ -175,6 +175,11 @@ static void subghz_setting_load_default_region( "FM476", (uint8_t*)furi_hal_subghz_preset_2fsk_dev47_6khz_async_regs, furi_hal_subghz_preset_2fsk_async_patable); + subghz_setting_load_default_preset( + instance, + "GFSK9", + (uint8_t*)furi_hal_subghz_preset_gfsk_9_99kb_async_regs, + furi_hal_subghz_preset_gfsk_async_patable); } // Region check removed diff --git a/lib/subghz/blocks/generic.c b/lib/subghz/blocks/generic.c index 353ff18bfae..0a91ad64bb0 100644 --- a/lib/subghz/blocks/generic.c +++ b/lib/subghz/blocks/generic.c @@ -14,6 +14,8 @@ void subghz_block_generic_get_preset_name(const char* preset_name, string_t pres preset_name_temp = "FuriHalSubGhzPreset2FSKDev238Async"; } else if(!strcmp(preset_name, "FM476")) { preset_name_temp = "FuriHalSubGhzPreset2FSKDev476Async"; + } else if(!strcmp(preset_name, "GFSK9")) { + preset_name_temp = "FuriHalSubGhzPresetGFSK9_99KbAsync"; } else { preset_name_temp = "FuriHalSubGhzPresetCustom"; }