btn_is_available = true

This commit is contained in:
Dmitry422
2026-02-02 01:22:39 +07:00
parent 0eae6030b0
commit 1d32d1de5c
61 changed files with 675 additions and 332 deletions

View File

@@ -78,7 +78,7 @@ void* subghz_protocol_encoder_magellan_alloc(SubGhzEnvironment* environment) {
instance->base.protocol = &subghz_protocol_magellan;
instance->generic.protocol_name = instance->base.protocol->name;
instance->encoder.repeat = 10;
instance->encoder.repeat = 3;
instance->encoder.size_upload = 256;
instance->encoder.upload = malloc(instance->encoder.size_upload * sizeof(LevelDuration));
instance->encoder.is_running = false;
@@ -196,7 +196,7 @@ LevelDuration subghz_protocol_encoder_magellan_yield(void* context) {
LevelDuration ret = instance->encoder.upload[instance->encoder.front];
if(++instance->encoder.front == instance->encoder.size_upload) {
instance->encoder.repeat--;
if(!subghz_block_generic_global.endless_tx) instance->encoder.repeat--;
instance->encoder.front = 0;
}
@@ -499,6 +499,13 @@ void subghz_protocol_decoder_magellan_get_string(void* context, FuriString* outp
furi_assert(context);
SubGhzProtocolDecoderMagellan* instance = context;
subghz_protocol_magellan_check_remote_controller(&instance->generic);
// push protocol data to global variable
subghz_block_generic_global.btn_is_available = false;
subghz_block_generic_global.current_btn = instance->generic.btn;
subghz_block_generic_global.btn_length_bit = 8;
//
furi_string_cat_printf(
output,
"%s %dbit\r\n"