mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-27 15:00:46 +00:00
Update faac_slh.c
This commit is contained in:
parent
bb40522463
commit
5ce7c0a7b8
1 changed files with 4 additions and 0 deletions
|
@ -113,6 +113,7 @@ void subghz_protocol_encoder_faac_slh_free(void* context) {
|
|||
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance, uint32_t seed) {
|
||||
instance->generic.cnt++;
|
||||
instance->generic.seed = seed;
|
||||
FURI_LOG_I(TAG, "SEED (gen_data): %8X\n", instance->generic.seed);
|
||||
uint32_t fix = instance->generic.serial << 4 | instance->generic.btn;
|
||||
uint32_t hop = 0;
|
||||
uint32_t decrypt = 0;
|
||||
|
@ -143,6 +144,7 @@ static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* inst
|
|||
uint32_t hi = manufacture_code->key >> 32;
|
||||
uint32_t lo = manufacture_code->key & 0xFFFFFFFF;
|
||||
FURI_LOG_I(TAG, "mfkey: %08lX%08lX mf: %s\n", hi, lo, manufacture_code->name);
|
||||
FURI_LOG_I(TAG, "SEED (encrypt): %8X\n", instance->generic.seed);
|
||||
uint32_t mlhi = man >> 32;
|
||||
uint32_t mllo = man & 0xFFFFFFFF;
|
||||
FURI_LOG_I(TAG, "man_learning: %8X%8X\n", mlhi, mllo);
|
||||
|
@ -178,6 +180,7 @@ bool subghz_protocol_faac_slh_create_data(
|
|||
instance->manufacture_name = manufacture_name;
|
||||
instance->generic.data_count_bit = 64;
|
||||
bool res = subghz_protocol_faac_slh_gen_data(instance, instance->generic.seed);
|
||||
FURI_LOG_I(TAG, "SEED: %8X\n", instance->generic.seed);
|
||||
if(res) {
|
||||
res =
|
||||
subghz_block_generic_serialize(&instance->generic, flipper_format, frequency, preset);
|
||||
|
@ -414,6 +417,7 @@ static void subghz_protocol_faac_slh_check_remote_controller
|
|||
// FAAC Learning
|
||||
man = subghz_protocol_keeloq_common_faac_learning(instance->seed, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %08lX%08lX mf: %s\n", hi, lo, manufacture_code->name);
|
||||
FURI_LOG_I(TAG, "SEED (decrypt): %8X\n", instance->seed);
|
||||
uint32_t mlhi = man >> 32;
|
||||
uint32_t mllo = man & 0xFFFFFFFF;
|
||||
FURI_LOG_I(TAG, "man_learning: %8X%8X\n", mlhi, mllo);
|
||||
|
|
Loading…
Reference in a new issue