Update faac_slh.c

This commit is contained in:
r3df0xx 2022-04-26 09:33:40 +03:00
parent 5ae4b16a38
commit 6bc0e05178

View File

@ -89,7 +89,7 @@ static void subghz_protocol_faac_slh_check_remote_controller
(SubGhzBlockGeneric* instance,
SubGhzKeystore* keystore,
const char** manufacture_name,
uint32_t* seed);
uint32_t seed);
void* subghz_protocol_encoder_faac_slh_alloc(SubGhzEnvironment* environment) {
SubGhzProtocolEncoderFaacSLH* instance = malloc(sizeof(SubGhzProtocolEncoderFaacSLH));
@ -184,7 +184,7 @@ bool subghz_protocol_faac_slh_create_data(
bool res = subghz_protocol_faac_slh_gen_data(instance, instance->generic.seed);
FURI_LOG_I(TAG, "SEED (create_data): %8X\n", instance->generic.seed);
if(res) {
subghz_protocol_faac_slh_check_remote_controller(&instance->generic, instance->keystore, &instance->manufacture_name, &instance->generic.seed);
subghz_protocol_faac_slh_check_remote_controller(&instance->generic, instance->keystore, &instance->manufacture_name, instance->generic.seed);
res = subghz_block_generic_serialize(&instance->generic, flipper_format, frequency, preset);
}
return res;
@ -249,7 +249,7 @@ bool subghz_protocol_encoder_faac_slh_deserialize(void* context, FlipperFormat*
}
subghz_protocol_faac_slh_check_remote_controller(
&instance->generic, instance->keystore, &instance->manufacture_name, &instance->generic.seed);
&instance->generic, instance->keystore, &instance->manufacture_name, instance->generic.seed);
//optional parameter parameter
flipper_format_read_uint32(
@ -401,10 +401,10 @@ static void subghz_protocol_faac_slh_check_remote_controller
(SubGhzBlockGeneric* instance,
SubGhzKeystore* keystore,
const char** manufacture_name,
uint32_t* seed) {
uint32_t seed) {
//uint64_t code_found_reverse =
//subghz_protocol_blocks_reverse_key(instance->data, instance->data_count_bit);
instance->seed = *seed;
instance->seed = seed;
FURI_LOG_I(TAG, "SEED (decrypt init): %8X\n", instance->seed);
uint32_t code_fix = instance->data >> 32;
uint32_t code_hop = instance->data & 0xFFFFFFFF;
@ -467,7 +467,7 @@ bool subghz_protocol_decoder_faac_slh_deserialize(void* context, FlipperFormat*
void subghz_protocol_decoder_faac_slh_get_string(void* context, string_t output) {
furi_assert(context);
SubGhzProtocolDecoderFaacSLH* instance = context;
subghz_protocol_faac_slh_check_remote_controller(&instance->generic, instance->keystore, &instance->manufacture_name, &instance->generic.seed);
subghz_protocol_faac_slh_check_remote_controller(&instance->generic, instance->keystore, &instance->manufacture_name, instance->generic.seed);
//uint64_t code_found_reverse = subghz_protocol_blocks_reverse_key(
//instance->generic.data, instance->generic.data_count_bit);
uint32_t code_fix = instance->generic.data >> 32;