SubGHz: Fix hashes compat for apps (eg. Weather)

This commit is contained in:
Willy-JL
2024-03-14 01:12:32 +00:00
parent e69a6c06ef
commit ab86ef8b48
69 changed files with 148 additions and 74 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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;

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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 {