From b2bb37af74ed2b3f9dd52b5ce1198060e72eb4ed Mon Sep 17 00:00:00 2001 From: gullradriel <3157857+gullradriel@users.noreply.github.com> Date: Sun, 26 Jan 2025 18:46:43 +0100 Subject: [PATCH] Flipper tx: use file_path, example file (#2496) * added subghz_dir * use subghz_dir from file_path * example file --- .../application/external/flippertx/ui_flippertx.hpp | 2 -- firmware/application/file_path.cpp | 1 + firmware/application/file_path.hpp | 1 + sdcard/SUBGHZ/flipper_tx_example.sub | 10 ++++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 sdcard/SUBGHZ/flipper_tx_example.sub diff --git a/firmware/application/external/flippertx/ui_flippertx.hpp b/firmware/application/external/flippertx/ui_flippertx.hpp index a1e05877..b28eca3c 100644 --- a/firmware/application/external/flippertx/ui_flippertx.hpp +++ b/firmware/application/external/flippertx/ui_flippertx.hpp @@ -89,8 +89,6 @@ class FlipperTxView : public View { std::unique_ptr replay_thread{}; Optional submeta{}; - const std::filesystem::path subghz_dir = u"subghz"; - MessageHandlerRegistration message_handler_tx_progress{ Message::ID::TXProgress, [this](const Message* const p) { diff --git a/firmware/application/file_path.cpp b/firmware/application/file_path.cpp index ce4acf48..54dd25bd 100644 --- a/firmware/application/file_path.cpp +++ b/firmware/application/file_path.cpp @@ -49,3 +49,4 @@ const std::filesystem::path sstv_dir = u"SSTV"; const std::filesystem::path wav_dir = u"WAV"; const std::filesystem::path whipcalc_dir = u"WHIPCALC"; const std::filesystem::path ook_editor_dir = u"OOKFILES"; +const std::filesystem::path subghz_dir = u"SUBGHZ"; diff --git a/firmware/application/file_path.hpp b/firmware/application/file_path.hpp index bc115736..8127765e 100644 --- a/firmware/application/file_path.hpp +++ b/firmware/application/file_path.hpp @@ -51,5 +51,6 @@ extern const std::filesystem::path sstv_dir; extern const std::filesystem::path wav_dir; extern const std::filesystem::path whipcalc_dir; extern const std::filesystem::path ook_editor_dir; +extern const std::filesystem::path subghz_dir; #endif /* __FILE_PATH_H__ */ diff --git a/sdcard/SUBGHZ/flipper_tx_example.sub b/sdcard/SUBGHZ/flipper_tx_example.sub new file mode 100644 index 00000000..91fda6ea --- /dev/null +++ b/sdcard/SUBGHZ/flipper_tx_example.sub @@ -0,0 +1,10 @@ +Filetype: Flipper SubGhz RAW File +Version: 1 +Frequency: 433920000 +Preset: FuriHalSubGhzPresetOok650Async +Protocol: RAW + +RAW_Data: 210 650 210 650 210 650 630 650 210 650 210 650 210 650 630 650 +RAW_Data: 210 650 210 650 210 650 630 650 210 650 210 650 210 650 210 1950 +RAW_Data: 210 650 210 650 210 650 630 650 210 650 210 650 210 650 630 650 +RAW_Data: 210 650 210 650 210 650 630 650 210 650 210 650 210 650 210 1950