Update subghz GPS dir finder & thread logic

also a few other finishing touches
This commit is contained in:
Sil333033
2023-10-08 21:20:42 +02:00
parent f7f3780aef
commit 88b98fb175
7 changed files with 99 additions and 64 deletions

View File

@@ -245,6 +245,9 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
subghz->error_str = furi_string_alloc();
subghz->gps = subghz_gps_init();
if(subghz->last_settings->gps_enabled) {
subghz_gps_start(subghz->gps);
}
return subghz;
}
@@ -317,8 +320,6 @@ void subghz_free(SubGhz* subghz, bool alloc_for_tx_only) {
furi_record_close(RECORD_GUI);
subghz->gui = NULL;
subghz_last_settings_free(subghz->last_settings);
// threshold rssi
subghz_threshold_rssi_free(subghz->threshold_rssi);
@@ -342,8 +343,14 @@ void subghz_free(SubGhz* subghz, bool alloc_for_tx_only) {
furi_string_free(subghz->file_path);
furi_string_free(subghz->file_path_tmp);
// GPS
if(subghz->last_settings->gps_enabled) {
subghz_gps_stop(subghz->gps);
}
subghz_gps_deinit(subghz->gps);
subghz_last_settings_free(subghz->last_settings);
// The rest
free(subghz);
}