mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-27 01:58:09 -07:00
SubGhz - Temp Fix RAW recording and reading
and remove unused file
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user