Merge branch 'DarkFlippers:dev' into 420

This commit is contained in:
RogueMaster
2022-10-26 20:51:46 -04:00
committed by GitHub
6 changed files with 19 additions and 43 deletions

View File

@@ -191,8 +191,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
// Load last used values for Read, Read RAW, etc. or default
if(!alloc_for_tx_only) {
subghz->last_settings = subghz_last_settings_alloc();
subghz_last_settings_load(
subghz->last_settings, subghz_setting_get_preset_count(subghz->setting));
subghz_last_settings_load(subghz->last_settings, 0);
#if FURI_DEBUG
#ifdef SUBGHZ_SAVE_DETECT_RAW_SETTING
FURI_LOG_D(
@@ -217,12 +216,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
subghz->txrx->preset = malloc(sizeof(SubGhzRadioPreset));
subghz->txrx->preset->name = furi_string_alloc();
if(!alloc_for_tx_only) {
subghz_preset_init(
subghz,
subghz_setting_get_preset_name(subghz->setting, subghz->last_settings->preset),
subghz->last_settings->frequency,
NULL,
0);
subghz_preset_init(subghz, "AM650", subghz->last_settings->frequency, NULL, 0);
} else {
subghz_preset_init(
subghz, "AM650", subghz_setting_get_default_frequency(subghz->setting), NULL, 0);