mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
force only default mods
This commit is contained in:
@@ -199,8 +199,8 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
|
||||
// Load last used values for Read, Read RAW, etc. or default
|
||||
subghz->last_settings = subghz_last_settings_alloc();
|
||||
size_t preset_count = subghz_setting_get_preset_count(setting);
|
||||
subghz_last_settings_load(subghz->last_settings, preset_count);
|
||||
//size_t preset_count = subghz_setting_get_preset_count(setting);
|
||||
subghz_last_settings_load(subghz->last_settings, 0);
|
||||
|
||||
// Set LED and Amp GPIO control state
|
||||
furi_hal_subghz_set_ext_leds_and_amp(subghz->last_settings->leds_and_amp);
|
||||
|
||||
@@ -31,6 +31,7 @@ void subghz_last_settings_free(SubGhzLastSettings* instance) {
|
||||
}
|
||||
|
||||
void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count) {
|
||||
UNUSED(preset_count);
|
||||
furi_assert(instance);
|
||||
|
||||
// Default values (all others set to 0, if read from file fails these are used)
|
||||
@@ -148,7 +149,7 @@ void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count
|
||||
instance->frequency = SUBGHZ_LAST_SETTING_DEFAULT_FREQUENCY;
|
||||
}
|
||||
|
||||
if(instance->preset_index > (uint32_t)preset_count - 1) {
|
||||
if(instance->preset_index > 3) {
|
||||
instance->preset_index = SUBGHZ_LAST_SETTING_DEFAULT_PRESET;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user