mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 10:38:36 -07:00
plugins
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include "../subghz_i.h"
|
||||
#include "../views/subghz_read_raw.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <lib/subghz/protocols/raw.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
|
||||
#define RAW_FILE_NAME "Raw_signal_"
|
||||
#define RAW_FILE_NAME "R_"
|
||||
#define TAG "SubGhzSceneReadRAW"
|
||||
|
||||
bool subghz_scene_read_raw_update_filename(SubGhz* subghz) {
|
||||
@@ -237,8 +239,17 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
string_t temp_str;
|
||||
string_init(temp_str);
|
||||
|
||||
FuriHalRtcDateTime datetime;
|
||||
furi_hal_rtc_get_datetime(&datetime);
|
||||
char strings[1][25];
|
||||
sprintf(strings[0], "%s%.4d%.2d%.2d%.2d%.2d", "R"
|
||||
, datetime.year, datetime.month, datetime.day
|
||||
, datetime.hour, datetime.minute
|
||||
);
|
||||
|
||||
string_printf(
|
||||
temp_str, "%s/%s%s", SUBGHZ_RAW_FOLDER, RAW_FILE_NAME, SUBGHZ_APP_EXTENSION);
|
||||
temp_str, "%s/%s%s", SUBGHZ_RAW_FOLDER, strings[0], SUBGHZ_APP_EXTENSION);
|
||||
subghz_protocol_raw_gen_fff_data(subghz->txrx->fff_data, string_get_cstr(temp_str));
|
||||
string_clear(temp_str);
|
||||
|
||||
@@ -259,9 +270,17 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneNeedSaving);
|
||||
} else {
|
||||
//subghz_get_preset_name(subghz, subghz->error_str);
|
||||
FuriHalRtcDateTime datetime;
|
||||
furi_hal_rtc_get_datetime(&datetime);
|
||||
char strings[1][25];
|
||||
sprintf(strings[0], "%s%.4d%.2d%.2d%.2d%.2d", "R"
|
||||
, datetime.year, datetime.month, datetime.day
|
||||
, datetime.hour, datetime.minute
|
||||
);
|
||||
|
||||
if(subghz_protocol_raw_save_to_file_init(
|
||||
(SubGhzProtocolDecoderRAW*)subghz->txrx->decoder_result,
|
||||
RAW_FILE_NAME,
|
||||
strings[0],
|
||||
subghz->txrx->frequency,
|
||||
subghz->txrx->preset)) {
|
||||
DOLPHIN_DEED(DolphinDeedSubGhzRawRec);
|
||||
|
||||
Reference in New Issue
Block a user