update psa and fiat for less FP, add FM flag to some renault models
Build Dev Firmware / build (push) Canceled after 0s

This commit is contained in:
d4rks1d33 committed 2026-09-22 14:02:25 +00:00
1 parent cc413f2f08
commit 5e9232e4bc
4 files changed
+13 -3

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ const SubGhzProtocolEncoder subghz_protocol_fiat_v1_encoder = {
const SubGhzProtocol fiat_v1_protocol = {
.name = FIAT_V1_PROTOCOL_NAME,
.type = SubGhzProtocolTypeDynamic,
.flag = SubGhzProtocolFlag_315 | SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM |
.flag = SubGhzProtocolFlag_315 | SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_FM |
SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save |
SubGhzProtocolFlag_Send,
.decoder = &subghz_protocol_fiat_v1_decoder,
+1 -1
View File
@@ -156,7 +156,7 @@ const SubGhzProtocol* const subghz_protocol_registry_items[] = {
&ford_protocol_v2,
&ford_protocol_v3,
//&subghz_protocol_land_rover_v0,
&subghz_protocol_toyota,
//&subghz_protocol_toyota,
&honda_static_protocol,
&honda_v1_protocol,
&honda_v2_protocol,
+10
View File
@@ -761,6 +761,16 @@ static bool psa_am_varied(uint32_t hi, uint32_t lo) {
static bool psa_am_complete(SubGhzProtocolDecoderPSA* instance) {
if(instance->am_bits_len < 80) return false;
// A genuine PSA frame terminates at a DETERMINISTIC buffer length:
// 80 -> FM/state-2 path (64 key1 + 16 validation, then end marker)
// 88 -> AM/state-4 path (PSA_KEY2_BITS + 8 realignment slack)
// A Fiat/Marelli frame (Peugeot Boxer, Fiat Ducato, Citroen Jumper -- same
// Hitag2 PCF7946 hardware) is 102 bits of continuous Manchester, so PSA
// force-terminates it at random lengths (83/85/87/96...). Accept only the
// two PSA-native lengths so the Fiat V1 decoder claims the Marelli frames
// instead. (Fixes PSA/FiatV1 cross-detection.)
if(instance->am_bits_len != 80 && instance->am_bits_len != 88) return false;
uint8_t max_off = instance->am_bits_len - 80;
if(max_off > 8) max_off = 8;
+1 -1
View File
@@ -269,7 +269,7 @@ const SubGhzProtocol renault_v1_protocol = {
.name = RENAULT_PROTOCOL_V1_NAME,
.type = SubGhzProtocolTypeDynamic,
.flag = SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_315 | SubGhzProtocolFlag_433 |
SubGhzProtocolFlag_868 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Save |
SubGhzProtocolFlag_868 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_FM | SubGhzProtocolFlag_Save |
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Send,
.encoder = &subghz_protocol_renault_v1_encoder,