mirror of
https://github.com/D4C1-Labs/Flipper-ARF.git
synced 2026-10-23 09:12:20 +00:00
Update fiat_marelli.c
This commit is contained in:
1 parent
2571ad7f22
commit
19e2eaa554
1 file changed
+4
-3
@@ -242,9 +242,9 @@ void subghz_protocol_decoder_fiat_marelli_feed(void* context, bool level, uint32
|
||||
uint32_t te_short = instance->te_detected ? instance->te_detected
|
||||
: (uint32_t)subghz_protocol_fiat_marelli_const.te_short;
|
||||
uint32_t te_long = te_short * 2;
|
||||
// Delta must be wide enough for asymmetric timing (Type B pos~140us neg~68us)
|
||||
// but < te_short/2 to avoid short/long overlap
|
||||
uint32_t te_delta = te_short * 45 / 100;
|
||||
// Delta = te_short/2: maximum that avoids short/long overlap (boundary at 1.5*TE).
|
||||
// Must be this wide for Type B asymmetric timing (pos~140us, neg~68us, avg~100us).
|
||||
uint32_t te_delta = te_short / 2;
|
||||
if(te_delta < 30) te_delta = 30;
|
||||
uint32_t diff;
|
||||
|
||||
@@ -434,6 +434,7 @@ void subghz_protocol_decoder_fiat_marelli_feed(void* context, bool level, uint32
|
||||
instance->te_last = duration;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user