From ab86ef8b48aba8d8202adac7dfc97a27417012e5 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 14 Mar 2024 01:12:32 +0000 Subject: [PATCH] SubGHz: Fix hashes compat for apps (eg. Weather) --- lib/subghz/protocols/acurite_592txr.c | 3 ++- lib/subghz/protocols/acurite_606tx.c | 3 ++- lib/subghz/protocols/acurite_609txc.c | 3 ++- lib/subghz/protocols/acurite_986.c | 3 ++- lib/subghz/protocols/alutech_at_4n.c | 3 ++- lib/subghz/protocols/ambient_weather.c | 3 ++- lib/subghz/protocols/ansonic.c | 3 ++- lib/subghz/protocols/auriol_ahfl.c | 3 ++- lib/subghz/protocols/auriol_hg0601a.c | 3 ++- lib/subghz/protocols/base.c | 18 +++++++++++------- lib/subghz/protocols/bett.c | 3 ++- lib/subghz/protocols/bin_raw.c | 3 ++- lib/subghz/protocols/came.c | 3 ++- lib/subghz/protocols/came_atomo.c | 3 ++- lib/subghz/protocols/came_twee.c | 3 ++- lib/subghz/protocols/chamberlain_code.c | 3 ++- lib/subghz/protocols/clemsa.c | 3 ++- lib/subghz/protocols/doitrand.c | 3 ++- lib/subghz/protocols/dooya.c | 3 ++- lib/subghz/protocols/faac_slh.c | 3 ++- lib/subghz/protocols/gate_tx.c | 3 ++- lib/subghz/protocols/gt_wt_02.c | 3 ++- lib/subghz/protocols/gt_wt_03.c | 3 ++- lib/subghz/protocols/holtek.c | 3 ++- lib/subghz/protocols/holtek_ht12x.c | 3 ++- lib/subghz/protocols/honeywell.c | 3 ++- lib/subghz/protocols/honeywell_wdb.c | 3 ++- lib/subghz/protocols/hormann.c | 3 ++- lib/subghz/protocols/ido.c | 3 ++- lib/subghz/protocols/infactory.c | 3 ++- lib/subghz/protocols/intertechno_v3.c | 3 ++- lib/subghz/protocols/kedsum_th.c | 3 ++- lib/subghz/protocols/keeloq.c | 3 ++- lib/subghz/protocols/kia.c | 3 ++- lib/subghz/protocols/kinggates_stylo_4k.c | 3 ++- lib/subghz/protocols/lacrosse_tx.c | 3 ++- lib/subghz/protocols/lacrosse_tx141thbv2.c | 3 ++- lib/subghz/protocols/linear.c | 3 ++- lib/subghz/protocols/linear_delta3.c | 3 ++- lib/subghz/protocols/magellan.c | 3 ++- lib/subghz/protocols/marantec.c | 3 ++- lib/subghz/protocols/mastercode.c | 3 ++- lib/subghz/protocols/megacode.c | 3 ++- lib/subghz/protocols/nero_radio.c | 3 ++- lib/subghz/protocols/nero_sketch.c | 3 ++- lib/subghz/protocols/nexus_th.c | 3 ++- lib/subghz/protocols/nice_flo.c | 3 ++- lib/subghz/protocols/nice_flor_s.c | 3 ++- lib/subghz/protocols/oregon2.c | 3 ++- lib/subghz/protocols/oregon3.c | 3 ++- lib/subghz/protocols/oregon_v1.c | 3 ++- lib/subghz/protocols/phoenix_v2.c | 3 ++- lib/subghz/protocols/pocsag.c | 3 ++- lib/subghz/protocols/power_smart.c | 3 ++- lib/subghz/protocols/princeton.c | 3 ++- lib/subghz/protocols/raw.c | 1 + lib/subghz/protocols/scher_khan.c | 3 ++- lib/subghz/protocols/schrader_gg4.c | 3 ++- lib/subghz/protocols/secplus_v1.c | 3 ++- lib/subghz/protocols/secplus_v2.c | 3 ++- lib/subghz/protocols/smc5326.c | 3 ++- lib/subghz/protocols/somfy_keytis.c | 3 ++- lib/subghz/protocols/somfy_telis.c | 3 ++- lib/subghz/protocols/star_line.c | 3 ++- lib/subghz/protocols/thermopro_tx4.c | 3 ++- lib/subghz/protocols/tx_8300.c | 3 ++- lib/subghz/protocols/wendox_w6726.c | 3 ++- lib/subghz/protocols/x10.c | 3 ++- lib/subghz/types.h | 5 ++++- 69 files changed, 148 insertions(+), 74 deletions(-) diff --git a/lib/subghz/protocols/acurite_592txr.c b/lib/subghz/protocols/acurite_592txr.c index 44c8761c70..f8a2b0bf02 100644 --- a/lib/subghz/protocols/acurite_592txr.c +++ b/lib/subghz/protocols/acurite_592txr.c @@ -67,7 +67,8 @@ const SubGhzProtocolDecoder ws_protocol_acurite_592txr_decoder = { .feed = ws_protocol_decoder_acurite_592txr_feed, .reset = ws_protocol_decoder_acurite_592txr_reset, - .get_hash_data = ws_protocol_decoder_acurite_592txr_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_acurite_592txr_get_hash_data, .serialize = ws_protocol_decoder_acurite_592txr_serialize, .deserialize = ws_protocol_decoder_acurite_592txr_deserialize, .get_string = ws_protocol_decoder_acurite_592txr_get_string, diff --git a/lib/subghz/protocols/acurite_606tx.c b/lib/subghz/protocols/acurite_606tx.c index 0f14c7db41..209b77acec 100644 --- a/lib/subghz/protocols/acurite_606tx.c +++ b/lib/subghz/protocols/acurite_606tx.c @@ -50,7 +50,8 @@ const SubGhzProtocolDecoder ws_protocol_acurite_606tx_decoder = { .feed = ws_protocol_decoder_acurite_606tx_feed, .reset = ws_protocol_decoder_acurite_606tx_reset, - .get_hash_data = ws_protocol_decoder_acurite_606tx_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_acurite_606tx_get_hash_data, .serialize = ws_protocol_decoder_acurite_606tx_serialize, .deserialize = ws_protocol_decoder_acurite_606tx_deserialize, .get_string = ws_protocol_decoder_acurite_606tx_get_string, diff --git a/lib/subghz/protocols/acurite_609txc.c b/lib/subghz/protocols/acurite_609txc.c index 8c082aace9..e885cb4215 100644 --- a/lib/subghz/protocols/acurite_609txc.c +++ b/lib/subghz/protocols/acurite_609txc.c @@ -51,7 +51,8 @@ const SubGhzProtocolDecoder ws_protocol_acurite_609txc_decoder = { .feed = ws_protocol_decoder_acurite_609txc_feed, .reset = ws_protocol_decoder_acurite_609txc_reset, - .get_hash_data = ws_protocol_decoder_acurite_609txc_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_acurite_609txc_get_hash_data, .serialize = ws_protocol_decoder_acurite_609txc_serialize, .deserialize = ws_protocol_decoder_acurite_609txc_deserialize, .get_string = ws_protocol_decoder_acurite_609txc_get_string, diff --git a/lib/subghz/protocols/acurite_986.c b/lib/subghz/protocols/acurite_986.c index ba64dc22e2..5ddab0cd78 100644 --- a/lib/subghz/protocols/acurite_986.c +++ b/lib/subghz/protocols/acurite_986.c @@ -57,7 +57,8 @@ const SubGhzProtocolDecoder ws_protocol_acurite_986_decoder = { .feed = ws_protocol_decoder_acurite_986_feed, .reset = ws_protocol_decoder_acurite_986_reset, - .get_hash_data = ws_protocol_decoder_acurite_986_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_acurite_986_get_hash_data, .serialize = ws_protocol_decoder_acurite_986_serialize, .deserialize = ws_protocol_decoder_acurite_986_deserialize, .get_string = ws_protocol_decoder_acurite_986_get_string, diff --git a/lib/subghz/protocols/alutech_at_4n.c b/lib/subghz/protocols/alutech_at_4n.c index 0f29293f96..5b7976ad99 100644 --- a/lib/subghz/protocols/alutech_at_4n.c +++ b/lib/subghz/protocols/alutech_at_4n.c @@ -54,7 +54,8 @@ const SubGhzProtocolDecoder subghz_protocol_alutech_at_4n_decoder = { .feed = subghz_protocol_decoder_alutech_at_4n_feed, .reset = subghz_protocol_decoder_alutech_at_4n_reset, - .get_hash_data = subghz_protocol_decoder_alutech_at_4n_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_alutech_at_4n_get_hash_data, .serialize = subghz_protocol_decoder_alutech_at_4n_serialize, .deserialize = subghz_protocol_decoder_alutech_at_4n_deserialize, .get_string = subghz_protocol_decoder_alutech_at_4n_get_string, diff --git a/lib/subghz/protocols/ambient_weather.c b/lib/subghz/protocols/ambient_weather.c index 33844c4056..a18627404d 100644 --- a/lib/subghz/protocols/ambient_weather.c +++ b/lib/subghz/protocols/ambient_weather.c @@ -65,7 +65,8 @@ const SubGhzProtocolDecoder ws_protocol_ambient_weather_decoder = { .feed = ws_protocol_decoder_ambient_weather_feed, .reset = ws_protocol_decoder_ambient_weather_reset, - .get_hash_data = ws_protocol_decoder_ambient_weather_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_ambient_weather_get_hash_data, .serialize = ws_protocol_decoder_ambient_weather_serialize, .deserialize = ws_protocol_decoder_ambient_weather_deserialize, .get_string = ws_protocol_decoder_ambient_weather_get_string, diff --git a/lib/subghz/protocols/ansonic.c b/lib/subghz/protocols/ansonic.c index 571b0ad99f..1c91815c61 100644 --- a/lib/subghz/protocols/ansonic.c +++ b/lib/subghz/protocols/ansonic.c @@ -49,7 +49,8 @@ const SubGhzProtocolDecoder subghz_protocol_ansonic_decoder = { .feed = subghz_protocol_decoder_ansonic_feed, .reset = subghz_protocol_decoder_ansonic_reset, - .get_hash_data = subghz_protocol_decoder_ansonic_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_ansonic_get_hash_data, .serialize = subghz_protocol_decoder_ansonic_serialize, .deserialize = subghz_protocol_decoder_ansonic_deserialize, .get_string = subghz_protocol_decoder_ansonic_get_string, diff --git a/lib/subghz/protocols/auriol_ahfl.c b/lib/subghz/protocols/auriol_ahfl.c index 4be9f8b005..209068d8dd 100644 --- a/lib/subghz/protocols/auriol_ahfl.c +++ b/lib/subghz/protocols/auriol_ahfl.c @@ -62,7 +62,8 @@ const SubGhzProtocolDecoder ws_protocol_auriol_ahfl_decoder = { .feed = ws_protocol_decoder_auriol_ahfl_feed, .reset = ws_protocol_decoder_auriol_ahfl_reset, - .get_hash_data = ws_protocol_decoder_auriol_ahfl_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_auriol_ahfl_get_hash_data, .serialize = ws_protocol_decoder_auriol_ahfl_serialize, .deserialize = ws_protocol_decoder_auriol_ahfl_deserialize, .get_string = ws_protocol_decoder_auriol_ahfl_get_string, diff --git a/lib/subghz/protocols/auriol_hg0601a.c b/lib/subghz/protocols/auriol_hg0601a.c index 543b7a2a78..26a51ad261 100644 --- a/lib/subghz/protocols/auriol_hg0601a.c +++ b/lib/subghz/protocols/auriol_hg0601a.c @@ -61,7 +61,8 @@ const SubGhzProtocolDecoder ws_protocol_auriol_th_decoder = { .feed = ws_protocol_decoder_auriol_th_feed, .reset = ws_protocol_decoder_auriol_th_reset, - .get_hash_data = ws_protocol_decoder_auriol_th_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_auriol_th_get_hash_data, .serialize = ws_protocol_decoder_auriol_th_serialize, .deserialize = ws_protocol_decoder_auriol_th_deserialize, .get_string = ws_protocol_decoder_auriol_th_get_string, diff --git a/lib/subghz/protocols/base.c b/lib/subghz/protocols/base.c index 716ee9299b..463b95c89f 100644 --- a/lib/subghz/protocols/base.c +++ b/lib/subghz/protocols/base.c @@ -52,12 +52,14 @@ SubGhzProtocolStatus subghz_protocol_decoder_base_deserialize( uint8_t subghz_protocol_decoder_base_get_hash_data(SubGhzProtocolDecoderBase* decoder_base) { uint8_t hash = 0; + if(!decoder_base->protocol || !decoder_base->protocol->decoder) return hash; - if(decoder_base->protocol && decoder_base->protocol->decoder && - decoder_base->protocol->decoder->get_hash_data) { - uint32_t full = decoder_base->protocol->decoder->get_hash_data(decoder_base); - uint8_t* p = (uint8_t*)&full; - for(size_t i = 0; i < sizeof(full); i++) { + if(decoder_base->protocol->decoder->get_hash_data) { + hash = decoder_base->protocol->decoder->get_hash_data(decoder_base); + } else if(decoder_base->protocol->decoder->get_hash_data_long) { + uint32_t long_hash = decoder_base->protocol->decoder->get_hash_data_long(decoder_base); + uint8_t* p = (uint8_t*)&long_hash; + for(size_t i = 0; i < sizeof(long_hash); i++) { hash ^= p[i]; } } @@ -67,10 +69,12 @@ uint8_t subghz_protocol_decoder_base_get_hash_data(SubGhzProtocolDecoderBase* de uint32_t subghz_protocol_decoder_base_get_hash_data_long(SubGhzProtocolDecoderBase* decoder_base) { uint32_t hash = 0; + if(!decoder_base->protocol || !decoder_base->protocol->decoder) return hash; - if(decoder_base->protocol && decoder_base->protocol->decoder && - decoder_base->protocol->decoder->get_hash_data) { + if(decoder_base->protocol->decoder->get_hash_data) { hash = decoder_base->protocol->decoder->get_hash_data(decoder_base); + } else if(decoder_base->protocol->decoder->get_hash_data_long) { + hash = decoder_base->protocol->decoder->get_hash_data_long(decoder_base); } return hash; diff --git a/lib/subghz/protocols/bett.c b/lib/subghz/protocols/bett.c index 054f41ceb5..c310e78e9e 100644 --- a/lib/subghz/protocols/bett.c +++ b/lib/subghz/protocols/bett.c @@ -59,7 +59,8 @@ const SubGhzProtocolDecoder subghz_protocol_bett_decoder = { .feed = subghz_protocol_decoder_bett_feed, .reset = subghz_protocol_decoder_bett_reset, - .get_hash_data = subghz_protocol_decoder_bett_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_bett_get_hash_data, .serialize = subghz_protocol_decoder_bett_serialize, .deserialize = subghz_protocol_decoder_bett_deserialize, .get_string = subghz_protocol_decoder_bett_get_string, diff --git a/lib/subghz/protocols/bin_raw.c b/lib/subghz/protocols/bin_raw.c index 58ec69cb7a..d78c079ff2 100644 --- a/lib/subghz/protocols/bin_raw.c +++ b/lib/subghz/protocols/bin_raw.c @@ -96,7 +96,8 @@ const SubGhzProtocolDecoder subghz_protocol_bin_raw_decoder = { .feed = subghz_protocol_decoder_bin_raw_feed, .reset = subghz_protocol_decoder_bin_raw_reset, - .get_hash_data = subghz_protocol_decoder_bin_raw_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_bin_raw_get_hash_data, .serialize = subghz_protocol_decoder_bin_raw_serialize, .deserialize = subghz_protocol_decoder_bin_raw_deserialize, .get_string = subghz_protocol_decoder_bin_raw_get_string, diff --git a/lib/subghz/protocols/came.c b/lib/subghz/protocols/came.c index 74ff42f4db..b40e2fefc5 100644 --- a/lib/subghz/protocols/came.c +++ b/lib/subghz/protocols/came.c @@ -55,7 +55,8 @@ const SubGhzProtocolDecoder subghz_protocol_came_decoder = { .feed = subghz_protocol_decoder_came_feed, .reset = subghz_protocol_decoder_came_reset, - .get_hash_data = subghz_protocol_decoder_came_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_came_get_hash_data, .serialize = subghz_protocol_decoder_came_serialize, .deserialize = subghz_protocol_decoder_came_deserialize, .get_string = subghz_protocol_decoder_came_get_string, diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index 4ad5ac060c..c1d3321313 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -46,7 +46,8 @@ const SubGhzProtocolDecoder subghz_protocol_came_atomo_decoder = { .feed = subghz_protocol_decoder_came_atomo_feed, .reset = subghz_protocol_decoder_came_atomo_reset, - .get_hash_data = subghz_protocol_decoder_came_atomo_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_came_atomo_get_hash_data, .serialize = subghz_protocol_decoder_came_atomo_serialize, .deserialize = subghz_protocol_decoder_came_atomo_deserialize, .get_string = subghz_protocol_decoder_came_atomo_get_string, diff --git a/lib/subghz/protocols/came_twee.c b/lib/subghz/protocols/came_twee.c index 113343fecd..1993e021bc 100644 --- a/lib/subghz/protocols/came_twee.c +++ b/lib/subghz/protocols/came_twee.c @@ -77,7 +77,8 @@ const SubGhzProtocolDecoder subghz_protocol_came_twee_decoder = { .feed = subghz_protocol_decoder_came_twee_feed, .reset = subghz_protocol_decoder_came_twee_reset, - .get_hash_data = subghz_protocol_decoder_came_twee_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_came_twee_get_hash_data, .serialize = subghz_protocol_decoder_came_twee_serialize, .deserialize = subghz_protocol_decoder_came_twee_deserialize, .get_string = subghz_protocol_decoder_came_twee_get_string, diff --git a/lib/subghz/protocols/chamberlain_code.c b/lib/subghz/protocols/chamberlain_code.c index 53ec200881..7c200e92be 100644 --- a/lib/subghz/protocols/chamberlain_code.c +++ b/lib/subghz/protocols/chamberlain_code.c @@ -73,7 +73,8 @@ const SubGhzProtocolDecoder subghz_protocol_chamb_code_decoder = { .feed = subghz_protocol_decoder_chamb_code_feed, .reset = subghz_protocol_decoder_chamb_code_reset, - .get_hash_data = subghz_protocol_decoder_chamb_code_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_chamb_code_get_hash_data, .serialize = subghz_protocol_decoder_chamb_code_serialize, .deserialize = subghz_protocol_decoder_chamb_code_deserialize, .get_string = subghz_protocol_decoder_chamb_code_get_string, diff --git a/lib/subghz/protocols/clemsa.c b/lib/subghz/protocols/clemsa.c index b558f6a9eb..f3dd32b922 100644 --- a/lib/subghz/protocols/clemsa.c +++ b/lib/subghz/protocols/clemsa.c @@ -58,7 +58,8 @@ const SubGhzProtocolDecoder subghz_protocol_clemsa_decoder = { .feed = subghz_protocol_decoder_clemsa_feed, .reset = subghz_protocol_decoder_clemsa_reset, - .get_hash_data = subghz_protocol_decoder_clemsa_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_clemsa_get_hash_data, .serialize = subghz_protocol_decoder_clemsa_serialize, .deserialize = subghz_protocol_decoder_clemsa_deserialize, .get_string = subghz_protocol_decoder_clemsa_get_string, diff --git a/lib/subghz/protocols/doitrand.c b/lib/subghz/protocols/doitrand.c index d9572c0f17..8e8d73e8c6 100644 --- a/lib/subghz/protocols/doitrand.c +++ b/lib/subghz/protocols/doitrand.c @@ -50,7 +50,8 @@ const SubGhzProtocolDecoder subghz_protocol_doitrand_decoder = { .feed = subghz_protocol_decoder_doitrand_feed, .reset = subghz_protocol_decoder_doitrand_reset, - .get_hash_data = subghz_protocol_decoder_doitrand_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_doitrand_get_hash_data, .serialize = subghz_protocol_decoder_doitrand_serialize, .deserialize = subghz_protocol_decoder_doitrand_deserialize, .get_string = subghz_protocol_decoder_doitrand_get_string, diff --git a/lib/subghz/protocols/dooya.c b/lib/subghz/protocols/dooya.c index f847be9b81..1c2c1d6cdd 100644 --- a/lib/subghz/protocols/dooya.c +++ b/lib/subghz/protocols/dooya.c @@ -44,7 +44,8 @@ const SubGhzProtocolDecoder subghz_protocol_dooya_decoder = { .feed = subghz_protocol_decoder_dooya_feed, .reset = subghz_protocol_decoder_dooya_reset, - .get_hash_data = subghz_protocol_decoder_dooya_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_dooya_get_hash_data, .serialize = subghz_protocol_decoder_dooya_serialize, .deserialize = subghz_protocol_decoder_dooya_deserialize, .get_string = subghz_protocol_decoder_dooya_get_string, diff --git a/lib/subghz/protocols/faac_slh.c b/lib/subghz/protocols/faac_slh.c index d90f304feb..51f82fe8d2 100644 --- a/lib/subghz/protocols/faac_slh.c +++ b/lib/subghz/protocols/faac_slh.c @@ -65,7 +65,8 @@ const SubGhzProtocolDecoder subghz_protocol_faac_slh_decoder = { .feed = subghz_protocol_decoder_faac_slh_feed, .reset = subghz_protocol_decoder_faac_slh_reset, - .get_hash_data = subghz_protocol_decoder_faac_slh_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_faac_slh_get_hash_data, .serialize = subghz_protocol_decoder_faac_slh_serialize, .deserialize = subghz_protocol_decoder_faac_slh_deserialize, .get_string = subghz_protocol_decoder_faac_slh_get_string, diff --git a/lib/subghz/protocols/gate_tx.c b/lib/subghz/protocols/gate_tx.c index bfff90e115..b85e1e1b55 100644 --- a/lib/subghz/protocols/gate_tx.c +++ b/lib/subghz/protocols/gate_tx.c @@ -43,7 +43,8 @@ const SubGhzProtocolDecoder subghz_protocol_gate_tx_decoder = { .feed = subghz_protocol_decoder_gate_tx_feed, .reset = subghz_protocol_decoder_gate_tx_reset, - .get_hash_data = subghz_protocol_decoder_gate_tx_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_gate_tx_get_hash_data, .serialize = subghz_protocol_decoder_gate_tx_serialize, .deserialize = subghz_protocol_decoder_gate_tx_deserialize, .get_string = subghz_protocol_decoder_gate_tx_get_string, diff --git a/lib/subghz/protocols/gt_wt_02.c b/lib/subghz/protocols/gt_wt_02.c index a000034175..d5bfe0fc62 100644 --- a/lib/subghz/protocols/gt_wt_02.c +++ b/lib/subghz/protocols/gt_wt_02.c @@ -64,7 +64,8 @@ const SubGhzProtocolDecoder ws_protocol_gt_wt_02_decoder = { .feed = ws_protocol_decoder_gt_wt_02_feed, .reset = ws_protocol_decoder_gt_wt_02_reset, - .get_hash_data = ws_protocol_decoder_gt_wt_02_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_gt_wt_02_get_hash_data, .serialize = ws_protocol_decoder_gt_wt_02_serialize, .deserialize = ws_protocol_decoder_gt_wt_02_deserialize, .get_string = ws_protocol_decoder_gt_wt_02_get_string, diff --git a/lib/subghz/protocols/gt_wt_03.c b/lib/subghz/protocols/gt_wt_03.c index 253022a1ff..18f2e9a204 100644 --- a/lib/subghz/protocols/gt_wt_03.c +++ b/lib/subghz/protocols/gt_wt_03.c @@ -90,7 +90,8 @@ const SubGhzProtocolDecoder ws_protocol_gt_wt_03_decoder = { .feed = ws_protocol_decoder_gt_wt_03_feed, .reset = ws_protocol_decoder_gt_wt_03_reset, - .get_hash_data = ws_protocol_decoder_gt_wt_03_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_gt_wt_03_get_hash_data, .serialize = ws_protocol_decoder_gt_wt_03_serialize, .deserialize = ws_protocol_decoder_gt_wt_03_deserialize, .get_string = ws_protocol_decoder_gt_wt_03_get_string, diff --git a/lib/subghz/protocols/holtek.c b/lib/subghz/protocols/holtek.c index 56ee155597..382b607e5d 100644 --- a/lib/subghz/protocols/holtek.c +++ b/lib/subghz/protocols/holtek.c @@ -53,7 +53,8 @@ const SubGhzProtocolDecoder subghz_protocol_holtek_decoder = { .feed = subghz_protocol_decoder_holtek_feed, .reset = subghz_protocol_decoder_holtek_reset, - .get_hash_data = subghz_protocol_decoder_holtek_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_holtek_get_hash_data, .serialize = subghz_protocol_decoder_holtek_serialize, .deserialize = subghz_protocol_decoder_holtek_deserialize, .get_string = subghz_protocol_decoder_holtek_get_string, diff --git a/lib/subghz/protocols/holtek_ht12x.c b/lib/subghz/protocols/holtek_ht12x.c index 9d3796fc9b..2cc8fbe430 100644 --- a/lib/subghz/protocols/holtek_ht12x.c +++ b/lib/subghz/protocols/holtek_ht12x.c @@ -60,7 +60,8 @@ const SubGhzProtocolDecoder subghz_protocol_holtek_th12x_decoder = { .feed = subghz_protocol_decoder_holtek_th12x_feed, .reset = subghz_protocol_decoder_holtek_th12x_reset, - .get_hash_data = subghz_protocol_decoder_holtek_th12x_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_holtek_th12x_get_hash_data, .serialize = subghz_protocol_decoder_holtek_th12x_serialize, .deserialize = subghz_protocol_decoder_holtek_th12x_deserialize, .get_string = subghz_protocol_decoder_holtek_th12x_get_string, diff --git a/lib/subghz/protocols/honeywell.c b/lib/subghz/protocols/honeywell.c index 593a9c64ef..3d0629b6f1 100644 --- a/lib/subghz/protocols/honeywell.c +++ b/lib/subghz/protocols/honeywell.c @@ -345,7 +345,8 @@ const SubGhzProtocolDecoder subghz_protocol_honeywell_decoder = { .free = subghz_protocol_decoder_honeywell_free, .feed = subghz_protocol_decoder_honeywell_feed, .reset = subghz_protocol_decoder_honeywell_reset, - .get_hash_data = subghz_protocol_decoder_honeywell_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_honeywell_get_hash_data, .serialize = subghz_protocol_decoder_honeywell_serialize, .deserialize = subghz_protocol_decoder_honeywell_deserialize, .get_string = subghz_protocol_decoder_honeywell_get_string, diff --git a/lib/subghz/protocols/honeywell_wdb.c b/lib/subghz/protocols/honeywell_wdb.c index f22eec53d9..f8345f6e12 100644 --- a/lib/subghz/protocols/honeywell_wdb.c +++ b/lib/subghz/protocols/honeywell_wdb.c @@ -54,7 +54,8 @@ const SubGhzProtocolDecoder subghz_protocol_honeywell_wdb_decoder = { .feed = subghz_protocol_decoder_honeywell_wdb_feed, .reset = subghz_protocol_decoder_honeywell_wdb_reset, - .get_hash_data = subghz_protocol_decoder_honeywell_wdb_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_honeywell_wdb_get_hash_data, .serialize = subghz_protocol_decoder_honeywell_wdb_serialize, .deserialize = subghz_protocol_decoder_honeywell_wdb_deserialize, .get_string = subghz_protocol_decoder_honeywell_wdb_get_string, diff --git a/lib/subghz/protocols/hormann.c b/lib/subghz/protocols/hormann.c index 280e04d1d8..e0d0d00922 100644 --- a/lib/subghz/protocols/hormann.c +++ b/lib/subghz/protocols/hormann.c @@ -47,7 +47,8 @@ const SubGhzProtocolDecoder subghz_protocol_hormann_decoder = { .feed = subghz_protocol_decoder_hormann_feed, .reset = subghz_protocol_decoder_hormann_reset, - .get_hash_data = subghz_protocol_decoder_hormann_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_hormann_get_hash_data, .serialize = subghz_protocol_decoder_hormann_serialize, .deserialize = subghz_protocol_decoder_hormann_deserialize, .get_string = subghz_protocol_decoder_hormann_get_string, diff --git a/lib/subghz/protocols/ido.c b/lib/subghz/protocols/ido.c index ff97448251..61dc165d12 100644 --- a/lib/subghz/protocols/ido.c +++ b/lib/subghz/protocols/ido.c @@ -43,7 +43,8 @@ const SubGhzProtocolDecoder subghz_protocol_ido_decoder = { .feed = subghz_protocol_decoder_ido_feed, .reset = subghz_protocol_decoder_ido_reset, - .get_hash_data = subghz_protocol_decoder_ido_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_ido_get_hash_data, .deserialize = subghz_protocol_decoder_ido_deserialize, .serialize = subghz_protocol_decoder_ido_serialize, .get_string = subghz_protocol_decoder_ido_get_string, diff --git a/lib/subghz/protocols/infactory.c b/lib/subghz/protocols/infactory.c index 311974ae9c..b540bca3e1 100644 --- a/lib/subghz/protocols/infactory.c +++ b/lib/subghz/protocols/infactory.c @@ -75,7 +75,8 @@ const SubGhzProtocolDecoder ws_protocol_infactory_decoder = { .feed = ws_protocol_decoder_infactory_feed, .reset = ws_protocol_decoder_infactory_reset, - .get_hash_data = ws_protocol_decoder_infactory_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_infactory_get_hash_data, .serialize = ws_protocol_decoder_infactory_serialize, .deserialize = ws_protocol_decoder_infactory_deserialize, .get_string = ws_protocol_decoder_infactory_get_string, diff --git a/lib/subghz/protocols/intertechno_v3.c b/lib/subghz/protocols/intertechno_v3.c index dae04cd94a..e1a9630fac 100644 --- a/lib/subghz/protocols/intertechno_v3.c +++ b/lib/subghz/protocols/intertechno_v3.c @@ -52,7 +52,8 @@ const SubGhzProtocolDecoder subghz_protocol_intertechno_v3_decoder = { .feed = subghz_protocol_decoder_intertechno_v3_feed, .reset = subghz_protocol_decoder_intertechno_v3_reset, - .get_hash_data = subghz_protocol_decoder_intertechno_v3_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_intertechno_v3_get_hash_data, .serialize = subghz_protocol_decoder_intertechno_v3_serialize, .deserialize = subghz_protocol_decoder_intertechno_v3_deserialize, .get_string = subghz_protocol_decoder_intertechno_v3_get_string, diff --git a/lib/subghz/protocols/kedsum_th.c b/lib/subghz/protocols/kedsum_th.c index d7ce1f1f54..8ee1f06d39 100644 --- a/lib/subghz/protocols/kedsum_th.c +++ b/lib/subghz/protocols/kedsum_th.c @@ -61,7 +61,8 @@ const SubGhzProtocolDecoder ws_protocol_kedsum_th_decoder = { .feed = ws_protocol_decoder_kedsum_th_feed, .reset = ws_protocol_decoder_kedsum_th_reset, - .get_hash_data = ws_protocol_decoder_kedsum_th_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_kedsum_th_get_hash_data, .serialize = ws_protocol_decoder_kedsum_th_serialize, .deserialize = ws_protocol_decoder_kedsum_th_deserialize, .get_string = ws_protocol_decoder_kedsum_th_get_string, diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index 21427b3a43..733accd8c7 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -61,7 +61,8 @@ const SubGhzProtocolDecoder subghz_protocol_keeloq_decoder = { .feed = subghz_protocol_decoder_keeloq_feed, .reset = subghz_protocol_decoder_keeloq_reset, - .get_hash_data = subghz_protocol_decoder_keeloq_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_keeloq_get_hash_data, .serialize = subghz_protocol_decoder_keeloq_serialize, .deserialize = subghz_protocol_decoder_keeloq_deserialize, .get_string = subghz_protocol_decoder_keeloq_get_string, diff --git a/lib/subghz/protocols/kia.c b/lib/subghz/protocols/kia.c index 66e79d3384..18e5fc50a3 100644 --- a/lib/subghz/protocols/kia.c +++ b/lib/subghz/protocols/kia.c @@ -45,7 +45,8 @@ const SubGhzProtocolDecoder subghz_protocol_kia_decoder = { .feed = subghz_protocol_decoder_kia_feed, .reset = subghz_protocol_decoder_kia_reset, - .get_hash_data = subghz_protocol_decoder_kia_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_kia_get_hash_data, .serialize = subghz_protocol_decoder_kia_serialize, .deserialize = subghz_protocol_decoder_kia_deserialize, .get_string = subghz_protocol_decoder_kia_get_string, diff --git a/lib/subghz/protocols/kinggates_stylo_4k.c b/lib/subghz/protocols/kinggates_stylo_4k.c index 7665f0ea3a..a32be06925 100644 --- a/lib/subghz/protocols/kinggates_stylo_4k.c +++ b/lib/subghz/protocols/kinggates_stylo_4k.c @@ -50,7 +50,8 @@ const SubGhzProtocolDecoder subghz_protocol_kinggates_stylo_4k_decoder = { .feed = subghz_protocol_decoder_kinggates_stylo_4k_feed, .reset = subghz_protocol_decoder_kinggates_stylo_4k_reset, - .get_hash_data = subghz_protocol_decoder_kinggates_stylo_4k_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_kinggates_stylo_4k_get_hash_data, .serialize = subghz_protocol_decoder_kinggates_stylo_4k_serialize, .deserialize = subghz_protocol_decoder_kinggates_stylo_4k_deserialize, .get_string = subghz_protocol_decoder_kinggates_stylo_4k_get_string, diff --git a/lib/subghz/protocols/lacrosse_tx.c b/lib/subghz/protocols/lacrosse_tx.c index 1ac3e8a0ee..5f93287293 100644 --- a/lib/subghz/protocols/lacrosse_tx.c +++ b/lib/subghz/protocols/lacrosse_tx.c @@ -79,7 +79,8 @@ const SubGhzProtocolDecoder ws_protocol_lacrosse_tx_decoder = { .feed = ws_protocol_decoder_lacrosse_tx_feed, .reset = ws_protocol_decoder_lacrosse_tx_reset, - .get_hash_data = ws_protocol_decoder_lacrosse_tx_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_lacrosse_tx_get_hash_data, .serialize = ws_protocol_decoder_lacrosse_tx_serialize, .deserialize = ws_protocol_decoder_lacrosse_tx_deserialize, .get_string = ws_protocol_decoder_lacrosse_tx_get_string, diff --git a/lib/subghz/protocols/lacrosse_tx141thbv2.c b/lib/subghz/protocols/lacrosse_tx141thbv2.c index 1e30b299af..8bbf0b63ac 100644 --- a/lib/subghz/protocols/lacrosse_tx141thbv2.c +++ b/lib/subghz/protocols/lacrosse_tx141thbv2.c @@ -57,7 +57,8 @@ const SubGhzProtocolDecoder ws_protocol_lacrosse_tx141thbv2_decoder = { .feed = ws_protocol_decoder_lacrosse_tx141thbv2_feed, .reset = ws_protocol_decoder_lacrosse_tx141thbv2_reset, - .get_hash_data = ws_protocol_decoder_lacrosse_tx141thbv2_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_lacrosse_tx141thbv2_get_hash_data, .serialize = ws_protocol_decoder_lacrosse_tx141thbv2_serialize, .deserialize = ws_protocol_decoder_lacrosse_tx141thbv2_deserialize, .get_string = ws_protocol_decoder_lacrosse_tx141thbv2_get_string, diff --git a/lib/subghz/protocols/linear.c b/lib/subghz/protocols/linear.c index b4c162c353..365b7af52b 100644 --- a/lib/subghz/protocols/linear.c +++ b/lib/subghz/protocols/linear.c @@ -49,7 +49,8 @@ const SubGhzProtocolDecoder subghz_protocol_linear_decoder = { .feed = subghz_protocol_decoder_linear_feed, .reset = subghz_protocol_decoder_linear_reset, - .get_hash_data = subghz_protocol_decoder_linear_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_linear_get_hash_data, .serialize = subghz_protocol_decoder_linear_serialize, .deserialize = subghz_protocol_decoder_linear_deserialize, .get_string = subghz_protocol_decoder_linear_get_string, diff --git a/lib/subghz/protocols/linear_delta3.c b/lib/subghz/protocols/linear_delta3.c index f8171cf16f..1326bf96b7 100644 --- a/lib/subghz/protocols/linear_delta3.c +++ b/lib/subghz/protocols/linear_delta3.c @@ -50,7 +50,8 @@ const SubGhzProtocolDecoder subghz_protocol_linear_delta3_decoder = { .feed = subghz_protocol_decoder_linear_delta3_feed, .reset = subghz_protocol_decoder_linear_delta3_reset, - .get_hash_data = subghz_protocol_decoder_linear_delta3_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_linear_delta3_get_hash_data, .serialize = subghz_protocol_decoder_linear_delta3_serialize, .deserialize = subghz_protocol_decoder_linear_delta3_deserialize, .get_string = subghz_protocol_decoder_linear_delta3_get_string, diff --git a/lib/subghz/protocols/magellan.c b/lib/subghz/protocols/magellan.c index e154baf277..9e3646b770 100644 --- a/lib/subghz/protocols/magellan.c +++ b/lib/subghz/protocols/magellan.c @@ -45,7 +45,8 @@ const SubGhzProtocolDecoder subghz_protocol_magellan_decoder = { .feed = subghz_protocol_decoder_magellan_feed, .reset = subghz_protocol_decoder_magellan_reset, - .get_hash_data = subghz_protocol_decoder_magellan_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_magellan_get_hash_data, .serialize = subghz_protocol_decoder_magellan_serialize, .deserialize = subghz_protocol_decoder_magellan_deserialize, .get_string = subghz_protocol_decoder_magellan_get_string, diff --git a/lib/subghz/protocols/marantec.c b/lib/subghz/protocols/marantec.c index 82981ceb5d..06709712e0 100644 --- a/lib/subghz/protocols/marantec.c +++ b/lib/subghz/protocols/marantec.c @@ -45,7 +45,8 @@ const SubGhzProtocolDecoder subghz_protocol_marantec_decoder = { .feed = subghz_protocol_decoder_marantec_feed, .reset = subghz_protocol_decoder_marantec_reset, - .get_hash_data = subghz_protocol_decoder_marantec_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_marantec_get_hash_data, .serialize = subghz_protocol_decoder_marantec_serialize, .deserialize = subghz_protocol_decoder_marantec_deserialize, .get_string = subghz_protocol_decoder_marantec_get_string, diff --git a/lib/subghz/protocols/mastercode.c b/lib/subghz/protocols/mastercode.c index c8f7eb3336..425441f661 100644 --- a/lib/subghz/protocols/mastercode.c +++ b/lib/subghz/protocols/mastercode.c @@ -57,7 +57,8 @@ const SubGhzProtocolDecoder subghz_protocol_mastercode_decoder = { .feed = subghz_protocol_decoder_mastercode_feed, .reset = subghz_protocol_decoder_mastercode_reset, - .get_hash_data = subghz_protocol_decoder_mastercode_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_mastercode_get_hash_data, .serialize = subghz_protocol_decoder_mastercode_serialize, .deserialize = subghz_protocol_decoder_mastercode_deserialize, .get_string = subghz_protocol_decoder_mastercode_get_string, diff --git a/lib/subghz/protocols/megacode.c b/lib/subghz/protocols/megacode.c index aae6c7db02..d2d37aacf5 100644 --- a/lib/subghz/protocols/megacode.c +++ b/lib/subghz/protocols/megacode.c @@ -55,7 +55,8 @@ const SubGhzProtocolDecoder subghz_protocol_megacode_decoder = { .feed = subghz_protocol_decoder_megacode_feed, .reset = subghz_protocol_decoder_megacode_reset, - .get_hash_data = subghz_protocol_decoder_megacode_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_megacode_get_hash_data, .serialize = subghz_protocol_decoder_megacode_serialize, .deserialize = subghz_protocol_decoder_megacode_deserialize, .get_string = subghz_protocol_decoder_megacode_get_string, diff --git a/lib/subghz/protocols/nero_radio.c b/lib/subghz/protocols/nero_radio.c index 9f356a2394..c64d208776 100644 --- a/lib/subghz/protocols/nero_radio.c +++ b/lib/subghz/protocols/nero_radio.c @@ -45,7 +45,8 @@ const SubGhzProtocolDecoder subghz_protocol_nero_radio_decoder = { .feed = subghz_protocol_decoder_nero_radio_feed, .reset = subghz_protocol_decoder_nero_radio_reset, - .get_hash_data = subghz_protocol_decoder_nero_radio_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_nero_radio_get_hash_data, .serialize = subghz_protocol_decoder_nero_radio_serialize, .deserialize = subghz_protocol_decoder_nero_radio_deserialize, .get_string = subghz_protocol_decoder_nero_radio_get_string, diff --git a/lib/subghz/protocols/nero_sketch.c b/lib/subghz/protocols/nero_sketch.c index 484d142b3b..9155f5f245 100644 --- a/lib/subghz/protocols/nero_sketch.c +++ b/lib/subghz/protocols/nero_sketch.c @@ -44,7 +44,8 @@ const SubGhzProtocolDecoder subghz_protocol_nero_sketch_decoder = { .feed = subghz_protocol_decoder_nero_sketch_feed, .reset = subghz_protocol_decoder_nero_sketch_reset, - .get_hash_data = subghz_protocol_decoder_nero_sketch_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_nero_sketch_get_hash_data, .serialize = subghz_protocol_decoder_nero_sketch_serialize, .deserialize = subghz_protocol_decoder_nero_sketch_deserialize, .get_string = subghz_protocol_decoder_nero_sketch_get_string, diff --git a/lib/subghz/protocols/nexus_th.c b/lib/subghz/protocols/nexus_th.c index 085018ba29..08187789a3 100644 --- a/lib/subghz/protocols/nexus_th.c +++ b/lib/subghz/protocols/nexus_th.c @@ -340,7 +340,8 @@ const SubGhzProtocolDecoder ws_protocol_nexus_th_decoder = { .feed = ws_protocol_decoder_nexus_th_feed, .reset = ws_protocol_decoder_nexus_th_reset, - .get_hash_data = ws_protocol_decoder_nexus_th_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_nexus_th_get_hash_data, .serialize = ws_protocol_decoder_nexus_th_serialize, .deserialize = ws_protocol_decoder_nexus_th_deserialize, .get_string = ws_protocol_decoder_nexus_th_get_string, diff --git a/lib/subghz/protocols/nice_flo.c b/lib/subghz/protocols/nice_flo.c index 31f234dd1a..ac2f1e41e6 100644 --- a/lib/subghz/protocols/nice_flo.c +++ b/lib/subghz/protocols/nice_flo.c @@ -42,7 +42,8 @@ const SubGhzProtocolDecoder subghz_protocol_nice_flo_decoder = { .feed = subghz_protocol_decoder_nice_flo_feed, .reset = subghz_protocol_decoder_nice_flo_reset, - .get_hash_data = subghz_protocol_decoder_nice_flo_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_nice_flo_get_hash_data, .serialize = subghz_protocol_decoder_nice_flo_serialize, .deserialize = subghz_protocol_decoder_nice_flo_deserialize, .get_string = subghz_protocol_decoder_nice_flo_get_string, diff --git a/lib/subghz/protocols/nice_flor_s.c b/lib/subghz/protocols/nice_flor_s.c index cc447d6852..8ce944dff3 100644 --- a/lib/subghz/protocols/nice_flor_s.c +++ b/lib/subghz/protocols/nice_flor_s.c @@ -60,7 +60,8 @@ const SubGhzProtocolDecoder subghz_protocol_nice_flor_s_decoder = { .feed = subghz_protocol_decoder_nice_flor_s_feed, .reset = subghz_protocol_decoder_nice_flor_s_reset, - .get_hash_data = subghz_protocol_decoder_nice_flor_s_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_nice_flor_s_get_hash_data, .serialize = subghz_protocol_decoder_nice_flor_s_serialize, .deserialize = subghz_protocol_decoder_nice_flor_s_deserialize, .get_string = subghz_protocol_decoder_nice_flor_s_get_string, diff --git a/lib/subghz/protocols/oregon2.c b/lib/subghz/protocols/oregon2.c index 01b462af1f..af92ab63d1 100644 --- a/lib/subghz/protocols/oregon2.c +++ b/lib/subghz/protocols/oregon2.c @@ -414,7 +414,8 @@ const SubGhzProtocolDecoder ws_protocol_oregon2_decoder = { .feed = ws_protocol_decoder_oregon2_feed, .reset = ws_protocol_decoder_oregon2_reset, - .get_hash_data = ws_protocol_decoder_oregon2_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_oregon2_get_hash_data, .serialize = ws_protocol_decoder_oregon2_serialize, .deserialize = ws_protocol_decoder_oregon2_deserialize, .get_string = ws_protocol_decoder_oregon2_get_string, diff --git a/lib/subghz/protocols/oregon3.c b/lib/subghz/protocols/oregon3.c index 75c2d60d67..8d5a4a35d4 100644 --- a/lib/subghz/protocols/oregon3.c +++ b/lib/subghz/protocols/oregon3.c @@ -350,7 +350,8 @@ const SubGhzProtocolDecoder ws_protocol_oregon3_decoder = { .feed = ws_protocol_decoder_oregon3_feed, .reset = ws_protocol_decoder_oregon3_reset, - .get_hash_data = ws_protocol_decoder_oregon3_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_oregon3_get_hash_data, .serialize = ws_protocol_decoder_oregon3_serialize, .deserialize = ws_protocol_decoder_oregon3_deserialize, .get_string = ws_protocol_decoder_oregon3_get_string, diff --git a/lib/subghz/protocols/oregon_v1.c b/lib/subghz/protocols/oregon_v1.c index b7593f0057..65d6d7bb38 100644 --- a/lib/subghz/protocols/oregon_v1.c +++ b/lib/subghz/protocols/oregon_v1.c @@ -76,7 +76,8 @@ const SubGhzProtocolDecoder ws_protocol_oregon_v1_decoder = { .feed = ws_protocol_decoder_oregon_v1_feed, .reset = ws_protocol_decoder_oregon_v1_reset, - .get_hash_data = ws_protocol_decoder_oregon_v1_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_oregon_v1_get_hash_data, .serialize = ws_protocol_decoder_oregon_v1_serialize, .deserialize = ws_protocol_decoder_oregon_v1_deserialize, .get_string = ws_protocol_decoder_oregon_v1_get_string, diff --git a/lib/subghz/protocols/phoenix_v2.c b/lib/subghz/protocols/phoenix_v2.c index e1e2b9acc8..33019dd16a 100644 --- a/lib/subghz/protocols/phoenix_v2.c +++ b/lib/subghz/protocols/phoenix_v2.c @@ -45,7 +45,8 @@ const SubGhzProtocolDecoder subghz_protocol_phoenix_v2_decoder = { .feed = subghz_protocol_decoder_phoenix_v2_feed, .reset = subghz_protocol_decoder_phoenix_v2_reset, - .get_hash_data = subghz_protocol_decoder_phoenix_v2_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_phoenix_v2_get_hash_data, .serialize = subghz_protocol_decoder_phoenix_v2_serialize, .deserialize = subghz_protocol_decoder_phoenix_v2_deserialize, .get_string = subghz_protocol_decoder_phoenix_v2_get_string, diff --git a/lib/subghz/protocols/pocsag.c b/lib/subghz/protocols/pocsag.c index 6cd7e67a24..0fa2c89d8f 100644 --- a/lib/subghz/protocols/pocsag.c +++ b/lib/subghz/protocols/pocsag.c @@ -420,7 +420,8 @@ const SubGhzProtocolDecoder subghz_protocol_pocsag_decoder = { .free = subghz_protocol_decoder_pocsag_free, .reset = subghz_protocol_decoder_pocsag_reset, .feed = subghz_protocol_decoder_pocsag_feed, - .get_hash_data = subghz_protocol_decoder_pocsag_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_pocsag_get_hash_data, .serialize = subghz_protocol_decoder_pocsag_serialize, .deserialize = subghz_protocol_decoder_pocsag_deserialize, .get_string = subhz_protocol_decoder_pocsag_get_string, diff --git a/lib/subghz/protocols/power_smart.c b/lib/subghz/protocols/power_smart.c index b75d3d8e74..256118b05b 100644 --- a/lib/subghz/protocols/power_smart.c +++ b/lib/subghz/protocols/power_smart.c @@ -52,7 +52,8 @@ const SubGhzProtocolDecoder subghz_protocol_power_smart_decoder = { .feed = subghz_protocol_decoder_power_smart_feed, .reset = subghz_protocol_decoder_power_smart_reset, - .get_hash_data = subghz_protocol_decoder_power_smart_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_power_smart_get_hash_data, .serialize = subghz_protocol_decoder_power_smart_serialize, .deserialize = subghz_protocol_decoder_power_smart_deserialize, .get_string = subghz_protocol_decoder_power_smart_get_string, diff --git a/lib/subghz/protocols/princeton.c b/lib/subghz/protocols/princeton.c index f8eee62e3f..01c69b1f2e 100644 --- a/lib/subghz/protocols/princeton.c +++ b/lib/subghz/protocols/princeton.c @@ -53,7 +53,8 @@ const SubGhzProtocolDecoder subghz_protocol_princeton_decoder = { .feed = subghz_protocol_decoder_princeton_feed, .reset = subghz_protocol_decoder_princeton_reset, - .get_hash_data = subghz_protocol_decoder_princeton_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_princeton_get_hash_data, .serialize = subghz_protocol_decoder_princeton_serialize, .deserialize = subghz_protocol_decoder_princeton_deserialize, .get_string = subghz_protocol_decoder_princeton_get_string, diff --git a/lib/subghz/protocols/raw.c b/lib/subghz/protocols/raw.c index 35ac7fdd22..4b10b81c9b 100644 --- a/lib/subghz/protocols/raw.c +++ b/lib/subghz/protocols/raw.c @@ -58,6 +58,7 @@ const SubGhzProtocolDecoder subghz_protocol_raw_decoder = { .reset = subghz_protocol_decoder_raw_reset, .get_hash_data = NULL, + .get_hash_data_long = NULL, .serialize = NULL, .deserialize = subghz_protocol_decoder_raw_deserialize, .get_string = subghz_protocol_decoder_raw_get_string, diff --git a/lib/subghz/protocols/scher_khan.c b/lib/subghz/protocols/scher_khan.c index dfe6c4a8fe..1c91502ab9 100644 --- a/lib/subghz/protocols/scher_khan.c +++ b/lib/subghz/protocols/scher_khan.c @@ -51,7 +51,8 @@ const SubGhzProtocolDecoder subghz_protocol_scher_khan_decoder = { .feed = subghz_protocol_decoder_scher_khan_feed, .reset = subghz_protocol_decoder_scher_khan_reset, - .get_hash_data = subghz_protocol_decoder_scher_khan_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_scher_khan_get_hash_data, .serialize = subghz_protocol_decoder_scher_khan_serialize, .deserialize = subghz_protocol_decoder_scher_khan_deserialize, .get_string = subghz_protocol_decoder_scher_khan_get_string, diff --git a/lib/subghz/protocols/schrader_gg4.c b/lib/subghz/protocols/schrader_gg4.c index 5624049758..963193589e 100644 --- a/lib/subghz/protocols/schrader_gg4.c +++ b/lib/subghz/protocols/schrader_gg4.c @@ -82,7 +82,8 @@ const SubGhzProtocolDecoder tpms_protocol_schrader_gg4_decoder = { .feed = tpms_protocol_decoder_schrader_gg4_feed, .reset = tpms_protocol_decoder_schrader_gg4_reset, - .get_hash_data = tpms_protocol_decoder_schrader_gg4_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = tpms_protocol_decoder_schrader_gg4_get_hash_data, .serialize = tpms_protocol_decoder_schrader_gg4_serialize, .deserialize = tpms_protocol_decoder_schrader_gg4_deserialize, .get_string = tpms_protocol_decoder_schrader_gg4_get_string, diff --git a/lib/subghz/protocols/secplus_v1.c b/lib/subghz/protocols/secplus_v1.c index d754d4328b..a1f049caa6 100644 --- a/lib/subghz/protocols/secplus_v1.c +++ b/lib/subghz/protocols/secplus_v1.c @@ -66,7 +66,8 @@ const SubGhzProtocolDecoder subghz_protocol_secplus_v1_decoder = { .feed = subghz_protocol_decoder_secplus_v1_feed, .reset = subghz_protocol_decoder_secplus_v1_reset, - .get_hash_data = subghz_protocol_decoder_secplus_v1_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_secplus_v1_get_hash_data, .serialize = subghz_protocol_decoder_secplus_v1_serialize, .deserialize = subghz_protocol_decoder_secplus_v1_deserialize, .get_string = subghz_protocol_decoder_secplus_v1_get_string, diff --git a/lib/subghz/protocols/secplus_v2.c b/lib/subghz/protocols/secplus_v2.c index 0aa5e2508d..3964e9262a 100644 --- a/lib/subghz/protocols/secplus_v2.c +++ b/lib/subghz/protocols/secplus_v2.c @@ -60,7 +60,8 @@ const SubGhzProtocolDecoder subghz_protocol_secplus_v2_decoder = { .feed = subghz_protocol_decoder_secplus_v2_feed, .reset = subghz_protocol_decoder_secplus_v2_reset, - .get_hash_data = subghz_protocol_decoder_secplus_v2_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_secplus_v2_get_hash_data, .serialize = subghz_protocol_decoder_secplus_v2_serialize, .deserialize = subghz_protocol_decoder_secplus_v2_deserialize, .get_string = subghz_protocol_decoder_secplus_v2_get_string, diff --git a/lib/subghz/protocols/smc5326.c b/lib/subghz/protocols/smc5326.c index dd990b74bb..984f791fa6 100644 --- a/lib/subghz/protocols/smc5326.c +++ b/lib/subghz/protocols/smc5326.c @@ -68,7 +68,8 @@ const SubGhzProtocolDecoder subghz_protocol_smc5326_decoder = { .feed = subghz_protocol_decoder_smc5326_feed, .reset = subghz_protocol_decoder_smc5326_reset, - .get_hash_data = subghz_protocol_decoder_smc5326_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_smc5326_get_hash_data, .serialize = subghz_protocol_decoder_smc5326_serialize, .deserialize = subghz_protocol_decoder_smc5326_deserialize, .get_string = subghz_protocol_decoder_smc5326_get_string, diff --git a/lib/subghz/protocols/somfy_keytis.c b/lib/subghz/protocols/somfy_keytis.c index 110b3d2d73..6eeef77c66 100644 --- a/lib/subghz/protocols/somfy_keytis.c +++ b/lib/subghz/protocols/somfy_keytis.c @@ -49,7 +49,8 @@ const SubGhzProtocolDecoder subghz_protocol_somfy_keytis_decoder = { .feed = subghz_protocol_decoder_somfy_keytis_feed, .reset = subghz_protocol_decoder_somfy_keytis_reset, - .get_hash_data = subghz_protocol_decoder_somfy_keytis_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_somfy_keytis_get_hash_data, .serialize = subghz_protocol_decoder_somfy_keytis_serialize, .deserialize = subghz_protocol_decoder_somfy_keytis_deserialize, .get_string = subghz_protocol_decoder_somfy_keytis_get_string, diff --git a/lib/subghz/protocols/somfy_telis.c b/lib/subghz/protocols/somfy_telis.c index 4f6c43a7a2..421a3ac87b 100644 --- a/lib/subghz/protocols/somfy_telis.c +++ b/lib/subghz/protocols/somfy_telis.c @@ -50,7 +50,8 @@ const SubGhzProtocolDecoder subghz_protocol_somfy_telis_decoder = { .feed = subghz_protocol_decoder_somfy_telis_feed, .reset = subghz_protocol_decoder_somfy_telis_reset, - .get_hash_data = subghz_protocol_decoder_somfy_telis_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_somfy_telis_get_hash_data, .serialize = subghz_protocol_decoder_somfy_telis_serialize, .deserialize = subghz_protocol_decoder_somfy_telis_deserialize, .get_string = subghz_protocol_decoder_somfy_telis_get_string, diff --git a/lib/subghz/protocols/star_line.c b/lib/subghz/protocols/star_line.c index 87483e748d..f48359c9e1 100644 --- a/lib/subghz/protocols/star_line.c +++ b/lib/subghz/protocols/star_line.c @@ -60,7 +60,8 @@ const SubGhzProtocolDecoder subghz_protocol_star_line_decoder = { .feed = subghz_protocol_decoder_star_line_feed, .reset = subghz_protocol_decoder_star_line_reset, - .get_hash_data = subghz_protocol_decoder_star_line_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_star_line_get_hash_data, .serialize = subghz_protocol_decoder_star_line_serialize, .deserialize = subghz_protocol_decoder_star_line_deserialize, .get_string = subghz_protocol_decoder_star_line_get_string, diff --git a/lib/subghz/protocols/thermopro_tx4.c b/lib/subghz/protocols/thermopro_tx4.c index f809bee938..7e34dda914 100644 --- a/lib/subghz/protocols/thermopro_tx4.c +++ b/lib/subghz/protocols/thermopro_tx4.c @@ -60,7 +60,8 @@ const SubGhzProtocolDecoder ws_protocol_thermopro_tx4_decoder = { .feed = ws_protocol_decoder_thermopro_tx4_feed, .reset = ws_protocol_decoder_thermopro_tx4_reset, - .get_hash_data = ws_protocol_decoder_thermopro_tx4_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_thermopro_tx4_get_hash_data, .serialize = ws_protocol_decoder_thermopro_tx4_serialize, .deserialize = ws_protocol_decoder_thermopro_tx4_deserialize, .get_string = ws_protocol_decoder_thermopro_tx4_get_string, diff --git a/lib/subghz/protocols/tx_8300.c b/lib/subghz/protocols/tx_8300.c index 247304b576..012153c33c 100644 --- a/lib/subghz/protocols/tx_8300.c +++ b/lib/subghz/protocols/tx_8300.c @@ -71,7 +71,8 @@ const SubGhzProtocolDecoder ws_protocol_tx_8300_decoder = { .feed = ws_protocol_decoder_tx_8300_feed, .reset = ws_protocol_decoder_tx_8300_reset, - .get_hash_data = ws_protocol_decoder_tx_8300_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_tx_8300_get_hash_data, .serialize = ws_protocol_decoder_tx_8300_serialize, .deserialize = ws_protocol_decoder_tx_8300_deserialize, .get_string = ws_protocol_decoder_tx_8300_get_string, diff --git a/lib/subghz/protocols/wendox_w6726.c b/lib/subghz/protocols/wendox_w6726.c index a19568b8e3..54160853bc 100644 --- a/lib/subghz/protocols/wendox_w6726.c +++ b/lib/subghz/protocols/wendox_w6726.c @@ -65,7 +65,8 @@ const SubGhzProtocolDecoder ws_protocol_wendox_w6726_decoder = { .feed = ws_protocol_decoder_wendox_w6726_feed, .reset = ws_protocol_decoder_wendox_w6726_reset, - .get_hash_data = ws_protocol_decoder_wendox_w6726_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = ws_protocol_decoder_wendox_w6726_get_hash_data, .serialize = ws_protocol_decoder_wendox_w6726_serialize, .deserialize = ws_protocol_decoder_wendox_w6726_deserialize, .get_string = ws_protocol_decoder_wendox_w6726_get_string, diff --git a/lib/subghz/protocols/x10.c b/lib/subghz/protocols/x10.c index 546fce5502..a4a385be7b 100644 --- a/lib/subghz/protocols/x10.c +++ b/lib/subghz/protocols/x10.c @@ -71,7 +71,8 @@ const SubGhzProtocolDecoder subghz_protocol_x10_decoder = { .free = subghz_protocol_decoder_x10_free, .feed = subghz_protocol_decoder_x10_feed, .reset = subghz_protocol_decoder_x10_reset, - .get_hash_data = subghz_protocol_decoder_x10_get_hash_data, + .get_hash_data = NULL, + .get_hash_data_long = subghz_protocol_decoder_x10_get_hash_data, .serialize = subghz_protocol_decoder_x10_serialize, .deserialize = subghz_protocol_decoder_x10_deserialize, .get_string = subghz_protocol_decoder_x10_get_string, diff --git a/lib/subghz/types.h b/lib/subghz/types.h index ca059e551a..0a50ab5b33 100644 --- a/lib/subghz/types.h +++ b/lib/subghz/types.h @@ -78,7 +78,8 @@ typedef SubGhzProtocolStatus (*SubGhzDeserialize)(void* context, FlipperFormat* // Decoder specific typedef void (*SubGhzDecoderFeed)(void* decoder, bool level, uint32_t duration); typedef void (*SubGhzDecoderReset)(void* decoder); -typedef uint32_t (*SubGhzGetHashData)(void* decoder); +typedef uint8_t (*SubGhzGetHashData)(void* decoder); +typedef uint32_t (*SubGhzGetHashDataLong)(void* decoder); typedef void (*SubGhzGetString)(void* decoder, FuriString* output); // Encoder specific @@ -96,6 +97,8 @@ typedef struct { SubGhzGetString get_string; SubGhzSerialize serialize; SubGhzDeserialize deserialize; + + SubGhzGetHashDataLong get_hash_data_long; } SubGhzProtocolDecoder; typedef struct {