mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-16 01:02:32 +03:00
Update faac_slh.c
Global seed value
This commit is contained in:
parent
5b47c38ab0
commit
e3dd0dc03b
@ -78,6 +78,8 @@ const SubGhzProtocol subghz_protocol_faac_slh = {
|
||||
.encoder = &subghz_protocol_faac_slh_encoder,
|
||||
};
|
||||
|
||||
static uint32_t seed_global;
|
||||
|
||||
/**
|
||||
* Analysis of received data
|
||||
* @param instance Pointer to a SubGhzBlockGeneric* instance
|
||||
@ -176,6 +178,7 @@ bool subghz_protocol_faac_slh_create_data(
|
||||
instance->generic.btn = btn;
|
||||
instance->generic.cnt = cnt;
|
||||
instance->generic.seed = seed;
|
||||
seed_global = instance->generic.seed;
|
||||
instance->manufacture_name = manufacture_name;
|
||||
instance->generic.data_count_bit = 64;
|
||||
bool res = subghz_protocol_faac_slh_gen_data(instance);
|
||||
@ -396,11 +399,14 @@ void subghz_protocol_decoder_faac_slh_feed(void* context, bool level, uint32_t d
|
||||
/**
|
||||
* Analysis of received data
|
||||
* @param instance Pointer to a SubGhzBlockGeneric* instance
|
||||
* @param keystore Pointer to a SubGhzKeystore* instance
|
||||
* @param manifacture_name Manufacturer name
|
||||
*/
|
||||
static void subghz_protocol_faac_slh_check_remote_controller
|
||||
(SubGhzBlockGeneric* instance,
|
||||
SubGhzKeystore* keystore,
|
||||
const char** manufacture_name) {
|
||||
instance->seed = seed_global;
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user