[FL-1931, FL-2005] SubGhz: migration in flipper file format (#807)
* SubGhz: add save key in flipper file format * [FL-2005] SubGhz: fix stored signals cannot be deleted * SubGhz: add load key in flipper file format * SubGhz: fix syntax * SubGhz: fix bad file upload * Storage: add function to get the next free filename * SubGhz: add save RAW in flipper file format * SubGhz: add load RAW in flipper file format * SubGhz: refactoring protocol * SubGhz: refactoring scene * SubGhz: fix SubGhzNotificationState define * Makefile: proper comapre for FORCE Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <furi.h>
|
||||
#include <furi-hal.h>
|
||||
#include <gui/gui.h>
|
||||
#include <dialogs/dialogs.h>
|
||||
#include <gui/scene_manager.h>
|
||||
#include <notification/notification-messages.h>
|
||||
#include <gui/view_dispatcher.h>
|
||||
@@ -33,11 +34,6 @@
|
||||
|
||||
#define SUBGHZ_TEXT_STORE_SIZE 40
|
||||
|
||||
#define NOTIFICATION_STARTING_STATE 0u
|
||||
#define NOTIFICATION_IDLE_STATE 1u
|
||||
#define NOTIFICATION_TX_STATE 2u
|
||||
#define NOTIFICATION_RX_STATE 3u
|
||||
|
||||
extern const char* const subghz_frequencies_text[];
|
||||
extern const uint32_t subghz_frequencies[];
|
||||
extern const uint32_t subghz_hopper_frequencies[];
|
||||
@@ -45,6 +41,14 @@ extern const uint32_t subghz_frequencies_count;
|
||||
extern const uint32_t subghz_hopper_frequencies_count;
|
||||
extern const uint32_t subghz_frequencies_433_92;
|
||||
|
||||
/** SubGhzNotification state */
|
||||
typedef enum {
|
||||
SubGhzNotificationStateStarting,
|
||||
SubGhzNotificationStateIDLE,
|
||||
SubGhzNotificationStateTX,
|
||||
SubGhzNotificationStateRX,
|
||||
} SubGhzNotificationState;
|
||||
|
||||
/** SubGhzTxRx state */
|
||||
typedef enum {
|
||||
SubGhzTxRxStateIDLE,
|
||||
@@ -101,9 +105,10 @@ struct SubGhz {
|
||||
Popup* popup;
|
||||
TextInput* text_input;
|
||||
Widget* widget;
|
||||
DialogsApp* dialogs;
|
||||
char file_name[SUBGHZ_TEXT_STORE_SIZE + 1];
|
||||
char file_name_tmp[SUBGHZ_TEXT_STORE_SIZE + 1];
|
||||
uint8_t state_notifications;
|
||||
SubGhzNotificationState state_notifications;
|
||||
|
||||
SubghzReceiver* subghz_receiver;
|
||||
SubghzTransmitter* subghz_transmitter;
|
||||
@@ -133,6 +138,9 @@ typedef enum {
|
||||
SubGhzViewTestPacket,
|
||||
} SubGhzView;
|
||||
|
||||
bool subghz_set_pteset(SubGhz* subghz, const char* preset);
|
||||
bool subghz_get_preset_name(SubGhz* subghz, string_t preset);
|
||||
void subghz_get_frequency_modulation(SubGhz* subghz, string_t frequency, string_t modulation);
|
||||
void subghz_begin(SubGhz* subghz, FuriHalSubGhzPreset preset);
|
||||
uint32_t subghz_rx(SubGhz* subghz, uint32_t frequency);
|
||||
void subghz_rx_end(SubGhz* subghz);
|
||||
|
Reference in New Issue
Block a user