Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkorpionm <85568270+Skorpionm@users.noreply.github.com>2021-10-27 20:37:11 +0300
committerGitHub <noreply@github.com>2021-10-27 20:37:11 +0300
commit26c53f3dfdfd290a0949864019bf1735d3fea6a0 (patch)
treecae0f40ff780edc266112bab2829bbfafd41489d /applications/subghz/subghz_i.h
parent10c65daad7fae6d2e710590890fe2ea11eb90d5a (diff)
SubGhz: Refactoring Read RAW (#791)
* SubGhz: rename save_raw -> read_raw * SubGhz: add manually saving files to read_raw, confirming that saving is unnecessary, refactoring * Format sources * SubGhz: fix runglish Co-authored-by: あく <alleteam@gmail.com>
Diffstat (limited to 'applications/subghz/subghz_i.h')
-rw-r--r--applications/subghz/subghz_i.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/applications/subghz/subghz_i.h b/applications/subghz/subghz_i.h
index 9e7c1f27..70a39f23 100644
--- a/applications/subghz/subghz_i.h
+++ b/applications/subghz/subghz_i.h
@@ -4,7 +4,7 @@
#include "views/subghz_receiver.h"
#include "views/subghz_transmitter.h"
#include "views/subghz_frequency_analyzer.h"
-#include "views/subghz_save_raw.h"
+#include "views/subghz_read_raw.h"
#include "views/subghz_test_static.h"
#include "views/subghz_test_carrier.h"
@@ -47,7 +47,7 @@ extern const uint32_t subghz_frequencies_433_92;
/** SubGhzTxRx state */
typedef enum {
- SubGhzTxRxStateIdle,
+ SubGhzTxRxStateIDLE,
SubGhzTxRxStateRx,
SubGhzTxRxStateTx,
SubGhzTxRxStateSleep,
@@ -61,21 +61,29 @@ typedef enum {
SubGhzHopperStateRSSITimeOut,
} SubGhzHopperState;
+/** SubGhzRxKeyState state */
+typedef enum {
+ SubGhzRxKeyStateIDLE,
+ SubGhzRxKeyStateNoSave,
+ SubGhzRxKeyStateNeedSave,
+ SubGhzRxKeyStateAddKey,
+ SubGhzRxKeyStateExit,
+} SubGhzRxKeyState;
+
struct SubGhzTxRx {
SubGhzWorker* worker;
SubGhzParser* parser;
SubGhzProtocolCommon* protocol_result;
- //SubGhzProtocolCommon* protocol_save_raw;
SubGhzProtocolCommonEncoder* encoder;
uint32_t frequency;
FuriHalSubGhzPreset preset;
SubGhzHistory* history;
uint16_t idx_menu_chosen;
SubGhzTxRxState txrx_state;
- //bool hopper_runing;
SubGhzHopperState hopper_state;
uint8_t hopper_timeout;
uint8_t hopper_idx_frequency;
+ SubGhzRxKeyState rx_key_state;
};
typedef struct SubGhzTxRx SubGhzTxRx;
@@ -102,7 +110,7 @@ struct SubGhz {
VariableItemList* variable_item_list;
SubghzFrequencyAnalyzer* subghz_frequency_analyzer;
- SubghzSaveRAW* subghz_save_raw;
+ SubghzReadRAW* subghz_read_raw;
SubghzTestStatic* subghz_test_static;
SubghzTestCarrier* subghz_test_carrier;
SubghzTestPacket* subghz_test_packet;
@@ -119,7 +127,7 @@ typedef enum {
SubGhzViewTransmitter,
SubGhzViewVariableItemList,
SubGhzViewFrequencyAnalyzer,
- SubGhzViewSaveRAW,
+ SubGhzViewReadRAW,
SubGhzViewStatic,
SubGhzViewTestCarrier,
SubGhzViewTestPacket,
@@ -132,6 +140,7 @@ void subghz_sleep(SubGhz* subghz);
bool subghz_tx_start(SubGhz* subghz);
void subghz_tx_stop(SubGhz* subghz);
bool subghz_key_load(SubGhz* subghz, const char* file_path);
+bool subghz_get_next_name_file(SubGhz* subghz);
bool subghz_save_protocol_to_file(SubGhz* subghz, const char* dev_name);
bool subghz_load_protocol_from_file(SubGhz* subghz);
bool subghz_rename_file(SubGhz* subghz);