mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
Test FAAC 0x0 seed
This commit is contained in:
parent
7a80aaa5c8
commit
0af8bd1e8b
1 changed files with 18 additions and 41 deletions
|
@ -110,12 +110,7 @@ void subghz_protocol_encoder_faac_slh_free(void* context) {
|
|||
}
|
||||
|
||||
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance) {
|
||||
if(instance->generic.seed != 0x0) {
|
||||
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
|
||||
} else {
|
||||
// Do not generate new data, send data from buffer
|
||||
return true;
|
||||
}
|
||||
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
|
||||
uint32_t fix = instance->generic.serial << 4 | instance->generic.btn;
|
||||
uint32_t hop = 0;
|
||||
uint32_t decrypt = 0;
|
||||
|
@ -507,39 +502,21 @@ void subghz_protocol_decoder_faac_slh_get_string(void* context, FuriString* outp
|
|||
uint32_t code_fix = instance->generic.data >> 32;
|
||||
uint32_t code_hop = instance->generic.data & 0xFFFFFFFF;
|
||||
|
||||
if(instance->generic.seed == 0x0) {
|
||||
furi_string_cat_printf(
|
||||
output,
|
||||
"%s %dbit\r\n"
|
||||
"Key:%lX%08lX\r\n"
|
||||
"Fix:%08lX\r\n"
|
||||
"Hop:%08lX Btn:%X\r\n"
|
||||
"Sn:%07lX Sd:Unknown",
|
||||
instance->generic.protocol_name,
|
||||
instance->generic.data_count_bit,
|
||||
(uint32_t)(instance->generic.data >> 32),
|
||||
(uint32_t)instance->generic.data,
|
||||
code_fix,
|
||||
code_hop,
|
||||
instance->generic.btn,
|
||||
instance->generic.serial);
|
||||
} else {
|
||||
furi_string_cat_printf(
|
||||
output,
|
||||
"%s %dbit\r\n"
|
||||
"Key:%lX%08lX\r\n"
|
||||
"Fix:%08lX Cnt:%05lX\r\n"
|
||||
"Hop:%08lX Btn:%X\r\n"
|
||||
"Sn:%07lX Sd:%08lX",
|
||||
instance->generic.protocol_name,
|
||||
instance->generic.data_count_bit,
|
||||
(uint32_t)(instance->generic.data >> 32),
|
||||
(uint32_t)instance->generic.data,
|
||||
code_fix,
|
||||
instance->generic.cnt,
|
||||
code_hop,
|
||||
instance->generic.btn,
|
||||
instance->generic.serial,
|
||||
instance->generic.seed);
|
||||
}
|
||||
furi_string_cat_printf(
|
||||
output,
|
||||
"%s %dbit\r\n"
|
||||
"Key:%lX%08lX\r\n"
|
||||
"Fix:%08lX Cnt:%05lX\r\n"
|
||||
"Hop:%08lX Btn:%X\r\n"
|
||||
"Sn:%07lX Sd:%08lX",
|
||||
instance->generic.protocol_name,
|
||||
instance->generic.data_count_bit,
|
||||
(uint32_t)(instance->generic.data >> 32),
|
||||
(uint32_t)instance->generic.data,
|
||||
code_fix,
|
||||
instance->generic.cnt,
|
||||
code_hop,
|
||||
instance->generic.btn,
|
||||
instance->generic.serial,
|
||||
instance->generic.seed);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue