Skip to content

Commit 4fd0ce3

Browse files
committed
fix dea mio formula
thanks @Leptopt1los for working on that instead of sleeping lol
1 parent 2872394 commit 4fd0ce3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/subghz/protocols/keeloq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static bool subghz_protocol_keeloq_gen_data(
255255
// Centurion -> no serial in hop, uses fixed value 0x1CE - normal learning
256256
} else if(strcmp(instance->manufacture_name, "Dea_Mio") == 0) {
257257
uint8_t first_disc_num = (instance->generic.serial >> 8) & 0xF;
258-
uint8_t result_disc = (0xC + ((first_disc_num % 4) ? 2 : 0));
258+
uint8_t result_disc = (0xC + (first_disc_num % 4));
259259
uint32_t dea_serial = (instance->generic.serial & 0xFF) |
260260
(((uint32_t)result_disc) << 8);
261261
decrypt = btn << 28 | (dea_serial & 0xFFF) << 16 | instance->generic.cnt;

0 commit comments

Comments
 (0)