mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 20:49:49 +04:00
Revert "SubGhz - Add date of signal to *.sub files header"
This reverts commit 67a457dd1f.
This commit is contained in:
16
applications/external/protoview/signal_file.c
vendored
16
applications/external/protoview/signal_file.c
vendored
@@ -28,28 +28,12 @@ bool save_signal(ProtoViewApp* app, const char* filename) {
|
|||||||
FuriString* file_content = furi_string_alloc();
|
FuriString* file_content = furi_string_alloc();
|
||||||
const char* preset_id = ProtoViewModulations[app->modulation].id;
|
const char* preset_id = ProtoViewModulations[app->modulation].id;
|
||||||
|
|
||||||
char str_date[30];
|
|
||||||
FuriHalRtcDateTime now;
|
|
||||||
furi_hal_rtc_get_datetime(&now);
|
|
||||||
snprintf(
|
|
||||||
str_date,
|
|
||||||
sizeof(str_date),
|
|
||||||
"%.4d/%.2d/%.2d %.2d:%.2d:%.2d",
|
|
||||||
now.year,
|
|
||||||
now.month,
|
|
||||||
now.day,
|
|
||||||
now.hour,
|
|
||||||
now.minute,
|
|
||||||
now.second);
|
|
||||||
|
|
||||||
furi_string_printf(
|
furi_string_printf(
|
||||||
file_content,
|
file_content,
|
||||||
"Filetype: Flipper SubGhz RAW File\n"
|
"Filetype: Flipper SubGhz RAW File\n"
|
||||||
"Version: 1\n"
|
"Version: 1\n"
|
||||||
"Date: %s\n"
|
|
||||||
"Frequency: %ld\n"
|
"Frequency: %ld\n"
|
||||||
"Preset: %s\n",
|
"Preset: %s\n",
|
||||||
str_date,
|
|
||||||
app->frequency,
|
app->frequency,
|
||||||
preset_id ? preset_id : "FuriHalSubGhzPresetCustom");
|
preset_id ? preset_id : "FuriHalSubGhzPresetCustom");
|
||||||
|
|
||||||
|
|||||||
@@ -37,25 +37,6 @@ SubGhzProtocolStatus subghz_block_generic_serialize(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FuriHalRtcDateTime now;
|
|
||||||
furi_hal_rtc_get_datetime(&now);
|
|
||||||
// Format should be locale independent for transfer across devices with different locales
|
|
||||||
furi_string_printf(
|
|
||||||
temp_str,
|
|
||||||
"%.4d/%.2d/%.2d %.2d:%.2d:%.2d",
|
|
||||||
now.year,
|
|
||||||
now.month,
|
|
||||||
now.day,
|
|
||||||
now.hour,
|
|
||||||
now.minute,
|
|
||||||
now.second);
|
|
||||||
if(!flipper_format_write_string_cstr(
|
|
||||||
flipper_format, "Date", furi_string_get_cstr(temp_str))) {
|
|
||||||
FURI_LOG_E(TAG, "Unable to add Date");
|
|
||||||
res = SubGhzProtocolStatusError;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!flipper_format_write_uint32(flipper_format, "Frequency", &preset->frequency, 1)) {
|
if(!flipper_format_write_uint32(flipper_format, "Frequency", &preset->frequency, 1)) {
|
||||||
FURI_LOG_E(TAG, "Unable to add Frequency");
|
FURI_LOG_E(TAG, "Unable to add Frequency");
|
||||||
res = SubGhzProtocolStatusErrorParserFrequency;
|
res = SubGhzProtocolStatusErrorParserFrequency;
|
||||||
@@ -112,7 +93,6 @@ SubGhzProtocolStatus subghz_block_generic_serialize(
|
|||||||
uint32_t temp = (instance->data_2 >> 4) & 0xFFFFF;
|
uint32_t temp = (instance->data_2 >> 4) & 0xFFFFF;
|
||||||
if(!flipper_format_write_uint32(flipper_format, "Data", &temp, 1)) {
|
if(!flipper_format_write_uint32(flipper_format, "Data", &temp, 1)) {
|
||||||
FURI_LOG_E(TAG, "Unable to add Data");
|
FURI_LOG_E(TAG, "Unable to add Data");
|
||||||
res = SubGhzProtocolStatusError;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -987,25 +987,6 @@ SubGhzProtocolStatus subghz_protocol_decoder_bin_raw_serialize(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FuriHalRtcDateTime now;
|
|
||||||
furi_hal_rtc_get_datetime(&now);
|
|
||||||
// Format should be locale independent for transfer across devices with different locales
|
|
||||||
furi_string_printf(
|
|
||||||
temp_str,
|
|
||||||
"%.4d/%.2d/%.2d %.2d:%.2d:%.2d",
|
|
||||||
now.year,
|
|
||||||
now.month,
|
|
||||||
now.day,
|
|
||||||
now.hour,
|
|
||||||
now.minute,
|
|
||||||
now.second);
|
|
||||||
if(!flipper_format_write_string_cstr(
|
|
||||||
flipper_format, "Date", furi_string_get_cstr(temp_str))) {
|
|
||||||
FURI_LOG_E(TAG, "Unable to add Date");
|
|
||||||
res = SubGhzProtocolStatusError;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!flipper_format_write_uint32(flipper_format, "Frequency", &preset->frequency, 1)) {
|
if(!flipper_format_write_uint32(flipper_format, "Frequency", &preset->frequency, 1)) {
|
||||||
FURI_LOG_E(TAG, "Unable to add Frequency");
|
FURI_LOG_E(TAG, "Unable to add Frequency");
|
||||||
res = SubGhzProtocolStatusErrorParserFrequency;
|
res = SubGhzProtocolStatusErrorParserFrequency;
|
||||||
|
|||||||
@@ -126,19 +126,6 @@ bool subghz_protocol_raw_save_to_file_init(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FuriHalRtcDateTime now;
|
|
||||||
furi_hal_rtc_get_datetime(&now);
|
|
||||||
// Format should be locale independent for transfer across devices with different locales
|
|
||||||
furi_string_printf(
|
|
||||||
temp_str,
|
|
||||||
"%.4d/%.2d/%.2d %.2d:%.2d:%.2d",
|
|
||||||
now.year,
|
|
||||||
now.month,
|
|
||||||
now.day,
|
|
||||||
now.hour,
|
|
||||||
now.minute,
|
|
||||||
now.second);
|
|
||||||
|
|
||||||
if(!flipper_format_write_uint32(
|
if(!flipper_format_write_uint32(
|
||||||
instance->flipper_file, "Frequency", &preset->frequency, 1)) {
|
instance->flipper_file, "Frequency", &preset->frequency, 1)) {
|
||||||
FURI_LOG_E(TAG, "Unable to add Frequency");
|
FURI_LOG_E(TAG, "Unable to add Frequency");
|
||||||
|
|||||||
Reference in New Issue
Block a user