mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Update subghz GPS dir finder & thread logic
also a few other finishing touches
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user