mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
a024e470b7
* 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>
93 lines
2.4 KiB
C
93 lines
2.4 KiB
C
#pragma once
|
|
|
|
#include "subghz.h"
|
|
#include "views/subghz_analyze.h"
|
|
#include "views/subghz_receiver.h"
|
|
#include "views/subghz_transmitter.h"
|
|
#include "views/subghz_static.h"
|
|
|
|
#include "views/subghz_test_carrier.h"
|
|
#include "views/subghz_test_packet.h"
|
|
|
|
#include <furi.h>
|
|
#include <furi-hal.h>
|
|
#include <gui/gui.h>
|
|
#include <gui/scene_manager.h>
|
|
#include <notification/notification-messages.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/modules/submenu.h>
|
|
#include <gui/modules/dialog_ex.h>
|
|
#include <gui/modules/popup.h>
|
|
#include <gui/modules/text_input.h>
|
|
|
|
#include <subghz/scenes/subghz_scene.h>
|
|
|
|
#include <lib/subghz/subghz_worker.h>
|
|
#include <lib/subghz/protocols/subghz_protocol.h>
|
|
#include <lib/subghz/protocols/subghz_protocol_common.h>
|
|
|
|
#define SUBGHZ_TEXT_STORE_SIZE 128
|
|
|
|
#define NOTIFICATION_STARTING_STATE 0u
|
|
#define NOTIFICATION_IDLE_STATE 1u
|
|
#define NOTIFICATION_TX_STATE 2u
|
|
|
|
extern const uint32_t subghz_frequencies[];
|
|
extern const uint32_t subghz_frequencies_count;
|
|
extern const uint32_t subghz_frequencies_433_92;
|
|
|
|
struct SubGhz {
|
|
Gui* gui;
|
|
NotificationApp* notifications;
|
|
|
|
SubGhzWorker* worker;
|
|
SubGhzProtocol* protocol;
|
|
SubGhzProtocolCommon* protocol_result;
|
|
SubGhzProtocolEncoderCommon* encoder;
|
|
|
|
SceneManager* scene_manager;
|
|
|
|
ViewDispatcher* view_dispatcher;
|
|
|
|
Submenu* submenu;
|
|
DialogEx* dialog_ex;
|
|
Popup* popup;
|
|
TextInput* text_input;
|
|
char text_store[SUBGHZ_TEXT_STORE_SIZE + 1];
|
|
uint8_t state_notifications;
|
|
|
|
SubghzAnalyze* subghz_analyze;
|
|
SubghzReceiver* subghz_receiver;
|
|
SubghzTransmitter* subghz_transmitter;
|
|
SubghzStatic* subghz_static;
|
|
|
|
SubghzTestCarrier* subghz_test_carrier;
|
|
SubghzTestPacket* subghz_test_packet;
|
|
};
|
|
|
|
typedef enum {
|
|
SubGhzViewMenu,
|
|
|
|
SubGhzViewAnalyze,
|
|
SubGhzViewDialogEx,
|
|
SubGhzViewReceiver,
|
|
SubGhzViewPopup,
|
|
SubGhzViewTextInput,
|
|
SubGhzViewTransmitter,
|
|
|
|
SubGhzViewStatic,
|
|
SubGhzViewTestCarrier,
|
|
SubGhzViewTestPacket,
|
|
} SubGhzView;
|
|
|
|
void subghz_begin(FuriHalSubGhzPreset preset);
|
|
void subghz_rx(uint32_t frequency);
|
|
void subghz_tx(uint32_t frequency);
|
|
void subghz_idle(void);
|
|
void subghz_end(void);
|
|
void subghz_transmitter_tx_start(void* context);
|
|
void subghz_transmitter_tx_stop(void* context);
|
|
bool subghz_key_load(SubGhz* subghz, const char* file_path);
|
|
bool subghz_save_protocol_to_file(void* context, const char* dev_name);
|
|
bool subghz_saved_protocol_select(SubGhz* subghz);
|
|
uint32_t subghz_random_serial(void);
|