Use long hash in dickert mahs protocol

This commit is contained in:
Willy-JL
2024-08-13 02:34:15 +02:00
parent 5f98c5d986
commit c6320a6a59
2 changed files with 6 additions and 4 deletions

View File

@@ -49,10 +49,12 @@ const SubGhzProtocolDecoder subghz_protocol_dickert_mahs_decoder = {
.feed = subghz_protocol_decoder_dickert_mahs_feed,
.reset = subghz_protocol_decoder_dickert_mahs_reset,
.get_hash_data = subghz_protocol_decoder_dickert_mahs_get_hash_data,
.get_hash_data = NULL,
.get_hash_data_long = subghz_protocol_decoder_dickert_mahs_get_hash_data,
.serialize = subghz_protocol_decoder_dickert_mahs_serialize,
.deserialize = subghz_protocol_decoder_dickert_mahs_deserialize,
.get_string = subghz_protocol_decoder_dickert_mahs_get_string,
.get_string_brief = NULL,
};
const SubGhzProtocolEncoder subghz_protocol_dickert_mahs_encoder = {
@@ -341,10 +343,10 @@ void subghz_protocol_decoder_dickert_mahs_feed(void* context, bool level, uint32
}
}
uint8_t subghz_protocol_decoder_dickert_mahs_get_hash_data(void* context) {
uint32_t subghz_protocol_decoder_dickert_mahs_get_hash_data(void* context) {
furi_assert(context);
SubGhzProtocolDecoderDickertMAHS* instance = context;
return subghz_protocol_blocks_get_hash_data(
return subghz_protocol_blocks_get_hash_data_long(
&instance->decoder, (instance->decoder.decode_count_bit / 8) + 1);
}

View File

@@ -84,7 +84,7 @@ void subghz_protocol_decoder_dickert_mahs_feed(void* context, bool level, uint32
*
* @return hash Hash sum
*/
uint8_t subghz_protocol_decoder_dickert_mahs_get_hash_data(void* context);
uint32_t subghz_protocol_decoder_dickert_mahs_get_hash_data(void* context);
/** Serialize data SubGhzProtocolDecoderDickertMAHS.
*