2021-12-22 20:04:08 +00:00
|
|
|
/* Abandon hope, all ye who enter here. */
|
2021-12-22 13:01:20 +00:00
|
|
|
|
2022-06-01 13:07:53 +00:00
|
|
|
#include "m-string.h"
|
|
|
|
#include "subghz/types.h"
|
2021-03-31 17:52:26 +00:00
|
|
|
#include "subghz_i.h"
|
2021-11-11 12:49:19 +00:00
|
|
|
#include <lib/toolbox/path.h>
|
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
|
|
|
}
|
|
|
|
|
2022-08-02 12:54:12 +00:00
|
|
|
static void subghz_rpc_command_callback(RpcAppSystemEvent event, void* context) {
|
2022-07-04 13:09:46 +00:00
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
|
|
|
|
2022-08-02 12:54:12 +00:00
|
|
|
furi_assert(subghz->rpc_ctx);
|
2022-07-04 13:09:46 +00:00
|
|
|
|
|
|
|
if(event == RpcAppEventSessionClose) {
|
2022-08-02 12:54:12 +00:00
|
|
|
view_dispatcher_send_custom_event(
|
|
|
|
subghz->view_dispatcher, SubGhzCustomEventSceneRpcSessionClose);
|
2022-08-12 02:18:27 +00:00
|
|
|
rpc_system_app_set_callback(subghz->rpc_ctx, NULL, NULL);
|
|
|
|
subghz->rpc_ctx = NULL;
|
2022-07-04 13:09:46 +00:00
|
|
|
} else if(event == RpcAppEventAppExit) {
|
|
|
|
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneExit);
|
|
|
|
} else if(event == RpcAppEventLoadFile) {
|
2022-08-02 12:54:12 +00:00
|
|
|
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneRpcLoad);
|
2022-07-04 13:09:46 +00:00
|
|
|
} else if(event == RpcAppEventButtonPress) {
|
2022-08-02 12:54:12 +00:00
|
|
|
view_dispatcher_send_custom_event(
|
|
|
|
subghz->view_dispatcher, SubGhzCustomEventSceneRpcButtonPress);
|
2022-07-04 13:09:46 +00:00
|
|
|
} else if(event == RpcAppEventButtonRelease) {
|
2022-08-02 12:54:12 +00:00
|
|
|
view_dispatcher_send_custom_event(
|
|
|
|
subghz->view_dispatcher, SubGhzCustomEventSceneRpcButtonRelease);
|
|
|
|
} else {
|
|
|
|
rpc_system_app_confirm(subghz->rpc_ctx, event, false);
|
2022-07-04 13:09:46 +00:00
|
|
|
}
|
2022-08-02 12:54:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void subghz_blink_start(SubGhz* instance) {
|
|
|
|
furi_assert(instance);
|
|
|
|
notification_message(instance->notifications, &sequence_blink_start_magenta);
|
|
|
|
}
|
2022-07-04 13:09:46 +00:00
|
|
|
|
2022-08-02 12:54:12 +00:00
|
|
|
void subghz_blink_stop(SubGhz* instance) {
|
|
|
|
furi_assert(instance);
|
|
|
|
notification_message(instance->notifications, &sequence_blink_stop);
|
2022-07-04 13:09:46 +00:00
|
|
|
}
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
SubGhz* subghz_alloc() {
|
2022-02-18 19:53:46 +00:00
|
|
|
SubGhz* subghz = malloc(sizeof(SubGhz));
|
2021-03-31 17:52:26 +00:00
|
|
|
|
2022-06-01 13:07:53 +00:00
|
|
|
string_init(subghz->file_path);
|
|
|
|
string_init(subghz->file_path_tmp);
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
// GUI
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->gui = furi_record_open(RECORD_GUI);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
2022-08-30 20:14:43 +00:00
|
|
|
subghz->in_decoder_scene = false;
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
// 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
|
|
|
|
[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);
|
|
|
|
|
SubGhz: read and save static remotes. Create new static and dynamic remotes. (#646)
* SubGhz: the functions of saving loading KeeLog have been modified, saving KeeLog is prohibited
* SubGhz: Fix displaying Nice FlorS in the Raed scene
* SubGhz: Fix displaying Faac SLH in the Raed scene
* SubGhz: Fix displaying iDo in the Raed scene
* SubGhz: Fix displaying Star Line in the Raed scene
* SubGhz: Fix displaying Nice Flo in the Raed scene, added save and load functions. (testing needed, no remote control)
* SubGhz: subghz_beginadded common encoder upload signal
* SubGhz: add Came encoder
* SubGhz: modified pricenton encoder, fix view transmitter hide the "Send" button if there is no encoder
* SubGhz: add nice flo encoder, need testing no remote control
* SubGhz: add gate_tx encoder
* SubGhz: add nero_sketch encoder
* SubGhz: add keelog encoder
* SubGhz: add long upload upload while the button is pressed while releasing the transfer is over, with a check for sticking (maximum 200 upload repetitions)
* SubGhz: fix max upload
* SubGhz: Fix structure subghz add encoder
* SubGhz: add generating and sending a dynamic keelog key, refactoring the code
* SubGhz: add notifications
* SubGhz: add creating a new remote control (Pricenton, Nice Flo 12bit, Nice Flo 24bit, CAME 12bit, CAME 24bit, Gate TX, DoorHan)
* SubGhz: Fix load file, fix scene start
* Subghz: Fix show key
* SubGhz: Fix subghz_cli
* SubGhz: Fix furi-hal-subghz
* Format sources
* SubGhz: standard notification scheme, fix broken assert in DMA.
* SubGhz: move level alignment logic to furi-hal-subghz, fix spelling, cleanup.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-16 19:56:23 +00:00
|
|
|
// Open Notification record
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->notifications = furi_record_open(RECORD_NOTIFICATION);
|
SubGhz: read and save static remotes. Create new static and dynamic remotes. (#646)
* SubGhz: the functions of saving loading KeeLog have been modified, saving KeeLog is prohibited
* SubGhz: Fix displaying Nice FlorS in the Raed scene
* SubGhz: Fix displaying Faac SLH in the Raed scene
* SubGhz: Fix displaying iDo in the Raed scene
* SubGhz: Fix displaying Star Line in the Raed scene
* SubGhz: Fix displaying Nice Flo in the Raed scene, added save and load functions. (testing needed, no remote control)
* SubGhz: subghz_beginadded common encoder upload signal
* SubGhz: add Came encoder
* SubGhz: modified pricenton encoder, fix view transmitter hide the "Send" button if there is no encoder
* SubGhz: add nice flo encoder, need testing no remote control
* SubGhz: add gate_tx encoder
* SubGhz: add nero_sketch encoder
* SubGhz: add keelog encoder
* SubGhz: add long upload upload while the button is pressed while releasing the transfer is over, with a check for sticking (maximum 200 upload repetitions)
* SubGhz: fix max upload
* SubGhz: Fix structure subghz add encoder
* SubGhz: add generating and sending a dynamic keelog key, refactoring the code
* SubGhz: add notifications
* SubGhz: add creating a new remote control (Pricenton, Nice Flo 12bit, Nice Flo 24bit, CAME 12bit, CAME 24bit, Gate TX, DoorHan)
* SubGhz: Fix load file, fix scene start
* Subghz: Fix show key
* SubGhz: Fix subghz_cli
* SubGhz: Fix furi-hal-subghz
* Format sources
* SubGhz: standard notification scheme, fix broken assert in DMA.
* SubGhz: move level alignment logic to furi-hal-subghz, fix spelling, cleanup.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-16 19:56:23 +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
|
|
|
// 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(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->view_dispatcher, SubGhzViewIdMenu, submenu_get_view(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
|
|
|
|
|
|
|
// Receiver
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->subghz_receiver = subghz_view_receiver_alloc();
|
2021-06-29 21:19:20 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdReceiver,
|
|
|
|
subghz_view_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
|
|
|
// Popup
|
|
|
|
subghz->popup = popup_alloc();
|
|
|
|
view_dispatcher_add_view(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->view_dispatcher, SubGhzViewIdPopup, popup_get_view(subghz->popup));
|
[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
|
|
|
|
|
|
|
// Text Input
|
|
|
|
subghz->text_input = text_input_alloc();
|
|
|
|
view_dispatcher_add_view(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->view_dispatcher, SubGhzViewIdTextInput, text_input_get_view(subghz->text_input));
|
[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
|
|
|
|
2022-04-20 16:04:19 +00:00
|
|
|
// Byte Input
|
|
|
|
subghz->byte_input = byte_input_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher, SubGhzViewIdByteInput, byte_input_get_view(subghz->byte_input));
|
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
// Custom Widget
|
|
|
|
subghz->widget = widget_alloc();
|
|
|
|
view_dispatcher_add_view(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->view_dispatcher, SubGhzViewIdWidget, widget_get_view(subghz->widget));
|
2021-09-10 00:29:57 +00:00
|
|
|
|
2021-11-11 12:49:19 +00:00
|
|
|
//Dialog
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->dialogs = furi_record_open(RECORD_DIALOGS);
|
2021-11-11 12:49:19 +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
|
|
|
// Transmitter
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->subghz_transmitter = subghz_view_transmitter_alloc();
|
2021-03-31 17:52:26 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdTransmitter,
|
|
|
|
subghz_view_transmitter_get_view(subghz->subghz_transmitter));
|
[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
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
// Variable Item List
|
|
|
|
subghz->variable_item_list = variable_item_list_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdVariableItemList,
|
2021-09-10 00:29:57 +00:00
|
|
|
variable_item_list_get_view(subghz->variable_item_list));
|
|
|
|
|
2021-10-10 14:35:10 +00:00
|
|
|
// Frequency Analyzer
|
|
|
|
subghz->subghz_frequency_analyzer = subghz_frequency_analyzer_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdFrequencyAnalyzer,
|
2021-10-10 14:35:10 +00:00
|
|
|
subghz_frequency_analyzer_get_view(subghz->subghz_frequency_analyzer));
|
|
|
|
|
2021-10-27 17:37:11 +00:00
|
|
|
// Read RAW
|
|
|
|
subghz->subghz_read_raw = subghz_read_raw_alloc();
|
2021-10-25 14:37:14 +00:00
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdReadRAW,
|
2021-10-27 17:37:11 +00:00
|
|
|
subghz_read_raw_get_view(subghz->subghz_read_raw));
|
2021-10-25 14:37:14 +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
|
|
|
// Carrier Test Module
|
|
|
|
subghz->subghz_test_carrier = subghz_test_carrier_alloc();
|
|
|
|
view_dispatcher_add_view(
|
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdTestCarrier,
|
[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_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,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdTestPacket,
|
2021-03-31 17:52:26 +00:00
|
|
|
subghz_test_packet_get_view(subghz->subghz_test_packet));
|
|
|
|
|
2021-04-15 08:47:52 +00:00
|
|
|
// Static send
|
2021-08-29 13:05:15 +00:00
|
|
|
subghz->subghz_test_static = subghz_test_static_alloc();
|
2021-04-15 08:47:52 +00:00
|
|
|
view_dispatcher_add_view(
|
2021-08-29 13:05:15 +00:00
|
|
|
subghz->view_dispatcher,
|
2022-03-03 09:48:56 +00:00
|
|
|
SubGhzViewIdStatic,
|
2021-08-29 13:05:15 +00:00
|
|
|
subghz_test_static_get_view(subghz->subghz_test_static));
|
2021-04-15 08:47:52 +00:00
|
|
|
|
2022-04-14 14:05:40 +00:00
|
|
|
//init setting
|
|
|
|
subghz->setting = subghz_setting_alloc();
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz_setting_load(subghz->setting, EXT_PATH("subghz/assets/setting_user"));
|
2022-04-14 14:05:40 +00:00
|
|
|
|
2022-09-14 13:41:44 +00:00
|
|
|
// Load last used values for Read, Read RAW, etc. or default
|
|
|
|
subghz->last_setting = subghz_last_setting_alloc();
|
|
|
|
subghz_last_setting_load(subghz->last_setting, EXT_PATH("subghz/assets/last_used.txt"));
|
|
|
|
subghz_setting_set_default_frequency(subghz->setting, subghz->last_setting->frequency);
|
|
|
|
|
2022-07-03 16:03:36 +00:00
|
|
|
//init Worker & Protocol & History & KeyBoard
|
|
|
|
subghz->lock = SubGhzLockOff;
|
2022-02-18 19:53:46 +00:00
|
|
|
subghz->txrx = malloc(sizeof(SubGhzTxRx));
|
2022-07-27 12:58:32 +00:00
|
|
|
subghz->txrx->preset = malloc(sizeof(SubGhzPresetDefinition));
|
2022-07-26 14:16:59 +00:00
|
|
|
string_init(subghz->txrx->preset->name);
|
|
|
|
subghz_preset_init(
|
2022-09-14 13:41:44 +00:00
|
|
|
subghz,
|
|
|
|
string_get_cstr(subghz->last_setting->preset_name),
|
|
|
|
subghz->last_setting->frequency,
|
|
|
|
NULL,
|
|
|
|
0);
|
2022-07-26 14:16:59 +00:00
|
|
|
|
2021-09-15 15:24:19 +00:00
|
|
|
subghz->txrx->txrx_state = SubGhzTxRxStateSleep;
|
2022-09-14 13:41:44 +00:00
|
|
|
subghz->txrx->hopper_state = subghz->last_setting->hopping;
|
2021-10-27 17:37:11 +00:00
|
|
|
subghz->txrx->rx_key_state = SubGhzRxKeyStateIDLE;
|
2021-09-10 00:29:57 +00:00
|
|
|
subghz->txrx->history = subghz_history_alloc();
|
|
|
|
subghz->txrx->worker = subghz_worker_alloc();
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->txrx->fff_data = flipper_format_string_alloc();
|
2022-04-20 19:23:45 +00:00
|
|
|
subghz->txrx->secure_data = malloc(sizeof(SecureData));
|
2022-06-01 13:07:53 +00:00
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->txrx->environment = subghz_environment_alloc();
|
|
|
|
subghz_environment_set_came_atomo_rainbow_table_file_name(
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->txrx->environment, EXT_PATH("subghz/assets/came_atomo"));
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz_environment_set_nice_flor_s_rainbow_table_file_name(
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->txrx->environment, EXT_PATH("subghz/assets/nice_flor_s"));
|
2022-03-16 09:18:48 +00:00
|
|
|
subghz->txrx->receiver = subghz_receiver_alloc_init(subghz->txrx->environment);
|
2022-09-14 13:41:44 +00:00
|
|
|
|
|
|
|
// Setup values
|
|
|
|
subghz_last_setting_set_receiver_values(subghz->last_setting, subghz->txrx->receiver);
|
2022-03-03 09:48:56 +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
|
|
|
subghz_worker_set_overrun_callback(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_receiver_reset);
|
[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_worker_set_pair_callback(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->txrx->worker, (SubGhzWorkerPairCallback)subghz_receiver_decode);
|
|
|
|
subghz_worker_set_context(subghz->txrx->worker, subghz->txrx->receiver);
|
[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
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
//Init Error_str
|
|
|
|
string_init(subghz->error_str);
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
return subghz;
|
|
|
|
}
|
|
|
|
|
|
|
|
void subghz_free(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
|
2022-07-04 13:09:46 +00:00
|
|
|
if(subghz->rpc_ctx) {
|
|
|
|
rpc_system_app_set_callback(subghz->rpc_ctx, NULL, NULL);
|
2022-07-25 14:16:45 +00:00
|
|
|
rpc_system_app_send_exited(subghz->rpc_ctx);
|
2022-08-02 12:54:12 +00:00
|
|
|
subghz_blink_stop(subghz);
|
2022-07-04 13:09:46 +00:00
|
|
|
subghz->rpc_ctx = NULL;
|
|
|
|
}
|
|
|
|
|
2021-06-16 06:14:59 +00:00
|
|
|
// Packet Test
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTestPacket);
|
[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_test_packet_free(subghz->subghz_test_packet);
|
|
|
|
|
|
|
|
// Carrier Test
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTestCarrier);
|
[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_test_carrier_free(subghz->subghz_test_carrier);
|
|
|
|
|
|
|
|
// Static
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdStatic);
|
2021-08-29 13:05:15 +00:00
|
|
|
subghz_test_static_free(subghz->subghz_test_static);
|
2021-06-16 06:14:59 +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
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdReceiver);
|
|
|
|
subghz_view_receiver_free(subghz->subghz_receiver);
|
[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
|
|
|
|
|
|
|
// TextInput
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTextInput);
|
[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
|
|
|
text_input_free(subghz->text_input);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
2022-04-20 16:04:19 +00:00
|
|
|
// ByteInput
|
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
|
|
|
byte_input_free(subghz->byte_input);
|
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
// Custom Widget
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdWidget);
|
2021-09-10 00:29:57 +00:00
|
|
|
widget_free(subghz->widget);
|
|
|
|
|
2021-11-11 12:49:19 +00:00
|
|
|
//Dialog
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_DIALOGS);
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
// Transmitter
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTransmitter);
|
|
|
|
subghz_view_transmitter_free(subghz->subghz_transmitter);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
// Variable Item List
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList);
|
2021-09-10 00:29:57 +00:00
|
|
|
variable_item_list_free(subghz->variable_item_list);
|
|
|
|
|
2021-10-10 14:35:10 +00:00
|
|
|
// Frequency Analyzer
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdFrequencyAnalyzer);
|
2021-10-10 14:35:10 +00:00
|
|
|
subghz_frequency_analyzer_free(subghz->subghz_frequency_analyzer);
|
|
|
|
|
2021-10-27 17:37:11 +00:00
|
|
|
// Read RAW
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdReadRAW);
|
2021-10-27 17:37:11 +00:00
|
|
|
subghz_read_raw_free(subghz->subghz_read_raw);
|
2021-10-25 14:37:14 +00:00
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
// Submenu
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdMenu);
|
2021-03-31 17:52:26 +00:00
|
|
|
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
|
|
|
// Popup
|
2022-03-03 09:48:56 +00:00
|
|
|
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdPopup);
|
[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
|
|
|
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
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_GUI);
|
2021-03-31 17:52:26 +00:00
|
|
|
subghz->gui = NULL;
|
|
|
|
|
2022-04-14 14:05:40 +00:00
|
|
|
//setting
|
|
|
|
subghz_setting_free(subghz->setting);
|
|
|
|
|
2022-09-14 13:41:44 +00:00
|
|
|
// Last setting
|
|
|
|
subghz_last_setting_free(subghz->last_setting);
|
|
|
|
|
2021-09-10 00:29:57 +00:00
|
|
|
//Worker & Protocol & History
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz_receiver_free(subghz->txrx->receiver);
|
|
|
|
subghz_environment_free(subghz->txrx->environment);
|
2021-09-10 00:29:57 +00:00
|
|
|
subghz_worker_free(subghz->txrx->worker);
|
2022-03-03 09:48:56 +00:00
|
|
|
flipper_format_free(subghz->txrx->fff_data);
|
2021-09-10 00:29:57 +00:00
|
|
|
subghz_history_free(subghz->txrx->history);
|
2022-07-26 14:16:59 +00:00
|
|
|
string_clear(subghz->txrx->preset->name);
|
|
|
|
free(subghz->txrx->preset);
|
2022-04-20 19:23:45 +00:00
|
|
|
free(subghz->txrx->secure_data);
|
2022-04-20 16:08:25 +00:00
|
|
|
free(subghz->txrx);
|
2021-09-10 00:29:57 +00:00
|
|
|
|
|
|
|
//Error string
|
|
|
|
string_clear(subghz->error_str);
|
[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: read and save static remotes. Create new static and dynamic remotes. (#646)
* SubGhz: the functions of saving loading KeeLog have been modified, saving KeeLog is prohibited
* SubGhz: Fix displaying Nice FlorS in the Raed scene
* SubGhz: Fix displaying Faac SLH in the Raed scene
* SubGhz: Fix displaying iDo in the Raed scene
* SubGhz: Fix displaying Star Line in the Raed scene
* SubGhz: Fix displaying Nice Flo in the Raed scene, added save and load functions. (testing needed, no remote control)
* SubGhz: subghz_beginadded common encoder upload signal
* SubGhz: add Came encoder
* SubGhz: modified pricenton encoder, fix view transmitter hide the "Send" button if there is no encoder
* SubGhz: add nice flo encoder, need testing no remote control
* SubGhz: add gate_tx encoder
* SubGhz: add nero_sketch encoder
* SubGhz: add keelog encoder
* SubGhz: add long upload upload while the button is pressed while releasing the transfer is over, with a check for sticking (maximum 200 upload repetitions)
* SubGhz: fix max upload
* SubGhz: Fix structure subghz add encoder
* SubGhz: add generating and sending a dynamic keelog key, refactoring the code
* SubGhz: add notifications
* SubGhz: add creating a new remote control (Pricenton, Nice Flo 12bit, Nice Flo 24bit, CAME 12bit, CAME 24bit, Gate TX, DoorHan)
* SubGhz: Fix load file, fix scene start
* Subghz: Fix show key
* SubGhz: Fix subghz_cli
* SubGhz: Fix furi-hal-subghz
* Format sources
* SubGhz: standard notification scheme, fix broken assert in DMA.
* SubGhz: move level alignment logic to furi-hal-subghz, fix spelling, cleanup.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-16 19:56:23 +00:00
|
|
|
// Notifications
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_NOTIFICATION);
|
SubGhz: read and save static remotes. Create new static and dynamic remotes. (#646)
* SubGhz: the functions of saving loading KeeLog have been modified, saving KeeLog is prohibited
* SubGhz: Fix displaying Nice FlorS in the Raed scene
* SubGhz: Fix displaying Faac SLH in the Raed scene
* SubGhz: Fix displaying iDo in the Raed scene
* SubGhz: Fix displaying Star Line in the Raed scene
* SubGhz: Fix displaying Nice Flo in the Raed scene, added save and load functions. (testing needed, no remote control)
* SubGhz: subghz_beginadded common encoder upload signal
* SubGhz: add Came encoder
* SubGhz: modified pricenton encoder, fix view transmitter hide the "Send" button if there is no encoder
* SubGhz: add nice flo encoder, need testing no remote control
* SubGhz: add gate_tx encoder
* SubGhz: add nero_sketch encoder
* SubGhz: add keelog encoder
* SubGhz: add long upload upload while the button is pressed while releasing the transfer is over, with a check for sticking (maximum 200 upload repetitions)
* SubGhz: fix max upload
* SubGhz: Fix structure subghz add encoder
* SubGhz: add generating and sending a dynamic keelog key, refactoring the code
* SubGhz: add notifications
* SubGhz: add creating a new remote control (Pricenton, Nice Flo 12bit, Nice Flo 24bit, CAME 12bit, CAME 24bit, Gate TX, DoorHan)
* SubGhz: Fix load file, fix scene start
* Subghz: Fix show key
* SubGhz: Fix subghz_cli
* SubGhz: Fix furi-hal-subghz
* Format sources
* SubGhz: standard notification scheme, fix broken assert in DMA.
* SubGhz: move level alignment logic to furi-hal-subghz, fix spelling, cleanup.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-16 19:56:23 +00:00
|
|
|
subghz->notifications = NULL;
|
|
|
|
|
2022-06-01 13:07:53 +00:00
|
|
|
// Path strings
|
|
|
|
string_clear(subghz->file_path);
|
|
|
|
string_clear(subghz->file_path_tmp);
|
2022-04-07 11:47:47 +00:00
|
|
|
|
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();
|
|
|
|
|
2021-12-22 13:01:20 +00:00
|
|
|
//Load database
|
2022-03-03 09:48:56 +00:00
|
|
|
bool load_database = subghz_environment_load_keystore(
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->txrx->environment, EXT_PATH("subghz/assets/keeloq_mfcodes"));
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz_environment_load_keystore(
|
2022-07-26 12:21:51 +00:00
|
|
|
subghz->txrx->environment, EXT_PATH("subghz/assets/keeloq_mfcodes_user"));
|
[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
|
2022-08-04 02:02:23 +00:00
|
|
|
if(p && strlen(p)) {
|
2022-07-04 13:09:46 +00:00
|
|
|
uint32_t rpc_ctx = 0;
|
|
|
|
if(sscanf(p, "RPC %lX", &rpc_ctx) == 1) {
|
|
|
|
subghz->rpc_ctx = (void*)rpc_ctx;
|
|
|
|
rpc_system_app_set_callback(subghz->rpc_ctx, subghz_rpc_command_callback, subghz);
|
2022-07-25 14:16:45 +00:00
|
|
|
rpc_system_app_send_started(subghz->rpc_ctx);
|
|
|
|
view_dispatcher_attach_to_gui(
|
|
|
|
subghz->view_dispatcher, subghz->gui, ViewDispatcherTypeDesktop);
|
2022-07-04 13:09:46 +00:00
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneRpc);
|
2022-07-25 14:16:45 +00:00
|
|
|
} else {
|
|
|
|
view_dispatcher_attach_to_gui(
|
|
|
|
subghz->view_dispatcher, subghz->gui, ViewDispatcherTypeFullscreen);
|
|
|
|
if(subghz_key_load(subghz, p, true)) {
|
|
|
|
string_set_str(subghz->file_path, p);
|
|
|
|
|
|
|
|
if((!strcmp(subghz->txrx->decoder_result->protocol->name, "RAW"))) {
|
|
|
|
//Load Raw TX
|
|
|
|
subghz->txrx->rx_key_state = SubGhzRxKeyStateRAWLoad;
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReadRAW);
|
|
|
|
} else {
|
|
|
|
//Load transmitter TX
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneTransmitter);
|
|
|
|
}
|
2022-04-01 11:10:21 +00:00
|
|
|
} else {
|
2022-07-25 14:16:45 +00:00
|
|
|
//exit app
|
|
|
|
scene_manager_stop(subghz->scene_manager);
|
|
|
|
view_dispatcher_stop(subghz->view_dispatcher);
|
2022-04-01 11:10:21 +00:00
|
|
|
}
|
2021-12-22 13:01: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
|
|
|
} else {
|
2022-07-25 14:16:45 +00:00
|
|
|
view_dispatcher_attach_to_gui(
|
|
|
|
subghz->view_dispatcher, subghz->gui, ViewDispatcherTypeFullscreen);
|
2022-06-01 13:07:53 +00:00
|
|
|
string_set_str(subghz->file_path, SUBGHZ_APP_FOLDER);
|
2021-12-22 13:01:20 +00:00
|
|
|
if(load_database) {
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneStart);
|
|
|
|
} else {
|
|
|
|
scene_manager_set_scene_state(
|
2022-03-03 09:48:56 +00:00
|
|
|
subghz->scene_manager, SubGhzSceneShowError, SubGhzCustomEventManagerSet);
|
2022-06-01 13:07:53 +00:00
|
|
|
string_set_str(
|
2021-12-22 13:01:20 +00:00
|
|
|
subghz->error_str,
|
|
|
|
"No SD card or\ndatabase found.\nSome app function\nmay be reduced.");
|
|
|
|
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
|
|
|
}
|
[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
|
|
|
}
|
|
|
|
|
2021-10-04 07:01:41 +00:00
|
|
|
furi_hal_power_suppress_charge_enter();
|
|
|
|
|
2021-05-25 10:19:07 +00:00
|
|
|
view_dispatcher_run(subghz->view_dispatcher);
|
2021-03-31 17:52:26 +00:00
|
|
|
|
2021-10-04 07:01:41 +00:00
|
|
|
furi_hal_power_suppress_charge_exit();
|
|
|
|
|
2021-03-31 17:52:26 +00:00
|
|
|
subghz_free(subghz);
|
|
|
|
|
|
|
|
return 0;
|
2022-05-27 19:18:41 +00:00
|
|
|
}
|