[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
|
|
|
#include "subghz_i.h"
|
|
|
|
|
2022-05-27 11:19:21 +00:00
|
|
|
#include "assets_icons.h"
|
|
|
|
#include "subghz/types.h"
|
[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
|
|
|
#include <furi.h>
|
2022-01-05 16:10:18 +00:00
|
|
|
#include <furi_hal.h>
|
[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
|
|
|
#include <input/input.h>
|
|
|
|
#include <gui/elements.h>
|
2022-09-14 16:11:38 +00:00
|
|
|
#include <notification/notification.h>
|
2022-01-05 16:10:18 +00:00
|
|
|
#include <notification/notification_messages.h>
|
2022-02-18 19:53:46 +00:00
|
|
|
#include <flipper_format/flipper_format.h>
|
[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-03-03 09:48:56 +00:00
|
|
|
#include <flipper_format/flipper_format_i.h>
|
|
|
|
#include <lib/toolbox/stream/stream.h>
|
|
|
|
#include <lib/subghz/protocols/raw.h>
|
|
|
|
|
|
|
|
#define TAG "SubGhz"
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_set_default_preset(SubGhz* subghz) {
|
2021-11-11 12:49:19 +00:00
|
|
|
furi_assert(subghz);
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz_txrx_set_preset(
|
|
|
|
subghz->txrx,
|
|
|
|
"AM650",
|
|
|
|
subghz_setting_get_default_frequency(subghz_txrx_get_setting(subghz->txrx)),
|
|
|
|
NULL,
|
|
|
|
0);
|
2021-11-11 12:49:19 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_blink_start(SubGhz* subghz) {
|
2021-09-15 15:24:19 +00:00
|
|
|
furi_assert(subghz);
|
2023-05-04 03:04:26 +00:00
|
|
|
notification_message(subghz->notifications, &sequence_blink_stop);
|
|
|
|
notification_message(subghz->notifications, &sequence_blink_start_magenta);
|
[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
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_blink_stop(SubGhz* subghz) {
|
2021-09-15 15:24:19 +00:00
|
|
|
furi_assert(subghz);
|
2023-05-04 03:04:26 +00:00
|
|
|
notification_message(subghz->notifications, &sequence_blink_stop);
|
[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-03-03 09:48:56 +00:00
|
|
|
bool subghz_tx_start(SubGhz* subghz, FlipperFormat* flipper_format) {
|
2023-05-04 03:04:26 +00:00
|
|
|
switch(subghz_txrx_tx_start(subghz->txrx, flipper_format)) {
|
|
|
|
case SubGhzTxRxStartTxStateErrorParserOthers:
|
|
|
|
dialog_message_show_storage_error(
|
|
|
|
subghz->dialogs, "Error in protocol\nparameters\ndescription");
|
|
|
|
break;
|
|
|
|
case SubGhzTxRxStartTxStateErrorOnlyRx:
|
|
|
|
subghz_dialog_message_show_only_rx(subghz);
|
|
|
|
break;
|
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
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
default:
|
|
|
|
return true;
|
|
|
|
break;
|
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
|
|
|
}
|
2023-05-04 03:04:26 +00:00
|
|
|
return false;
|
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
|
|
|
}
|
|
|
|
|
2022-04-07 15:48:07 +00:00
|
|
|
void subghz_dialog_message_show_only_rx(SubGhz* subghz) {
|
|
|
|
DialogsApp* dialogs = subghz->dialogs;
|
|
|
|
DialogMessage* message = dialog_message_alloc();
|
2022-07-25 12:11:34 +00:00
|
|
|
|
2024-02-09 08:49:58 +00:00
|
|
|
const char* header_text = "Transmission is Blocked!";
|
|
|
|
const char* message_text = "Transmission on\nthis frequency is\nrestricted in your\nregion";
|
2022-08-15 15:53:08 +00:00
|
|
|
if(!furi_hal_region_is_provisioned()) {
|
|
|
|
header_text = "Firmware update needed";
|
|
|
|
message_text = "Please update\nfirmware before\nusing this feature\nflipp.dev/upd";
|
|
|
|
}
|
2022-07-25 12:11:34 +00:00
|
|
|
|
2024-02-09 08:49:58 +00:00
|
|
|
dialog_message_set_header(message, header_text, 63, 0, AlignCenter, AlignTop);
|
|
|
|
dialog_message_set_text(message, message_text, 1, 13, AlignLeft, AlignTop);
|
2022-07-25 12:11:34 +00:00
|
|
|
|
2024-01-02 06:43:46 +00:00
|
|
|
dialog_message_set_icon(message, &I_WarningDolphinFlip_45x42, 83, 22);
|
2022-07-25 12:11:34 +00:00
|
|
|
|
2022-04-07 15:48:07 +00:00
|
|
|
dialog_message_show(dialogs, message);
|
|
|
|
dialog_message_free(message);
|
|
|
|
}
|
|
|
|
|
2022-07-04 13:09:46 +00:00
|
|
|
bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog) {
|
[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
|
|
|
furi_assert(subghz);
|
|
|
|
furi_assert(file_path);
|
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
2022-03-03 09:48:56 +00:00
|
|
|
FlipperFormat* fff_data_file = flipper_format_file_alloc(storage);
|
2023-05-04 03:04:26 +00:00
|
|
|
Stream* fff_data_stream =
|
|
|
|
flipper_format_get_raw_stream(subghz_txrx_get_fff_data(subghz->txrx));
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2022-04-09 18:47:14 +00:00
|
|
|
SubGhzLoadKeyState load_key_state = SubGhzLoadKeyStateParseErr;
|
2023-05-04 03:04:26 +00:00
|
|
|
FuriString* temp_str = furi_string_alloc();
|
2022-04-07 11:47:47 +00:00
|
|
|
uint32_t temp_data32;
|
[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
|
|
|
|
|
|
|
do {
|
2022-03-03 09:48:56 +00:00
|
|
|
stream_clean(fff_data_stream);
|
|
|
|
if(!flipper_format_file_open_existing(fff_data_file, file_path)) {
|
|
|
|
FURI_LOG_E(TAG, "Error open file %s", file_path);
|
2021-11-11 12:49:19 +00:00
|
|
|
break;
|
|
|
|
}
|
2022-03-03 09:48:56 +00:00
|
|
|
|
2022-04-07 11:47:47 +00:00
|
|
|
if(!flipper_format_read_header(fff_data_file, temp_str, &temp_data32)) {
|
2022-03-03 09:48:56 +00:00
|
|
|
FURI_LOG_E(TAG, "Missing or incorrect header");
|
[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
|
|
|
break;
|
|
|
|
}
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
if(((!strcmp(furi_string_get_cstr(temp_str), SUBGHZ_KEY_FILE_TYPE)) ||
|
|
|
|
(!strcmp(furi_string_get_cstr(temp_str), SUBGHZ_RAW_FILE_TYPE))) &&
|
2022-04-07 11:47:47 +00:00
|
|
|
temp_data32 == SUBGHZ_KEY_FILE_VERSION) {
|
2021-11-11 12:49:19 +00:00
|
|
|
} else {
|
2022-03-03 09:48:56 +00:00
|
|
|
FURI_LOG_E(TAG, "Type or version mismatch");
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
//Load frequency
|
2022-04-15 16:31:25 +00:00
|
|
|
if(!flipper_format_read_uint32(fff_data_file, "Frequency", &temp_data32, 1)) {
|
2022-03-03 09:48:56 +00:00
|
|
|
FURI_LOG_E(TAG, "Missing Frequency");
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2023-06-30 14:03:36 +00:00
|
|
|
if(!subghz_txrx_radio_device_is_frequecy_valid(subghz->txrx, temp_data32)) {
|
2022-04-07 11:47:47 +00:00
|
|
|
FURI_LOG_E(TAG, "Frequency not supported");
|
|
|
|
break;
|
|
|
|
}
|
2022-04-07 15:48:07 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
//Load preset
|
2022-03-03 09:48:56 +00:00
|
|
|
if(!flipper_format_read_string(fff_data_file, "Preset", temp_str)) {
|
|
|
|
FURI_LOG_E(TAG, "Missing Preset");
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2022-07-26 14:16:59 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
furi_string_set_str(
|
|
|
|
temp_str, subghz_txrx_get_preset_name(subghz->txrx, furi_string_get_cstr(temp_str)));
|
|
|
|
if(!strcmp(furi_string_get_cstr(temp_str), "")) {
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
break;
|
|
|
|
}
|
2023-05-04 03:04:26 +00:00
|
|
|
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
if(!strcmp(furi_string_get_cstr(temp_str), "CUSTOM")) {
|
2023-08-22 17:56:27 +00:00
|
|
|
//TODO FL-3551: add Custom_preset_module
|
2022-08-17 16:40:09 +00:00
|
|
|
//delete preset if it already exists
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz_setting_delete_custom_preset(setting, furi_string_get_cstr(temp_str));
|
2022-07-26 14:16:59 +00:00
|
|
|
//load custom preset from file
|
|
|
|
if(!subghz_setting_load_custom_preset(
|
2023-05-04 03:04:26 +00:00
|
|
|
setting, furi_string_get_cstr(temp_str), fff_data_file)) {
|
2022-07-26 14:16:59 +00:00
|
|
|
FURI_LOG_E(TAG, "Missing Custom preset");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2023-05-04 03:04:26 +00:00
|
|
|
size_t preset_index =
|
|
|
|
subghz_setting_get_inx_preset_by_name(setting, furi_string_get_cstr(temp_str));
|
|
|
|
subghz_txrx_set_preset(
|
|
|
|
subghz->txrx,
|
|
|
|
furi_string_get_cstr(temp_str),
|
|
|
|
temp_data32,
|
|
|
|
subghz_setting_get_preset_data(setting, preset_index),
|
|
|
|
subghz_setting_get_preset_data_size(setting, preset_index));
|
|
|
|
|
|
|
|
//Load protocol
|
2022-03-03 09:48:56 +00:00
|
|
|
if(!flipper_format_read_string(fff_data_file, "Protocol", temp_str)) {
|
|
|
|
FURI_LOG_E(TAG, "Missing Protocol");
|
[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
|
|
|
break;
|
|
|
|
}
|
2023-05-04 03:04:26 +00:00
|
|
|
|
|
|
|
FlipperFormat* fff_data = subghz_txrx_get_fff_data(subghz->txrx);
|
2022-10-05 15:15:23 +00:00
|
|
|
if(!strcmp(furi_string_get_cstr(temp_str), "RAW")) {
|
2022-03-03 09:48:56 +00:00
|
|
|
//if RAW
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz->load_type_file = SubGhzLoadTypeFileRaw;
|
2023-06-30 14:03:36 +00:00
|
|
|
subghz_protocol_raw_gen_fff_data(
|
|
|
|
fff_data, file_path, subghz_txrx_radio_device_get_name(subghz->txrx));
|
2022-03-03 09:48:56 +00:00
|
|
|
} else {
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz->load_type_file = SubGhzLoadTypeFileKey;
|
2022-03-03 09:48:56 +00:00
|
|
|
stream_copy_full(
|
|
|
|
flipper_format_get_raw_stream(fff_data_file),
|
2023-05-04 03:04:26 +00:00
|
|
|
flipper_format_get_raw_stream(fff_data));
|
[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-03-03 09:48:56 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
if(subghz_txrx_load_decoder_by_name_protocol(
|
|
|
|
subghz->txrx, furi_string_get_cstr(temp_str))) {
|
2023-03-03 15:09:13 +00:00
|
|
|
SubGhzProtocolStatus status = subghz_protocol_decoder_base_deserialize(
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz_txrx_get_decoder(subghz->txrx), fff_data);
|
2023-03-03 15:09:13 +00:00
|
|
|
if(status != SubGhzProtocolStatusOk) {
|
|
|
|
load_key_state = SubGhzLoadKeyStateProtocolDescriptionErr;
|
2022-08-01 12:24:21 +00:00
|
|
|
break;
|
|
|
|
}
|
2022-04-07 11:47:47 +00:00
|
|
|
} else {
|
|
|
|
FURI_LOG_E(TAG, "Protocol not found");
|
|
|
|
break;
|
[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-03-03 09:48:56 +00:00
|
|
|
|
2022-04-09 18:47:14 +00:00
|
|
|
load_key_state = SubGhzLoadKeyStateOK;
|
[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
|
|
|
} while(0);
|
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_free(temp_str);
|
2022-03-03 09:48:56 +00:00
|
|
|
flipper_format_free(fff_data_file);
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_STORAGE);
|
[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-09 18:47:14 +00:00
|
|
|
switch(load_key_state) {
|
|
|
|
case SubGhzLoadKeyStateParseErr:
|
2022-07-04 13:09:46 +00:00
|
|
|
if(show_dialog) {
|
|
|
|
dialog_message_show_storage_error(subghz->dialogs, "Cannot parse\nfile");
|
|
|
|
}
|
2022-04-09 18:47:14 +00:00
|
|
|
return false;
|
2023-03-03 15:09:13 +00:00
|
|
|
case SubGhzLoadKeyStateProtocolDescriptionErr:
|
|
|
|
if(show_dialog) {
|
|
|
|
dialog_message_show_storage_error(
|
|
|
|
subghz->dialogs, "Error in protocol\nparameters\ndescription");
|
|
|
|
}
|
|
|
|
return false;
|
2022-04-09 18:47:14 +00:00
|
|
|
|
|
|
|
case SubGhzLoadKeyStateOK:
|
|
|
|
return true;
|
|
|
|
|
|
|
|
default:
|
|
|
|
furi_crash("SubGhz: Unknown load_key_state.");
|
|
|
|
return false;
|
|
|
|
}
|
[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
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
SubGhzLoadTypeFile subghz_get_load_type_file(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
return subghz->load_type_file;
|
|
|
|
}
|
|
|
|
|
2022-04-07 11:47:47 +00:00
|
|
|
bool subghz_get_next_name_file(SubGhz* subghz, uint8_t max_len) {
|
2021-10-27 17:37:11 +00:00
|
|
|
furi_assert(subghz);
|
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
2023-05-04 03:04:26 +00:00
|
|
|
FuriString* temp_str = furi_string_alloc();
|
|
|
|
FuriString* file_name = furi_string_alloc();
|
|
|
|
FuriString* file_path = furi_string_alloc();
|
2022-04-21 16:10:50 +00:00
|
|
|
|
2021-10-27 17:37:11 +00:00
|
|
|
bool res = false;
|
|
|
|
|
2022-05-27 11:19:21 +00:00
|
|
|
if(subghz_path_is_file(subghz->file_path)) {
|
2021-10-27 17:37:11 +00:00
|
|
|
//get the name of the next free file
|
2022-05-27 11:19:21 +00:00
|
|
|
path_extract_filename(subghz->file_path, file_name, true);
|
2022-10-05 15:15:23 +00:00
|
|
|
path_extract_dirname(furi_string_get_cstr(subghz->file_path), file_path);
|
2022-04-21 16:10:50 +00:00
|
|
|
|
2021-11-11 12:49:19 +00:00
|
|
|
storage_get_next_filename(
|
2022-04-21 16:10:50 +00:00
|
|
|
storage,
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_get_cstr(file_path),
|
|
|
|
furi_string_get_cstr(file_name),
|
2023-09-01 05:57:49 +00:00
|
|
|
SUBGHZ_APP_FILENAME_EXTENSION,
|
2022-04-21 16:10:50 +00:00
|
|
|
file_name,
|
|
|
|
max_len);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_printf(
|
2022-04-21 16:10:50 +00:00
|
|
|
temp_str,
|
|
|
|
"%s/%s%s",
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_get_cstr(file_path),
|
|
|
|
furi_string_get_cstr(file_name),
|
2023-09-01 05:57:49 +00:00
|
|
|
SUBGHZ_APP_FILENAME_EXTENSION);
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_set(subghz->file_path, temp_str);
|
2021-10-27 17:37:11 +00:00
|
|
|
res = true;
|
|
|
|
}
|
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_free(temp_str);
|
|
|
|
furi_string_free(file_path);
|
|
|
|
furi_string_free(file_name);
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_STORAGE);
|
2021-10-27 17:37:11 +00:00
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2022-03-03 09:48:56 +00:00
|
|
|
bool subghz_save_protocol_to_file(
|
|
|
|
SubGhz* subghz,
|
|
|
|
FlipperFormat* flipper_format,
|
2022-04-21 16:10:50 +00:00
|
|
|
const char* dev_file_name) {
|
2021-09-15 15:24:19 +00:00
|
|
|
furi_assert(subghz);
|
2022-03-03 09:48:56 +00:00
|
|
|
furi_assert(flipper_format);
|
2022-04-21 16:10:50 +00:00
|
|
|
furi_assert(dev_file_name);
|
2021-09-15 15:24:19 +00:00
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
2022-03-03 09:48:56 +00:00
|
|
|
Stream* flipper_format_stream = flipper_format_get_raw_stream(flipper_format);
|
|
|
|
|
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
|
|
|
bool saved = false;
|
2023-05-04 03:04:26 +00:00
|
|
|
FuriString* file_dir = furi_string_alloc();
|
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
|
|
|
|
2022-04-21 16:10:50 +00:00
|
|
|
path_extract_dirname(dev_file_name, file_dir);
|
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
|
|
|
do {
|
2022-03-03 09:48:56 +00:00
|
|
|
//removing additional fields
|
|
|
|
flipper_format_delete_key(flipper_format, "Repeat");
|
|
|
|
flipper_format_delete_key(flipper_format, "Manufacture");
|
|
|
|
|
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
|
|
|
// Create subghz folder directory if necessary
|
2022-10-05 15:15:23 +00:00
|
|
|
if(!storage_simply_mkdir(storage, furi_string_get_cstr(file_dir))) {
|
2021-11-11 12:49:19 +00:00
|
|
|
dialog_message_show_storage_error(subghz->dialogs, "Cannot create\nfolder");
|
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
|
|
|
break;
|
|
|
|
}
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2022-04-21 16:10:50 +00:00
|
|
|
if(!storage_simply_remove(storage, dev_file_name)) {
|
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
|
|
|
break;
|
|
|
|
}
|
2022-03-03 09:48:56 +00:00
|
|
|
stream_seek(flipper_format_stream, 0, StreamOffsetFromStart);
|
2022-04-21 16:10:50 +00:00
|
|
|
stream_save_to_file(flipper_format_stream, storage, dev_file_name, FSOM_CREATE_ALWAYS);
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2023-08-23 19:51:32 +00:00
|
|
|
if(storage_common_stat(storage, dev_file_name, NULL) != FSE_OK) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
saved = true;
|
|
|
|
} while(0);
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_free(file_dir);
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_STORAGE);
|
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
|
|
|
return saved;
|
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_save_to_file(void* context) {
|
|
|
|
furi_assert(context);
|
|
|
|
SubGhz* subghz = context;
|
|
|
|
if(subghz_path_is_file(subghz->file_path)) {
|
|
|
|
subghz_save_protocol_to_file(
|
|
|
|
subghz,
|
|
|
|
subghz_txrx_get_fff_data(subghz->txrx),
|
|
|
|
furi_string_get_cstr(subghz->file_path));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
bool subghz_load_protocol_from_file(SubGhz* subghz) {
|
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
|
|
|
furi_assert(subghz);
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
FuriString* file_path = furi_string_alloc();
|
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
|
|
|
|
2022-09-14 16:11:38 +00:00
|
|
|
DialogsFileBrowserOptions browser_options;
|
2023-09-01 05:57:49 +00:00
|
|
|
dialog_file_browser_set_basic_options(
|
|
|
|
&browser_options, SUBGHZ_APP_FILENAME_EXTENSION, &I_sub1_10px);
|
2022-12-07 14:17:41 +00:00
|
|
|
browser_options.base_path = SUBGHZ_APP_FOLDER;
|
2022-09-14 16:11:38 +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
|
|
|
// Input events and views are managed by file_select
|
2022-05-27 11:19:21 +00:00
|
|
|
bool res = dialog_file_browser_show(
|
2022-09-14 16:11:38 +00:00
|
|
|
subghz->dialogs, subghz->file_path, subghz->file_path, &browser_options);
|
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
|
|
|
|
|
|
|
if(res) {
|
2022-10-05 15:15:23 +00:00
|
|
|
res = subghz_key_load(subghz, furi_string_get_cstr(subghz->file_path), true);
|
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
|
|
|
}
|
Skorp subghz signal archive (#667)
* SubGhz: Add millis() furi, add subghz history struct
* SubGhz: Fix subghz history
* Gubghz: Fix code repeat history, add clean history
* SubGhz: reading and adding keys to history
* Gui: Renaming Sub 1-Ghz -> SubGhz
* Archive: Renaming Sub 1-Ghz -> SubGhz
* SubGhz: Add menu history, modified button for sending a signal, changed output of data about accepted protocol
* Archive: Fix name subghz
* SubGhz: Menu navigation
* Assets: Add assets/SubGHz/icon.png
* Assets: add new icons for subghz
* SubGhz: Fix name Add manually scene
* SubGhz: Fix load icon Read scene. rename encoder struct, rename protocol function load from file, add load raw data protocol, add info pleasant signals all protocol
* SubGhz: fix memory leak
* SubGhz: change of receiving frequency for read scene
* SubGhz: Add save/load frequency and preset, add automatic configuration of transmit/receive to the desired frequency and modulation, add button "save" config scene
* SubGhz: Fix frequency and preset, fix frequency add manualli scene, fix re-executing the parser
* Furi-hal-subghz: add 2-FSK config, fix ook config 650KHz BW Tx filter
* Fix formatting and release build
* SubGhz: Delete read scene
* SubGhz: Fix frequency add manualli scene, refactoring code
* SubGhz: 2 profiles for OOK, fix broken build.
* SubGhz: Add passing static codes from read scene, add notification read scene, refactoring code
* SubGhz: fix assert on worker double stop.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2021-08-28 13:51:48 +00:00
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_free(file_path);
|
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
|
|
|
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2021-10-25 14:37:14 +00:00
|
|
|
bool subghz_rename_file(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
2021-11-11 12:49:19 +00:00
|
|
|
bool ret = true;
|
2021-10-25 14:37:14 +00:00
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
2021-10-25 14:37:14 +00:00
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
if(furi_string_cmp(subghz->file_path_tmp, subghz->file_path)) {
|
2022-05-27 11:19:21 +00:00
|
|
|
FS_Error fs_result = storage_common_rename(
|
2022-10-05 15:15:23 +00:00
|
|
|
storage,
|
|
|
|
furi_string_get_cstr(subghz->file_path_tmp),
|
|
|
|
furi_string_get_cstr(subghz->file_path));
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2022-04-07 15:00:45 +00:00
|
|
|
if(fs_result != FSE_OK) {
|
|
|
|
dialog_message_show_storage_error(subghz->dialogs, "Cannot rename\n file/directory");
|
|
|
|
ret = false;
|
|
|
|
}
|
2021-11-11 12:49:19 +00:00
|
|
|
}
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_STORAGE);
|
2021-11-11 12:49:19 +00:00
|
|
|
|
2021-10-25 14:37:14 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2022-11-10 17:14:44 +00:00
|
|
|
bool subghz_file_available(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
bool ret = true;
|
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
|
|
|
|
|
|
|
FS_Error fs_result =
|
|
|
|
storage_common_stat(storage, furi_string_get_cstr(subghz->file_path), NULL);
|
|
|
|
|
|
|
|
if(fs_result != FSE_OK) {
|
|
|
|
dialog_message_show_storage_error(subghz->dialogs, "File not available\n file/directory");
|
|
|
|
ret = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
furi_record_close(RECORD_STORAGE);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2021-09-28 00:05:40 +00:00
|
|
|
bool subghz_delete_file(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
|
2022-07-26 12:21:51 +00:00
|
|
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
2022-10-05 15:15:23 +00:00
|
|
|
bool result = storage_simply_remove(storage, furi_string_get_cstr(subghz->file_path_tmp));
|
2022-07-26 12:21:51 +00:00
|
|
|
furi_record_close(RECORD_STORAGE);
|
2021-09-28 00:05:40 +00:00
|
|
|
|
2021-11-11 12:49:19 +00:00
|
|
|
subghz_file_name_clear(subghz);
|
2021-09-28 00:05:40 +00:00
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void subghz_file_name_clear(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
2022-10-05 15:15:23 +00:00
|
|
|
furi_string_set(subghz->file_path, SUBGHZ_APP_FOLDER);
|
|
|
|
furi_string_reset(subghz->file_path_tmp);
|
2022-05-27 11:19:21 +00:00
|
|
|
}
|
|
|
|
|
2022-10-05 15:15:23 +00:00
|
|
|
bool subghz_path_is_file(FuriString* path) {
|
2023-09-01 05:57:49 +00:00
|
|
|
return furi_string_end_with(path, SUBGHZ_APP_FILENAME_EXTENSION);
|
2021-09-28 00:05:40 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_lock(SubGhz* subghz) {
|
2021-09-15 15:24:19 +00:00
|
|
|
furi_assert(subghz);
|
2023-05-04 03:04:26 +00:00
|
|
|
subghz->lock = SubGhzLockOn;
|
2021-09-10 00:29:57 +00:00
|
|
|
}
|
2022-12-16 22:20:10 +00:00
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_unlock(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
subghz->lock = SubGhzLockOff;
|
2022-12-16 22:20:10 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
bool subghz_is_locked(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
2024-07-15 04:38:49 +00:00
|
|
|
return subghz->lock == SubGhzLockOn;
|
2022-12-16 22:20:10 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
void subghz_rx_key_state_set(SubGhz* subghz, SubGhzRxKeyState state) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
subghz->rx_key_state = state;
|
2022-12-16 22:20:10 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 03:04:26 +00:00
|
|
|
SubGhzRxKeyState subghz_rx_key_state_get(SubGhz* subghz) {
|
|
|
|
furi_assert(subghz);
|
|
|
|
return subghz->rx_key_state;
|
2022-12-16 22:20:10 +00:00
|
|
|
}
|