From a9972e6af218dcfdfb8c915eb56029452274eea4 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Mon, 2 Feb 2026 20:47:20 +0300 Subject: [PATCH] add fix for phox --- lib/subghz/protocols/phoenix_v2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/subghz/protocols/phoenix_v2.c b/lib/subghz/protocols/phoenix_v2.c index 56a65bc8c..2dc199795 100644 --- a/lib/subghz/protocols/phoenix_v2.c +++ b/lib/subghz/protocols/phoenix_v2.c @@ -118,9 +118,11 @@ bool subghz_protocol_phoenix_v2_create_data( local_data_rev, instance->generic.cnt); instance->generic.data = subghz_protocol_blocks_reverse_key( - (uint64_t)(((uint64_t)encrypted_counter << 40) | ((uint64_t)instance->generic.btn << 32) | - (uint64_t)instance->generic.serial), - instance->generic.data_count_bit + 4); + (uint64_t)(((uint64_t)encrypted_counter << 40) | + ((uint64_t)instance->generic.btn << 32) | + (uint64_t)instance->generic.serial), + instance->generic.data_count_bit + 4) & + 0xFFFFFFFFFFFFF; return SubGhzProtocolStatusOk == subghz_block_generic_serialize(&instance->generic, flipper_format, preset);