2021-03-31 17:52:26 +00:00
|
|
|
#include "subghz_i.h"
|
|
|
|
|
2021-06-29 21:19:20 +00:00
|
|
|
const uint32_t subghz_frequencies[] = {
|
|
|
|
/* 300 - 348 */
|
|
|
|
300000000,
|
|
|
|
315000000,
|
|
|
|
348000000,
|
|
|
|
/* 387 - 464 */
|
|
|
|
387000000,
|
|
|
|
433075000, /* LPD433 first */
|
|
|
|
433920000, /* LPD433 mid */
|
|
|
|
434775000, /* LPD433 last channels */
|
|
|
|
438900000,
|
|
|
|
464000000,
|
|
|
|
/* 779 - 928 */
|
|
|
|
779000000,
|
|
|
|
868350000,
|
|
|
|
915000000,
|
|
|
|
925000000,
|
|
|
|
928000000,
|
2021-05-25 10:19:07 +00:00
|
|
|
};
|
|
|
|
|
2021-06-29 21:19:20 +00:00
|
|
|
const uint32_t subghz_frequencies_count = sizeof(subghz_frequencies) / sizeof(uint32_t);
|
2021-05-25 10:19:07 +00:00
|
|
|
const uint32_t subghz_frequencies_433_92 = 5;
|
2021-03-31 17:52:26 +00:00
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
bool subghz_custom_event_callback(void* context, uint32_t event) {
|
2021-03-31 17:52:26 +00:00
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
return scene_manager_handle_custom_event(subghz->scene_manager, event);
|
|
|
|
}
|
2021-03-31 17:52:26 +00:00
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
bool subghz_back_event_callback(void* context) {
|
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
|
|
|
return scene_manager_handle_back_event(subghz->scene_manager);
|
2021-03-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
void subghz_tick_event_callback(void* context) {
|
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
|
|
|
scene_manager_handle_tick_event(subghz->scene_manager);
|
2021-03-31 17:52:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SubGhz* subghz_alloc() {
|
|
|
|
SubGhz* subghz = furi_alloc(sizeof(SubGhz));
|
|
|
|
|
|
|
|
// GUI
|
|
|
|
subghz->gui = furi_record_open("gui");
|
|
|
|
|
|
|
|
// View Dispatcher
|
|
|
|
subghz->view_dispatcher = view_dispatcher_alloc();
|
2021-05-25 10:19:07 +00:00
|
|
|
view_dispatcher_enable_queue(subghz->view_dispatcher);
|
2021-03-31 17:52:26 +00:00
|
|
|
view_dispatcher_attach_to_gui(
|
|
|
|
subghz->view_dispatcher, subghz->gui, ViewDispatcherTypeFullscreen);
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
subghz->scene_manager = scene_manager_alloc(&subghz_scene_handlers, subghz);
|
|
|
|
view_dispatcher_set_event_callback_context(subghz->view_dispatcher, subghz);
|
|
|
|
view_dispatcher_set_custom_event_callback(
|
|
|
|
subghz->view_dispatcher, subghz_custom_event_callback);
|
|
|
|
view_dispatcher_set_navigation_event_callback(
|
|
|
|
subghz->view_dispatcher, subghz_back_event_callback);
|
|
|
|
view_dispatcher_set_tick_event_callback(
|
|
|
|
subghz->view_dispatcher, subghz_tick_event_callback, 100);
|
|
|
|
|
|
|
|
// SubMenu
|
2021-03-31 17:52:26 +00:00
|
|
|
subghz->submenu = submenu_alloc();
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewMenu, submenu_get_view(subghz->submenu));
|
|
|
|
|
|
|
|
// Analyze
|
|
|
|
subghz->subghz_analyze = subghz_analyze_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
|
|
|
SubGhzViewAnalyze,
|
|
|
|
subghz_analyze_get_view(subghz->subghz_analyze));
|
|
|
|
|
|
|
|
// Receiver
|
|
|
|
subghz->subghz_receiver = subghz_receiver_alloc();
|
2021-06-29 21:19:20 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
SubGhzViewReceiver,
|
|
|
|
subghz_receiver_get_view(subghz->subghz_receiver));
|
2021-06-29 21:19:20 +00:00
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
// Dialog
|
|
|
|
subghz->dialog_ex = dialog_ex_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewDialogEx, dialog_ex_get_view(subghz->dialog_ex));
|
|
|
|
|
|
|
|
// Popup
|
|
|
|
subghz->popup = popup_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewPopup, popup_get_view(subghz->popup));
|
|
|
|
|
|
|
|
// Text Input
|
|
|
|
subghz->text_input = text_input_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewTextInput, text_input_get_view(subghz->text_input));
|
|
|
|
|
|
|
|
// Transmitter
|
|
|
|
subghz->subghz_transmitter = subghz_transmitter_alloc();
|
2021-03-31 17:52:26 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
SubGhzViewTransmitter,
|
|
|
|
subghz_transmitter_get_view(subghz->subghz_transmitter));
|
|
|
|
|
|
|
|
// Carrier Test Module
|
|
|
|
subghz->subghz_test_carrier = subghz_test_carrier_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
|
|
|
SubGhzViewTestCarrier,
|
|
|
|
subghz_test_carrier_get_view(subghz->subghz_test_carrier));
|
2021-03-31 17:52:26 +00:00
|
|
|
|
|
|
|
// Packet Test
|
|
|
|
subghz->subghz_test_packet = subghz_test_packet_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
|
|
|
SubGhzViewTestPacket,
|
|
|
|
subghz_test_packet_get_view(subghz->subghz_test_packet));
|
|
|
|
|
2021-04-15 08:47:52 +00:00
|
|
|
// Static send
|
|
|
|
subghz->subghz_static = subghz_static_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewStatic, subghz_static_get_view(subghz->subghz_static));
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
//init Worker & Protocol
|
|
|
|
subghz->worker = subghz_worker_alloc();
|
|
|
|
subghz->protocol = subghz_protocol_alloc();
|
|
|
|
subghz_worker_set_overrun_callback(
|
|
|
|
subghz->worker, (SubGhzWorkerOverrunCallback)subghz_protocol_reset);
|
|
|
|
subghz_worker_set_pair_callback(
|
|
|
|
subghz->worker, (SubGhzWorkerPairCallback)subghz_protocol_parse);
|
|
|
|
subghz_worker_set_context(subghz->worker, subghz->protocol);
|
|
|
|
|
|
|
|
subghz_protocol_load_keeloq_file(subghz->protocol, "/ext/assets/subghz/keeloq_mfcodes");
|
|
|
|
subghz_protocol_load_nice_flor_s_file(subghz->protocol, "/ext/assets/subghz/nice_floor_s_rx");
|
|
|
|
|
|
|
|
//subghz_protocol_enable_dump_text(subghz->protocol, subghz_text_callback, subghz);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
|
|
|
return subghz;
|
|
|
|
}
|
|
|
|
|
|
|
|
void subghz_free(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
|
2021-06-16 06:14:59 +00:00
|
|
|
// Packet Test
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewTestPacket);
|
|
|
|
subghz_test_packet_free(subghz->subghz_test_packet);
|
|
|
|
|
|
|
|
// Carrier Test
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewTestCarrier);
|
|
|
|
subghz_test_carrier_free(subghz->subghz_test_carrier);
|
|
|
|
|
|
|
|
// Static
|
2021-06-16 06:14:59 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewStatic);
|
|
|
|
subghz_static_free(subghz->subghz_static);
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
// Analyze
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewAnalyze);
|
|
|
|
subghz_analyze_free(subghz->subghz_analyze);
|
|
|
|
|
|
|
|
// Receiver
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewReceiver);
|
|
|
|
subghz_receiver_free(subghz->subghz_receiver);
|
|
|
|
|
|
|
|
// TextInput
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewTextInput);
|
|
|
|
text_input_free(subghz->text_input);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
// Receiver
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewTransmitter);
|
|
|
|
subghz_transmitter_free(subghz->subghz_transmitter);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
|
|
|
// Submenu
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewMenu);
|
|
|
|
submenu_free(subghz->submenu);
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
// DialogEx
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewDialogEx);
|
|
|
|
dialog_ex_free(subghz->dialog_ex);
|
|
|
|
|
|
|
|
// Popup
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewPopup);
|
|
|
|
popup_free(subghz->popup);
|
|
|
|
|
|
|
|
// Scene manager
|
|
|
|
scene_manager_free(subghz->scene_manager);
|
2021-06-29 21:19:20 +00:00
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
// View Dispatcher
|
|
|
|
view_dispatcher_free(subghz->view_dispatcher);
|
|
|
|
|
|
|
|
// GUI
|
|
|
|
furi_record_close("gui");
|
|
|
|
subghz->gui = NULL;
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
//Worker & Protocol
|
|
|
|
subghz_protocol_free(subghz->protocol);
|
|
|
|
subghz_worker_free(subghz->worker);
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
// The rest
|
|
|
|
free(subghz);
|
|
|
|
}
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
int32_t subghz_app(void* p) {
|
2021-03-31 17:52:26 +00:00
|
|
|
SubGhz* subghz = subghz_alloc();
|
|
|
|
|
[FL-1610] SubGhz: scene based application, PT save and replay (#630)
* SubGhz: scene based application
* SubGhz: encoder/decoder separation, DMA streaming, update app and cli.
* SubGhz: 2 stage async tx complete, minor cleanup
* SubGhz: 2 stage async tx complete, FIX state pin end transmit
* SubGhz: Pricenton, receive TE signal
* SubGhz: Pricenton, add save data, add load data
* SubGhz: Add Read scene, Fix pricenton save, load funtion
* SubGhz: Add Read, Receiver, SaveName scene
* SubGhz: Read and Save (pricenton)
* SubGhz: add Load scence
* SubGhz: Fix select file scene, add load scene, add transmitter view, add send tx pricenton
* SubGhz: Fix pricenton encoder, fix transmitter send
* SubGhz: modified Pricenton Encoder (added guard time at the beginning), modified CC1101 config, code refactoring
* SubGhz: Fix pricenton encoder defalut TE
* Archive: Fix path and name SubGhz
* Archive: Fix name app SubGhz
* GubGhz: Came: add Save, Load key
* GubGhz: GateTX: add Save, Load key
* GubGhz: NeroSketch: add Save, Load key
* Github: better linters triggers
* SubGhz: adding fast loading keys Archive -> Run in app
* GubGhz: KeeLog: add Save, Load key, key generation from the serial number of the meter and the button
* SubGhz: format sources and fix compilation
* FuriHal: add subghz configuration description for AGC section
* SubGhz: save only protocols that can be saved. Cleanup.
* Github: lint on pull requests
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-12 14:42:56 +00:00
|
|
|
// Check argument and run corresponding scene
|
|
|
|
if(p && subghz_key_load(subghz, p)) {
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneTransmitter);
|
|
|
|
} else {
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneStart);
|
|
|
|
}
|
|
|
|
|
2021-05-25 10:19:07 +00:00
|
|
|
view_dispatcher_run(subghz->view_dispatcher);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
|
|
|
subghz_free(subghz);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|