mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-19 20:34:19 -07:00
Hopefully fix honeywell sec protocol
This commit is contained in:
@@ -62,6 +62,8 @@ void subghz_protocol_decoder_honeywell_addbit(void* context, bool data) {
|
||||
instance->decoder.decode_data = (instance->decoder.decode_data << 1) | data;
|
||||
instance->decoder.decode_count_bit++;
|
||||
|
||||
if(instance->decoder.decode_count_bit < 62) return;
|
||||
|
||||
uint16_t preamble = (instance->decoder.decode_data >> 48) & 0xFFFF;
|
||||
//can be multiple, since flipper can't read it well..
|
||||
if(preamble == 0b0011111111111110 || preamble == 0b0111111111111110 ||
|
||||
@@ -76,8 +78,12 @@ void subghz_protocol_decoder_honeywell_addbit(void* context, bool data) {
|
||||
if(channel == 0x2 || channel == 0x4 || channel == 0xA) {
|
||||
// 2GIG brand
|
||||
crc_calc = subghz_protocol_honeywell_crc16(datatocrc, 4, 0x8050, 0);
|
||||
} else { // channel == 0x8
|
||||
} else if(channel == 0x8) {
|
||||
crc_calc = subghz_protocol_honeywell_crc16(datatocrc, 4, 0x8005, 0);
|
||||
} else {
|
||||
instance->decoder.decode_data = 0;
|
||||
instance->decoder.decode_count_bit = 0;
|
||||
return;
|
||||
}
|
||||
uint16_t crc = instance->decoder.decode_data & 0xFFFF;
|
||||
if(crc == crc_calc) {
|
||||
@@ -91,8 +97,14 @@ void subghz_protocol_decoder_honeywell_addbit(void* context, bool data) {
|
||||
instance->decoder.decode_data = 0;
|
||||
instance->decoder.decode_count_bit = 0;
|
||||
} else {
|
||||
instance->decoder.decode_data = 0;
|
||||
instance->decoder.decode_count_bit = 0;
|
||||
return;
|
||||
}
|
||||
} else if(instance->decoder.decode_count_bit >= 64) {
|
||||
instance->decoder.decode_data = 0;
|
||||
instance->decoder.decode_count_bit = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ const SubGhzProtocol* subghz_protocol_registry_items[] = {
|
||||
&subghz_protocol_bett,
|
||||
&subghz_protocol_doitrand,
|
||||
&subghz_protocol_phoenix_v2,
|
||||
&subghz_protocol_honeywell,
|
||||
&subghz_protocol_honeywell_wdb,
|
||||
&subghz_protocol_magellan,
|
||||
&subghz_protocol_intertechno_v3,
|
||||
@@ -66,7 +67,6 @@ const SubGhzProtocol* subghz_protocol_registry_items[] = {
|
||||
&tpms_protocol_schrader_gg4,
|
||||
&subghz_protocol_bin_raw,
|
||||
&subghz_protocol_mastercode,
|
||||
&subghz_protocol_honeywell,
|
||||
&subghz_protocol_x10,
|
||||
};
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "bett.h"
|
||||
#include "doitrand.h"
|
||||
#include "phoenix_v2.h"
|
||||
#include "honeywell.h"
|
||||
#include "honeywell_wdb.h"
|
||||
#include "magellan.h"
|
||||
#include "intertechno_v3.h"
|
||||
@@ -67,5 +68,4 @@
|
||||
#include "schrader_gg4.h"
|
||||
#include "bin_raw.h"
|
||||
#include "mastercode.h"
|
||||
#include "honeywell.h"
|
||||
#include "x10.h"
|
||||
|
||||
Reference in New Issue
Block a user