Skip to content

Instantly share code, notes, and snippets.

@UndeRus
Created January 22, 2023 10:47
Show Gist options
  • Save UndeRus/448ed62ee722dda8f418bfc3cca86442 to your computer and use it in GitHub Desktop.
Save UndeRus/448ed62ee722dda8f418bfc3cca86442 to your computer and use it in GitHub Desktop.
diff --git a/applications/main/subghz/subghz.c b/applications/main/subghz/subghz.c
index b7564ab5..49651158 100644
--- a/applications/main/subghz/subghz.c
+++ b/applications/main/subghz/subghz.c
@@ -308,11 +308,13 @@ void subghz_free(SubGhz* subghz) {
int32_t subghz_app(void* p) {
SubGhz* subghz = subghz_alloc();
+ /*
if(!furi_hal_region_is_provisioned()) {
subghz_dialog_message_show_only_rx(subghz);
subghz_free(subghz);
return 1;
}
+ */
//Load database
bool load_database = subghz_environment_load_keystore(
diff --git a/firmware/targets/f7/furi_hal/furi_hal_region.c b/firmware/targets/f7/furi_hal/furi_hal_region.c
index 143d5c18..00ae930b 100644
--- a/firmware/targets/f7/furi_hal/furi_hal_region.c
+++ b/firmware/targets/f7/furi_hal/furi_hal_region.c
@@ -73,7 +73,8 @@ const FuriHalRegion furi_hal_region_jp = {
static const FuriHalRegion* furi_hal_region = NULL;
void furi_hal_region_init() {
- FuriHalVersionRegion region = furi_hal_version_get_hw_region();
+ furi_hal_region = &furi_hal_region_zero;
+ /*
if(region == FuriHalVersionRegionUnknown) {
furi_hal_region = &furi_hal_region_zero;
@@ -84,14 +85,18 @@ void furi_hal_region_init() {
} else if(region == FuriHalVersionRegionJp) {
furi_hal_region = &furi_hal_region_jp;
}
+ */
}
const FuriHalRegion* furi_hal_region_get() {
- return furi_hal_region;
+ return &furi_hal_region_zero;
}
void furi_hal_region_set(FuriHalRegion* region) {
- furi_hal_region = region;
+ if(region != NULL) {
+
+ }
+ furi_hal_region = &furi_hal_region_zero;
}
bool furi_hal_region_is_provisioned() {
@@ -107,6 +112,10 @@ const char* furi_hal_region_get_name() {
}
bool furi_hal_region_is_frequency_allowed(uint32_t frequency) {
+ if(frequency == 0) {
+
+ }
+ /*
if(!furi_hal_region) {
return false;
}
@@ -115,6 +124,7 @@ bool furi_hal_region_is_frequency_allowed(uint32_t frequency) {
if(!band) {
return false;
}
+ */
return true;
}
diff --git a/firmware/targets/f7/furi_hal/furi_hal_version.c b/firmware/targets/f7/furi_hal/furi_hal_version.c
index b7827ac7..1f13fbb9 100644
--- a/firmware/targets/f7/furi_hal/furi_hal_version.c
+++ b/firmware/targets/f7/furi_hal/furi_hal_version.c
@@ -247,7 +247,7 @@ uint8_t furi_hal_version_get_hw_connect() {
}
FuriHalVersionRegion furi_hal_version_get_hw_region() {
- return furi_hal_version.board_region;
+ return FuriHalVersionRegionUnknown;
}
const char* furi_hal_version_get_hw_region_name() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment