mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-08 23:08:10 -07:00
Merge branch 'UNLEASHED' into 420
This commit is contained in:
@@ -38,11 +38,6 @@ InfraredBruteForce* infrared_brute_force_alloc() {
|
||||
return brute_force;
|
||||
}
|
||||
|
||||
void infrared_brute_force_clear_records(InfraredBruteForce* brute_force) {
|
||||
furi_assert(!brute_force->is_started);
|
||||
InfraredBruteForceRecordDict_reset(brute_force->records);
|
||||
}
|
||||
|
||||
void infrared_brute_force_free(InfraredBruteForce* brute_force) {
|
||||
furi_assert(!brute_force->is_started);
|
||||
InfraredBruteForceRecordDict_clear(brute_force->records);
|
||||
|
||||
@@ -16,7 +16,7 @@ bool infrared_brute_force_start(
|
||||
bool infrared_brute_force_is_started(InfraredBruteForce* brute_force);
|
||||
void infrared_brute_force_stop(InfraredBruteForce* brute_force);
|
||||
bool infrared_brute_force_send_next(InfraredBruteForce* brute_force);
|
||||
void infrared_brute_force_clear_records(InfraredBruteForce* brute_force);
|
||||
void infrared_brute_force_reset(InfraredBruteForce* brute_force);
|
||||
void infrared_brute_force_add_record(
|
||||
InfraredBruteForce* brute_force,
|
||||
uint32_t index,
|
||||
|
||||
@@ -87,6 +87,6 @@ void infrared_scene_universal_common_on_exit(void* context) {
|
||||
Infrared* infrared = context;
|
||||
ButtonPanel* button_panel = infrared->button_panel;
|
||||
view_stack_remove_view(infrared->view_stack, button_panel_get_view(button_panel));
|
||||
infrared_brute_force_clear_records(infrared->brute_force);
|
||||
infrared_brute_force_reset(infrared->brute_force);
|
||||
button_panel_reset(button_panel);
|
||||
}
|
||||
|
||||
@@ -188,6 +188,54 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
subghz_setting_load(subghz->setting, EXT_PATH("subghz/assets/setting_user.txt"), true);
|
||||
}
|
||||
|
||||
subghz_setting_load(subghz->setting, EXT_PATH("subghz/assets/setting_user"));
|
||||
|
||||
// Custom Presets load without using config file
|
||||
|
||||
FlipperFormat* temp_fm_preset = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset);
|
||||
subghz_setting_load_custom_preset(subghz->setting, (const char*)"FM95", temp_fm_preset);
|
||||
|
||||
flipper_format_free(temp_fm_preset);
|
||||
|
||||
// #2-FSK 200khz BW / 135kHz Filter/ 15.86Khz Deviation + Ramping
|
||||
FlipperFormat* temp_fm_preset2 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset2,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 03 47 08 32 0B 06 15 32 14 00 13 00 12 00 11 32 10 A7 18 18 19 1D 1D 92 1C 00 1B 04 20 FB 22 17 21 B6 00 00 00 12 0E 34 60 C5 C1 C0");
|
||||
flipper_format_rewind(temp_fm_preset2);
|
||||
subghz_setting_load_custom_preset(subghz->setting, (const char*)"FM15k", temp_fm_preset2);
|
||||
|
||||
flipper_format_free(temp_fm_preset2);
|
||||
|
||||
// # HND - FM presets
|
||||
FlipperFormat* temp_fm_preset3 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset3,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 36 10 69 15 32 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset3);
|
||||
subghz_setting_load_custom_preset(subghz->setting, (const char*)"HND_1", temp_fm_preset3);
|
||||
|
||||
flipper_format_free(temp_fm_preset3);
|
||||
|
||||
FlipperFormat* temp_fm_preset4 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset4,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 07 11 36 10 E9 15 32 18 18 19 16 1D 92 1C 40 1B 03 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset4);
|
||||
subghz_setting_load_custom_preset(subghz->setting, (const char*)"HND_2", temp_fm_preset4);
|
||||
|
||||
flipper_format_free(temp_fm_preset4);
|
||||
|
||||
// custom presets loading - end
|
||||
|
||||
// Load last used values for Read, Read RAW, etc. or default
|
||||
if(!alloc_for_tx_only) {
|
||||
subghz->last_settings = subghz_last_settings_alloc();
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
#include <lib/flipper_format/flipper_format.h>
|
||||
#include "protocols/protocol_items.h"
|
||||
|
||||
// Comment next line to build on OFW
|
||||
#define IS_UNLEASHED
|
||||
|
||||
static bool pocsag_pager_app_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
POCSAGPagerApp* app = context;
|
||||
@@ -84,12 +81,10 @@ POCSAGPagerApp* pocsag_pager_app_alloc() {
|
||||
//init setting
|
||||
app->setting = subghz_setting_alloc();
|
||||
|
||||
//ToDo FIX file name setting
|
||||
#ifdef IS_UNLEASHED
|
||||
subghz_setting_load(app->setting, EXT_PATH("pocsag/settings.txt"), true);
|
||||
#else
|
||||
//ToDo FIX file name setting
|
||||
|
||||
subghz_setting_load(app->setting, EXT_PATH("pocsag/settings.txt"));
|
||||
#endif
|
||||
|
||||
//init Worker & Protocol & History
|
||||
app->lock = PCSGLockOff;
|
||||
app->txrx = malloc(sizeof(POCSAGPagerTxRx));
|
||||
@@ -108,16 +103,6 @@ POCSAGPagerApp* pocsag_pager_app_alloc() {
|
||||
|
||||
flipper_format_free(temp_fm_preset);
|
||||
|
||||
FlipperFormat* temp_fm_preset2 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset2,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 31 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset2);
|
||||
subghz_setting_load_custom_preset(app->setting, (const char*)"FM150", temp_fm_preset2);
|
||||
|
||||
flipper_format_free(temp_fm_preset2);
|
||||
|
||||
// custom presets loading - end
|
||||
|
||||
pcsg_preset_init(app, "FM95", 439987500, NULL, 0);
|
||||
|
||||
@@ -81,7 +81,7 @@ WeatherStationApp* weather_station_app_alloc() {
|
||||
app->setting = subghz_setting_alloc();
|
||||
|
||||
//ToDo FIX file name setting
|
||||
subghz_setting_load(app->setting, EXT_PATH("subghz/assets/setting_user"), true);
|
||||
subghz_setting_load(app->setting, EXT_PATH("subghz/assets/setting_user"));
|
||||
|
||||
//init Worker & Protocol & History
|
||||
app->lock = WSLockOff;
|
||||
|
||||
@@ -453,7 +453,7 @@ static void
|
||||
} while(false);
|
||||
|
||||
furi_string_free(remote_path);
|
||||
infrared_brute_force_clear_records(brute_force);
|
||||
infrared_brute_force_reset(brute_force);
|
||||
infrared_brute_force_free(brute_force);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user