SubGhz - Temp Fix RAW recording and reading

and remove unused file
This commit is contained in:
MX
2023-04-14 23:37:20 +03:00
parent addf909287
commit afab1bdaad
3 changed files with 10 additions and 166 deletions
+2 -2
View File
@@ -244,8 +244,8 @@ void subghz_protocol_decoder_raw_reset(void* context) {
void subghz_protocol_decoder_raw_feed(void* context, bool level, uint32_t duration) {
furi_assert(context);
SubGhzProtocolDecoderRAW* instance = context;
if(!instance->pause && (instance->upload_raw != NULL)) {
// Add check if we got duration higher than 1 second, we skipping it, temp fix
if((!instance->pause && (instance->upload_raw != NULL)) && (duration < ((uint32_t)1000000))) {
if(duration > subghz_protocol_raw_const.te_short) {
if(instance->last_level != level) {
instance->last_level = (level ? true : false);
+8 -1
View File
@@ -56,6 +56,7 @@ void subghz_file_encoder_worker_add_level_duration(
bool subghz_file_encoder_worker_data_parse(SubGhzFileEncoderWorker* instance, const char* strStart) {
char* str1;
int32_t temp_ds = 0;
bool res = false;
// Line sample: "RAW_Data: -1, 2, -2..."
@@ -72,7 +73,13 @@ bool subghz_file_encoder_worker_data_parse(SubGhzFileEncoderWorker* instance, co
// Skip space
str1 += 1;
subghz_file_encoder_worker_add_level_duration(instance, atoi(str1));
//
temp_ds = atoi(str1);
if((temp_ds < -1000000) || (temp_ds > 1000000)) {
//FURI_LOG_I("PARSE", "Number overflow - %d", atoi(str1));
} else {
subghz_file_encoder_worker_add_level_duration(instance, temp_ds);
}
}
res = true;
}