Fix typos in subghz (#1588)

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
MX 2022-08-17 19:40:09 +03:00 committed by GitHub
parent c964099c8c
commit 9b13842467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 118 additions and 118 deletions

View File

@ -100,7 +100,7 @@ static void subghz_scene_receiver_config_set_preset(VariableItem* item) {
subghz_setting_get_preset_data_size(subghz->setting, index)); subghz_setting_get_preset_data_size(subghz->setting, index));
} }
static void subghz_scene_receiver_config_set_hopping_runing(VariableItem* item) { static void subghz_scene_receiver_config_set_hopping_running(VariableItem* item) {
SubGhz* subghz = variable_item_get_context(item); SubGhz* subghz = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item); uint8_t index = variable_item_get_current_value_index(item);
@ -176,7 +176,7 @@ void subghz_scene_receiver_config_on_enter(void* context) {
subghz->variable_item_list, subghz->variable_item_list,
"Hopping:", "Hopping:",
HOPPING_COUNT, HOPPING_COUNT,
subghz_scene_receiver_config_set_hopping_runing, subghz_scene_receiver_config_set_hopping_running,
subghz); subghz);
value_index = subghz_scene_receiver_config_hopper_value_index( value_index = subghz_scene_receiver_config_hopper_value_index(
subghz->txrx->hopper_state, hopping_value, HOPPING_COUNT, subghz); subghz->txrx->hopper_state, hopping_value, HOPPING_COUNT, subghz);

View File

@ -296,7 +296,7 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog) {
if(!strcmp(string_get_cstr(temp_str), "FuriHalSubGhzPresetCustom")) { if(!strcmp(string_get_cstr(temp_str), "FuriHalSubGhzPresetCustom")) {
//Todo add Custom_preset_module //Todo add Custom_preset_module
//delete peset if it already exists //delete preset if it already exists
subghz_setting_delete_custom_preset( subghz_setting_delete_custom_preset(
subghz->setting, string_get_cstr(subghz->txrx->preset->name)); subghz->setting, string_get_cstr(subghz->txrx->preset->name));
//load custom preset from file //load custom preset from file

View File

@ -7,7 +7,7 @@
#include <lib/toolbox/level_duration.h> #include <lib/toolbox/level_duration.h>
typedef struct { typedef struct {
bool is_runing; bool is_running;
size_t repeat; size_t repeat;
size_t front; size_t front;
size_t size_upload; size_t size_upload;

View File

@ -94,7 +94,7 @@ void* subghz_protocol_encoder_bett_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop) instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -174,7 +174,7 @@ bool subghz_protocol_encoder_bett_deserialize(void* context, FlipperFormat* flip
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_bett_get_upload(instance); subghz_protocol_encoder_bett_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -184,14 +184,14 @@ bool subghz_protocol_encoder_bett_deserialize(void* context, FlipperFormat* flip
void subghz_protocol_encoder_bett_stop(void* context) { void subghz_protocol_encoder_bett_stop(void* context) {
SubGhzProtocolEncoderBETT* instance = context; SubGhzProtocolEncoderBETT* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_bett_yield(void* context) { LevelDuration subghz_protocol_encoder_bett_yield(void* context) {
SubGhzProtocolEncoderBETT* instance = context; SubGhzProtocolEncoderBETT* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -85,7 +85,7 @@ void* subghz_protocol_encoder_came_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop) instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -157,7 +157,7 @@ bool subghz_protocol_encoder_came_deserialize(void* context, FlipperFormat* flip
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_came_get_upload(instance); subghz_protocol_encoder_came_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -167,14 +167,14 @@ bool subghz_protocol_encoder_came_deserialize(void* context, FlipperFormat* flip
void subghz_protocol_encoder_came_stop(void* context) { void subghz_protocol_encoder_came_stop(void* context) {
SubGhzProtocolEncoderCame* instance = context; SubGhzProtocolEncoderCame* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_came_yield(void* context) { LevelDuration subghz_protocol_encoder_came_yield(void* context) {
SubGhzProtocolEncoderCame* instance = context; SubGhzProtocolEncoderCame* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -112,7 +112,7 @@ void* subghz_protocol_encoder_came_twee_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 1536; //max upload 92*14 = 1288 !!!! instance->encoder.size_upload = 1536; //max upload 92*14 = 1288 !!!!
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -261,7 +261,7 @@ bool subghz_protocol_encoder_came_twee_deserialize(void* context, FlipperFormat*
subghz_protocol_came_twee_remote_controller(&instance->generic); subghz_protocol_came_twee_remote_controller(&instance->generic);
subghz_protocol_encoder_came_twee_get_upload(instance); subghz_protocol_encoder_came_twee_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -271,14 +271,14 @@ bool subghz_protocol_encoder_came_twee_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_came_twee_stop(void* context) { void subghz_protocol_encoder_came_twee_stop(void* context) {
SubGhzProtocolEncoderCameTwee* instance = context; SubGhzProtocolEncoderCameTwee* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_came_twee_yield(void* context) { LevelDuration subghz_protocol_encoder_came_twee_yield(void* context) {
SubGhzProtocolEncoderCameTwee* instance = context; SubGhzProtocolEncoderCameTwee* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -108,7 +108,7 @@ void* subghz_protocol_encoder_chamb_code_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 24; instance->encoder.size_upload = 24;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -225,7 +225,7 @@ bool subghz_protocol_encoder_chamb_code_deserialize(void* context, FlipperFormat
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_chamb_code_get_upload(instance); subghz_protocol_encoder_chamb_code_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -235,14 +235,14 @@ bool subghz_protocol_encoder_chamb_code_deserialize(void* context, FlipperFormat
void subghz_protocol_encoder_chamb_code_stop(void* context) { void subghz_protocol_encoder_chamb_code_stop(void* context) {
SubGhzProtocolEncoderChamb_Code* instance = context; SubGhzProtocolEncoderChamb_Code* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_chamb_code_yield(void* context) { LevelDuration subghz_protocol_encoder_chamb_code_yield(void* context) {
SubGhzProtocolEncoderChamb_Code* instance = context; SubGhzProtocolEncoderChamb_Code* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -85,7 +85,7 @@ void* subghz_protocol_encoder_doitrand_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 128; instance->encoder.size_upload = 128;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -155,7 +155,7 @@ bool subghz_protocol_encoder_doitrand_deserialize(void* context, FlipperFormat*
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_doitrand_get_upload(instance); subghz_protocol_encoder_doitrand_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -165,14 +165,14 @@ bool subghz_protocol_encoder_doitrand_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_doitrand_stop(void* context) { void subghz_protocol_encoder_doitrand_stop(void* context) {
SubGhzProtocolEncoderDoitrand* instance = context; SubGhzProtocolEncoderDoitrand* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_doitrand_yield(void* context) { LevelDuration subghz_protocol_encoder_doitrand_yield(void* context) {
SubGhzProtocolEncoderDoitrand* instance = context; SubGhzProtocolEncoderDoitrand* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -78,7 +78,7 @@ void* subghz_protocol_encoder_gate_tx_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop) instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -148,7 +148,7 @@ bool subghz_protocol_encoder_gate_tx_deserialize(void* context, FlipperFormat* f
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_gate_tx_get_upload(instance); subghz_protocol_encoder_gate_tx_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -158,14 +158,14 @@ bool subghz_protocol_encoder_gate_tx_deserialize(void* context, FlipperFormat* f
void subghz_protocol_encoder_gate_tx_stop(void* context) { void subghz_protocol_encoder_gate_tx_stop(void* context) {
SubGhzProtocolEncoderGateTx* instance = context; SubGhzProtocolEncoderGateTx* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_gate_tx_yield(void* context) { LevelDuration subghz_protocol_encoder_gate_tx_yield(void* context) {
SubGhzProtocolEncoderGateTx* instance = context; SubGhzProtocolEncoderGateTx* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -89,7 +89,7 @@ void* subghz_protocol_encoder_holtek_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 128; instance->encoder.size_upload = 128;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -161,7 +161,7 @@ bool subghz_protocol_encoder_holtek_deserialize(void* context, FlipperFormat* fl
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_holtek_get_upload(instance); subghz_protocol_encoder_holtek_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -171,14 +171,14 @@ bool subghz_protocol_encoder_holtek_deserialize(void* context, FlipperFormat* fl
void subghz_protocol_encoder_holtek_stop(void* context) { void subghz_protocol_encoder_holtek_stop(void* context) {
SubGhzProtocolEncoderHoltek* instance = context; SubGhzProtocolEncoderHoltek* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_holtek_yield(void* context) { LevelDuration subghz_protocol_encoder_holtek_yield(void* context) {
SubGhzProtocolEncoderHoltek* instance = context; SubGhzProtocolEncoderHoltek* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -91,7 +91,7 @@ void* subghz_protocol_encoder_honeywell_wdb_alloc(SubGhzEnvironment* environment
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 128; instance->encoder.size_upload = 128;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -163,7 +163,7 @@ bool subghz_protocol_encoder_honeywell_wdb_deserialize(
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_honeywell_wdb_get_upload(instance); subghz_protocol_encoder_honeywell_wdb_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -173,14 +173,14 @@ bool subghz_protocol_encoder_honeywell_wdb_deserialize(
void subghz_protocol_encoder_honeywell_wdb_stop(void* context) { void subghz_protocol_encoder_honeywell_wdb_stop(void* context) {
SubGhzProtocolEncoderHoneywell_WDB* instance = context; SubGhzProtocolEncoderHoneywell_WDB* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_honeywell_wdb_yield(void* context) { LevelDuration subghz_protocol_encoder_honeywell_wdb_yield(void* context) {
SubGhzProtocolEncoderHoneywell_WDB* instance = context; SubGhzProtocolEncoderHoneywell_WDB* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -81,7 +81,7 @@ void* subghz_protocol_encoder_hormann_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 2048; instance->encoder.size_upload = 2048;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -164,7 +164,7 @@ bool subghz_protocol_encoder_hormann_deserialize(void* context, FlipperFormat* f
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_hormann_get_upload(instance); subghz_protocol_encoder_hormann_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -174,14 +174,14 @@ bool subghz_protocol_encoder_hormann_deserialize(void* context, FlipperFormat* f
void subghz_protocol_encoder_hormann_stop(void* context) { void subghz_protocol_encoder_hormann_stop(void* context) {
SubGhzProtocolEncoderHormann* instance = context; SubGhzProtocolEncoderHormann* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_hormann_yield(void* context) { LevelDuration subghz_protocol_encoder_hormann_yield(void* context) {
SubGhzProtocolEncoderHormann* instance = context; SubGhzProtocolEncoderHormann* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -102,7 +102,7 @@ void* subghz_protocol_encoder_keeloq_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 256; instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -295,7 +295,7 @@ bool subghz_protocol_encoder_keeloq_deserialize(void* context, FlipperFormat* fl
break; break;
} }
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -305,14 +305,14 @@ bool subghz_protocol_encoder_keeloq_deserialize(void* context, FlipperFormat* fl
void subghz_protocol_encoder_keeloq_stop(void* context) { void subghz_protocol_encoder_keeloq_stop(void* context) {
SubGhzProtocolEncoderKeeloq* instance = context; SubGhzProtocolEncoderKeeloq* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_keeloq_yield(void* context) { LevelDuration subghz_protocol_encoder_keeloq_yield(void* context) {
SubGhzProtocolEncoderKeeloq* instance = context; SubGhzProtocolEncoderKeeloq* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -84,7 +84,7 @@ void* subghz_protocol_encoder_linear_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 28; //max 10bit*2 + 2 (start, stop) instance->encoder.size_upload = 28; //max 10bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -166,7 +166,7 @@ bool subghz_protocol_encoder_linear_deserialize(void* context, FlipperFormat* fl
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_linear_get_upload(instance); subghz_protocol_encoder_linear_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -176,14 +176,14 @@ bool subghz_protocol_encoder_linear_deserialize(void* context, FlipperFormat* fl
void subghz_protocol_encoder_linear_stop(void* context) { void subghz_protocol_encoder_linear_stop(void* context) {
SubGhzProtocolEncoderLinear* instance = context; SubGhzProtocolEncoderLinear* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_linear_yield(void* context) { LevelDuration subghz_protocol_encoder_linear_yield(void* context) {
SubGhzProtocolEncoderLinear* instance = context; SubGhzProtocolEncoderLinear* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -80,7 +80,7 @@ void* subghz_protocol_encoder_marantec_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 256; instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -208,7 +208,7 @@ bool subghz_protocol_encoder_marantec_deserialize(void* context, FlipperFormat*
subghz_protocol_marantec_remote_controller(&instance->generic); subghz_protocol_marantec_remote_controller(&instance->generic);
subghz_protocol_encoder_marantec_get_upload(instance); subghz_protocol_encoder_marantec_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -218,14 +218,14 @@ bool subghz_protocol_encoder_marantec_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_marantec_stop(void* context) { void subghz_protocol_encoder_marantec_stop(void* context) {
SubGhzProtocolEncoderMarantec* instance = context; SubGhzProtocolEncoderMarantec* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_marantec_yield(void* context) { LevelDuration subghz_protocol_encoder_marantec_yield(void* context) {
SubGhzProtocolEncoderMarantec* instance = context; SubGhzProtocolEncoderMarantec* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -90,7 +90,7 @@ void* subghz_protocol_encoder_megacode_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; instance->encoder.size_upload = 52;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -194,7 +194,7 @@ bool subghz_protocol_encoder_megacode_deserialize(void* context, FlipperFormat*
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_megacode_get_upload(instance); subghz_protocol_encoder_megacode_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -204,14 +204,14 @@ bool subghz_protocol_encoder_megacode_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_megacode_stop(void* context) { void subghz_protocol_encoder_megacode_stop(void* context) {
SubGhzProtocolEncoderMegaCode* instance = context; SubGhzProtocolEncoderMegaCode* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_megacode_yield(void* context) { LevelDuration subghz_protocol_encoder_megacode_yield(void* context) {
SubGhzProtocolEncoderMegaCode* instance = context; SubGhzProtocolEncoderMegaCode* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -80,7 +80,7 @@ void* subghz_protocol_encoder_nero_radio_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 256; instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -173,7 +173,7 @@ bool subghz_protocol_encoder_nero_radio_deserialize(void* context, FlipperFormat
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_nero_radio_get_upload(instance); subghz_protocol_encoder_nero_radio_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -183,14 +183,14 @@ bool subghz_protocol_encoder_nero_radio_deserialize(void* context, FlipperFormat
void subghz_protocol_encoder_nero_radio_stop(void* context) { void subghz_protocol_encoder_nero_radio_stop(void* context) {
SubGhzProtocolEncoderNeroRadio* instance = context; SubGhzProtocolEncoderNeroRadio* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_nero_radio_yield(void* context) { LevelDuration subghz_protocol_encoder_nero_radio_yield(void* context) {
SubGhzProtocolEncoderNeroRadio* instance = context; SubGhzProtocolEncoderNeroRadio* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -79,7 +79,7 @@ void* subghz_protocol_encoder_nero_sketch_alloc(SubGhzEnvironment* environment)
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 256; instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -167,7 +167,7 @@ bool subghz_protocol_encoder_nero_sketch_deserialize(void* context, FlipperForma
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_nero_sketch_get_upload(instance); subghz_protocol_encoder_nero_sketch_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -177,14 +177,14 @@ bool subghz_protocol_encoder_nero_sketch_deserialize(void* context, FlipperForma
void subghz_protocol_encoder_nero_sketch_stop(void* context) { void subghz_protocol_encoder_nero_sketch_stop(void* context) {
SubGhzProtocolEncoderNeroSketch* instance = context; SubGhzProtocolEncoderNeroSketch* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_nero_sketch_yield(void* context) { LevelDuration subghz_protocol_encoder_nero_sketch_yield(void* context) {
SubGhzProtocolEncoderNeroSketch* instance = context; SubGhzProtocolEncoderNeroSketch* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -78,7 +78,7 @@ void* subghz_protocol_encoder_nice_flo_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop) instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -150,7 +150,7 @@ bool subghz_protocol_encoder_nice_flo_deserialize(void* context, FlipperFormat*
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_nice_flo_get_upload(instance); subghz_protocol_encoder_nice_flo_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -160,14 +160,14 @@ bool subghz_protocol_encoder_nice_flo_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_nice_flo_stop(void* context) { void subghz_protocol_encoder_nice_flo_stop(void* context) {
SubGhzProtocolEncoderNiceFlo* instance = context; SubGhzProtocolEncoderNiceFlo* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_nice_flo_yield(void* context) { LevelDuration subghz_protocol_encoder_nice_flo_yield(void* context) {
SubGhzProtocolEncoderNiceFlo* instance = context; SubGhzProtocolEncoderNiceFlo* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -80,7 +80,7 @@ void* subghz_protocol_encoder_phoenix_v2_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 128; instance->encoder.size_upload = 128;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -151,7 +151,7 @@ bool subghz_protocol_encoder_phoenix_v2_deserialize(void* context, FlipperFormat
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_phoenix_v2_get_upload(instance); subghz_protocol_encoder_phoenix_v2_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -161,14 +161,14 @@ bool subghz_protocol_encoder_phoenix_v2_deserialize(void* context, FlipperFormat
void subghz_protocol_encoder_phoenix_v2_stop(void* context) { void subghz_protocol_encoder_phoenix_v2_stop(void* context) {
SubGhzProtocolEncoderPhoenix_V2* instance = context; SubGhzProtocolEncoderPhoenix_V2* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_phoenix_v2_yield(void* context) { LevelDuration subghz_protocol_encoder_phoenix_v2_yield(void* context) {
SubGhzProtocolEncoderPhoenix_V2* instance = context; SubGhzProtocolEncoderPhoenix_V2* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -87,7 +87,7 @@ void* subghz_protocol_encoder_power_smart_alloc(SubGhzEnvironment* environment)
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 1024; instance->encoder.size_upload = 1024;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -212,7 +212,7 @@ bool subghz_protocol_encoder_power_smart_deserialize(void* context, FlipperForma
subghz_protocol_power_smart_remote_controller(&instance->generic); subghz_protocol_power_smart_remote_controller(&instance->generic);
subghz_protocol_encoder_power_smart_get_upload(instance); subghz_protocol_encoder_power_smart_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -222,14 +222,14 @@ bool subghz_protocol_encoder_power_smart_deserialize(void* context, FlipperForma
void subghz_protocol_encoder_power_smart_stop(void* context) { void subghz_protocol_encoder_power_smart_stop(void* context) {
SubGhzProtocolEncoderPowerSmart* instance = context; SubGhzProtocolEncoderPowerSmart* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_power_smart_yield(void* context) { LevelDuration subghz_protocol_encoder_power_smart_yield(void* context) {
SubGhzProtocolEncoderPowerSmart* instance = context; SubGhzProtocolEncoderPowerSmart* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -89,7 +89,7 @@ void* subghz_protocol_encoder_princeton_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop) instance->encoder.size_upload = 52; //max 24bit*2 + 2 (start, stop)
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -168,7 +168,7 @@ bool subghz_protocol_encoder_princeton_deserialize(void* context, FlipperFormat*
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1); flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
subghz_protocol_encoder_princeton_get_upload(instance); subghz_protocol_encoder_princeton_get_upload(instance);
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -178,14 +178,14 @@ bool subghz_protocol_encoder_princeton_deserialize(void* context, FlipperFormat*
void subghz_protocol_encoder_princeton_stop(void* context) { void subghz_protocol_encoder_princeton_stop(void* context) {
SubGhzProtocolEncoderPrinceton* instance = context; SubGhzProtocolEncoderPrinceton* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_princeton_yield(void* context) { LevelDuration subghz_protocol_encoder_princeton_yield(void* context) {
SubGhzProtocolEncoderPrinceton* instance = context; SubGhzProtocolEncoderPrinceton* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -37,7 +37,7 @@ struct SubGhzProtocolDecoderRAW {
struct SubGhzProtocolEncoderRAW { struct SubGhzProtocolEncoderRAW {
SubGhzProtocolEncoderBase base; SubGhzProtocolEncoderBase base;
bool is_runing; bool is_running;
string_t file_name; string_t file_name;
SubGhzFileEncoderWorker* file_worker_encoder; SubGhzFileEncoderWorker* file_worker_encoder;
}; };
@ -269,13 +269,13 @@ void* subghz_protocol_encoder_raw_alloc(SubGhzEnvironment* environment) {
instance->base.protocol = &subghz_protocol_raw; instance->base.protocol = &subghz_protocol_raw;
string_init(instance->file_name); string_init(instance->file_name);
instance->is_runing = false; instance->is_running = false;
return instance; return instance;
} }
void subghz_protocol_encoder_raw_stop(void* context) { void subghz_protocol_encoder_raw_stop(void* context) {
SubGhzProtocolEncoderRAW* instance = context; SubGhzProtocolEncoderRAW* instance = context;
instance->is_runing = false; instance->is_running = false;
if(subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) { if(subghz_file_encoder_worker_is_running(instance->file_worker_encoder)) {
subghz_file_encoder_worker_stop(instance->file_worker_encoder); subghz_file_encoder_worker_stop(instance->file_worker_encoder);
subghz_file_encoder_worker_free(instance->file_worker_encoder); subghz_file_encoder_worker_free(instance->file_worker_encoder);
@ -308,11 +308,11 @@ static bool subghz_protocol_encoder_raw_worker_init(SubGhzProtocolEncoderRAW* in
instance->file_worker_encoder, string_get_cstr(instance->file_name))) { instance->file_worker_encoder, string_get_cstr(instance->file_name))) {
//the worker needs a file in order to open and read part of the file //the worker needs a file in order to open and read part of the file
furi_delay_ms(100); furi_delay_ms(100);
instance->is_runing = true; instance->is_running = true;
} else { } else {
subghz_protocol_encoder_raw_stop(instance); subghz_protocol_encoder_raw_stop(instance);
} }
return instance->is_runing; return instance->is_running;
} }
void subghz_protocol_raw_gen_fff_data(FlipperFormat* flipper_format, const char* file_path) { void subghz_protocol_raw_gen_fff_data(FlipperFormat* flipper_format, const char* file_path) {
@ -357,6 +357,6 @@ bool subghz_protocol_encoder_raw_deserialize(void* context, FlipperFormat* flipp
LevelDuration subghz_protocol_encoder_raw_yield(void* context) { LevelDuration subghz_protocol_encoder_raw_yield(void* context) {
SubGhzProtocolEncoderRAW* instance = context; SubGhzProtocolEncoderRAW* instance = context;
if(!instance->is_runing) return level_duration_reset(); if(!instance->is_running) return level_duration_reset();
return subghz_file_encoder_worker_get_level_duration(instance->file_worker_encoder); return subghz_file_encoder_worker_get_level_duration(instance->file_worker_encoder);
} }

View File

@ -210,7 +210,7 @@ static void subghz_protocol_scher_khan_check_remote_controller(
SubGhzBlockGeneric* instance, SubGhzBlockGeneric* instance,
const char** protocol_name) { const char** protocol_name) {
/* /*
* MAGICAR 51 bit 00000001A99121DE83C3 MAGIC CODE, Dinamic * MAGICAR 51 bit 00000001A99121DE83C3 MAGIC CODE, Dynamic
* 0E8C1619E830C -> 000011101000110000010110 0001 1001 1110 1000001100001100 * 0E8C1619E830C -> 000011101000110000010110 0001 1001 1110 1000001100001100
* 0E8C1629D830D -> 000011101000110000010110 0010 1001 1101 1000001100001101 * 0E8C1629D830D -> 000011101000110000010110 0010 1001 1101 1000001100001101
* 0E8C1649B830E -> 000011101000110000010110 0100 1001 1011 1000001100001110 * 0E8C1649B830E -> 000011101000110000010110 0100 1001 1011 1000001100001110
@ -222,8 +222,8 @@ static void subghz_protocol_scher_khan_check_remote_controller(
// case 35: //MAGIC CODE, Static // case 35: //MAGIC CODE, Static
// instance->protocol_name = "MAGIC CODE, Static"; // instance->protocol_name = "MAGIC CODE, Static";
// break; // break;
case 51: //MAGIC CODE, Dinamic case 51: //MAGIC CODE, Dynamic
*protocol_name = "MAGIC CODE, Dinamic"; *protocol_name = "MAGIC CODE, Dynamic";
instance->serial = ((instance->data >> 24) & 0xFFFFFF0) | ((instance->data >> 20) & 0x0F); instance->serial = ((instance->data >> 24) & 0xFFFFFF0) | ((instance->data >> 20) & 0x0F);
instance->btn = (instance->data >> 24) & 0x0F; instance->btn = (instance->data >> 24) & 0x0F;
instance->cnt = instance->data & 0xFFFF; instance->cnt = instance->data & 0xFFFF;

View File

@ -101,7 +101,7 @@ void* subghz_protocol_encoder_secplus_v1_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 128; instance->encoder.size_upload = 128;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -298,7 +298,7 @@ bool subghz_protocol_encoder_secplus_v1_deserialize(void* context, FlipperFormat
break; break;
} }
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -308,14 +308,14 @@ bool subghz_protocol_encoder_secplus_v1_deserialize(void* context, FlipperFormat
void subghz_protocol_encoder_secplus_v1_stop(void* context) { void subghz_protocol_encoder_secplus_v1_stop(void* context) {
SubGhzProtocolEncoderSecPlus_v1* instance = context; SubGhzProtocolEncoderSecPlus_v1* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_secplus_v1_yield(void* context) { LevelDuration subghz_protocol_encoder_secplus_v1_yield(void* context) {
SubGhzProtocolEncoderSecPlus_v1* instance = context; SubGhzProtocolEncoderSecPlus_v1* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }

View File

@ -93,7 +93,7 @@ void* subghz_protocol_encoder_secplus_v2_alloc(SubGhzEnvironment* environment) {
instance->encoder.repeat = 10; instance->encoder.repeat = 10;
instance->encoder.size_upload = 256; instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration)); instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return instance; return instance;
} }
@ -555,7 +555,7 @@ bool subghz_protocol_encoder_secplus_v2_deserialize(void* context, FlipperFormat
break; break;
} }
instance->encoder.is_runing = true; instance->encoder.is_running = true;
res = true; res = true;
} while(false); } while(false);
@ -565,14 +565,14 @@ bool subghz_protocol_encoder_secplus_v2_deserialize(void* context, FlipperFormat
void subghz_protocol_encoder_secplus_v2_stop(void* context) { void subghz_protocol_encoder_secplus_v2_stop(void* context) {
SubGhzProtocolEncoderSecPlus_v2* instance = context; SubGhzProtocolEncoderSecPlus_v2* instance = context;
instance->encoder.is_runing = false; instance->encoder.is_running = false;
} }
LevelDuration subghz_protocol_encoder_secplus_v2_yield(void* context) { LevelDuration subghz_protocol_encoder_secplus_v2_yield(void* context) {
SubGhzProtocolEncoderSecPlus_v2* instance = context; SubGhzProtocolEncoderSecPlus_v2* instance = context;
if(instance->encoder.repeat == 0 || !instance->encoder.is_runing) { if(instance->encoder.repeat == 0 || !instance->encoder.is_running) {
instance->encoder.is_runing = false; instance->encoder.is_running = false;
return level_duration_reset(); return level_duration_reset();
} }