External radio driver in frequency analyzer & test carrier (#5)

* SubGhz App: add support ext_cc1101 in freq analyzer
* SubGhz App: add support ext_cc1101 in test_carrier
* SubGhz app: Deleted the temporary menu
This commit is contained in:
gid9798
2023-07-06 16:50:25 +03:00
committed by GitHub
parent b1850fd700
commit dd2cad0c20
12 changed files with 206 additions and 220 deletions

View File

@@ -112,6 +112,8 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
// Open Notification record
subghz->notifications = furi_record_open(RECORD_NOTIFICATION);
subghz->txrx = subghz_txrx_alloc();
if(!alloc_for_tx_only) {
// SubMenu
subghz->submenu = submenu_alloc();
@@ -167,7 +169,8 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
variable_item_list_get_view(subghz->variable_item_list));
// Frequency Analyzer
subghz->subghz_frequency_analyzer = subghz_frequency_analyzer_alloc();
// View knows too much
subghz->subghz_frequency_analyzer = subghz_frequency_analyzer_alloc(subghz->txrx);
view_dispatcher_add_view(
subghz->view_dispatcher,
SubGhzViewIdFrequencyAnalyzer,
@@ -209,8 +212,6 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
//init TxRx & Protocol & History & KeyBoard
subghz_unlock(subghz);
subghz->txrx = subghz_txrx_alloc();
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
subghz_load_custom_presets(setting);