mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
Update faac_slh.c
This commit is contained in:
parent
186b12580e
commit
bb40522463
1 changed files with 4 additions and 3 deletions
|
@ -110,8 +110,9 @@ void subghz_protocol_encoder_faac_slh_free(void* context) {
|
||||||
free(instance);
|
free(instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance) {
|
static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* instance, uint32_t seed) {
|
||||||
instance->generic.cnt++;
|
instance->generic.cnt++;
|
||||||
|
instance->generic.seed = seed;
|
||||||
uint32_t fix = instance->generic.serial << 4 | instance->generic.btn;
|
uint32_t fix = instance->generic.serial << 4 | instance->generic.btn;
|
||||||
uint32_t hop = 0;
|
uint32_t hop = 0;
|
||||||
uint32_t decrypt = 0;
|
uint32_t decrypt = 0;
|
||||||
|
@ -176,7 +177,7 @@ bool subghz_protocol_faac_slh_create_data(
|
||||||
instance->generic.seed = seed;
|
instance->generic.seed = seed;
|
||||||
instance->manufacture_name = manufacture_name;
|
instance->manufacture_name = manufacture_name;
|
||||||
instance->generic.data_count_bit = 64;
|
instance->generic.data_count_bit = 64;
|
||||||
bool res = subghz_protocol_faac_slh_gen_data(instance);
|
bool res = subghz_protocol_faac_slh_gen_data(instance, instance->generic.seed);
|
||||||
if(res) {
|
if(res) {
|
||||||
res =
|
res =
|
||||||
subghz_block_generic_serialize(&instance->generic, flipper_format, frequency, preset);
|
subghz_block_generic_serialize(&instance->generic, flipper_format, frequency, preset);
|
||||||
|
@ -193,7 +194,7 @@ static bool
|
||||||
subghz_protocol_encoder_faac_slh_get_upload(SubGhzProtocolEncoderFaacSLH* instance) {
|
subghz_protocol_encoder_faac_slh_get_upload(SubGhzProtocolEncoderFaacSLH* instance) {
|
||||||
furi_assert(instance);
|
furi_assert(instance);
|
||||||
|
|
||||||
subghz_protocol_faac_slh_gen_data(instance);
|
subghz_protocol_faac_slh_gen_data(instance, instance->generic.seed);
|
||||||
size_t index = 0;
|
size_t index = 0;
|
||||||
size_t size_upload = 2 + (instance->generic.data_count_bit * 2);
|
size_t size_upload = 2 + (instance->generic.data_count_bit * 2);
|
||||||
if(size_upload > instance->encoder.size_upload) {
|
if(size_upload > instance->encoder.size_upload) {
|
||||||
|
|
Loading…
Reference in a new issue