mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
SubGhz: bugfix unable to send, new generated secplus_v2 protocol (#2488)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
d12f76dacb
commit
3a242e5fc3
2 changed files with 8 additions and 5 deletions
|
@ -182,7 +182,9 @@ bool subghz_protocol_keeloq_create_data(
|
|||
instance->generic.data_count_bit = 64;
|
||||
bool res = subghz_protocol_keeloq_gen_data(instance, btn);
|
||||
if(res) {
|
||||
res = subghz_block_generic_serialize(&instance->generic, flipper_format, preset);
|
||||
if(subghz_block_generic_serialize(&instance->generic, flipper_format, preset) !=
|
||||
SubGhzProtocolStatusOk)
|
||||
res = false;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -599,19 +599,20 @@ bool subghz_protocol_secplus_v2_create_data(
|
|||
instance->generic.data_count_bit =
|
||||
(uint8_t)subghz_protocol_secplus_v2_const.min_count_bit_for_found;
|
||||
subghz_protocol_secplus_v2_encode(instance);
|
||||
bool res = subghz_block_generic_serialize(&instance->generic, flipper_format, preset);
|
||||
SubGhzProtocolStatus res =
|
||||
subghz_block_generic_serialize(&instance->generic, flipper_format, preset);
|
||||
|
||||
uint8_t key_data[sizeof(uint64_t)] = {0};
|
||||
for(size_t i = 0; i < sizeof(uint64_t); i++) {
|
||||
key_data[sizeof(uint64_t) - i - 1] = (instance->secplus_packet_1 >> (i * 8)) & 0xFF;
|
||||
}
|
||||
|
||||
if(res &&
|
||||
if((res == SubGhzProtocolStatusOk) &&
|
||||
!flipper_format_write_hex(flipper_format, "Secplus_packet_1", key_data, sizeof(uint64_t))) {
|
||||
FURI_LOG_E(TAG, "Unable to add Secplus_packet_1");
|
||||
res = false;
|
||||
res = SubGhzProtocolStatusErrorParserOthers;
|
||||
}
|
||||
return res;
|
||||
return res == SubGhzProtocolStatusOk;
|
||||
}
|
||||
|
||||
void* subghz_protocol_decoder_secplus_v2_alloc(SubGhzEnvironment* environment) {
|
||||
|
|
Loading…
Reference in a new issue