mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGHz: Manual region bypass (#47)
* Subghz: brought back manual region bypass * MNTM: change frequency check this allows to add "extended" frequencies to your custom added frequencies * MNTM: reboot when changing extended frequencies * Fix regio typo * Show bypass before extend * Consistency with OFW and UL api for region, version, otp * Fix API symbols * Restrict only on TX * Oops * Improve bypass/extend UI --------- Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
@@ -6,14 +6,17 @@
|
||||
|
||||
void subghz_extended_freq() {
|
||||
bool is_extended_i = false;
|
||||
bool is_bypassed = false;
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FlipperFormat* file = flipper_format_file_alloc(storage);
|
||||
|
||||
if(flipper_format_file_open_existing(file, "/ext/subghz/assets/extend_range.txt")) {
|
||||
flipper_format_read_bool(file, "use_ext_range_at_own_risk", &is_extended_i, 1);
|
||||
flipper_format_read_bool(file, "ignore_default_tx_region", &is_bypassed, 1);
|
||||
}
|
||||
|
||||
furi_hal_subghz_set_extended_frequency(is_extended_i);
|
||||
furi_hal_subghz_set_bypass_region(is_bypassed);
|
||||
|
||||
flipper_format_free(file);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
|
||||
Reference in New Issue
Block a user