From 50bb4224f38dd18c05e8ca7a66b8e848b9208b38 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 13 Jan 2024 01:15:29 +0000 Subject: [PATCH] Format --nobuild --- lib/subghz/protocols/acurite_986.c | 28 +++++++++++----------- lib/subghz/protocols/lacrosse_tx141thbv2.c | 3 ++- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/lib/subghz/protocols/acurite_986.c b/lib/subghz/protocols/acurite_986.c index 723099ef39..7c8edd211b 100644 --- a/lib/subghz/protocols/acurite_986.c +++ b/lib/subghz/protocols/acurite_986.c @@ -108,10 +108,10 @@ void ws_protocol_decoder_acurite_986_reset(void* context) { static bool ws_protocol_acurite_986_check(WSProtocolDecoderAcurite_986* instance) { if(!instance->decoder.decode_data) return false; uint8_t msg[] = { - instance->decoder.decode_data >> 32, - instance->decoder.decode_data >> 24, - instance->decoder.decode_data >> 16, - instance->decoder.decode_data >> 8 }; + instance->decoder.decode_data >> 32, + instance->decoder.decode_data >> 24, + instance->decoder.decode_data >> 16, + instance->decoder.decode_data >> 8}; uint8_t crc = subghz_protocol_blocks_crc8(msg, 4, 0x07, 0x00); return (crc == (instance->decoder.decode_data & 0xFF)); @@ -125,7 +125,8 @@ static void ws_protocol_acurite_986_remote_controller(WSBlockGeneric* instance) int temp; instance->id = subghz_protocol_blocks_reverse_key(instance->data >> 24, 8); - instance->id = (instance->id << 8) | subghz_protocol_blocks_reverse_key(instance->data >> 16, 8); + instance->id = (instance->id << 8) | + subghz_protocol_blocks_reverse_key(instance->data >> 16, 8); instance->battery_low = (instance->data >> 14) & 1; instance->channel = ((instance->data >> 15) & 1) + 1; @@ -155,7 +156,7 @@ void ws_protocol_decoder_acurite_986_feed(void* context, bool level, uint32_t du case Acurite_986DecoderStepSync1: if(DURATION_DIFF(duration, ws_protocol_acurite_986_const.te_long) < - ws_protocol_acurite_986_const.te_delta * 15) { + ws_protocol_acurite_986_const.te_delta * 15) { if(!level) { instance->decoder.parser_step = Acurite_986DecoderStepSync2; } @@ -166,7 +167,7 @@ void ws_protocol_decoder_acurite_986_feed(void* context, bool level, uint32_t du case Acurite_986DecoderStepSync2: if(DURATION_DIFF(duration, ws_protocol_acurite_986_const.te_long) < - ws_protocol_acurite_986_const.te_delta * 15) { + ws_protocol_acurite_986_const.te_delta * 15) { if(!level) { instance->decoder.parser_step = Acurite_986DecoderStepSync3; } @@ -177,7 +178,7 @@ void ws_protocol_decoder_acurite_986_feed(void* context, bool level, uint32_t du case Acurite_986DecoderStepSync3: if(DURATION_DIFF(duration, ws_protocol_acurite_986_const.te_long) < - ws_protocol_acurite_986_const.te_delta * 15) { + ws_protocol_acurite_986_const.te_delta * 15) { if(!level) { instance->decoder.parser_step = Acurite_986DecoderStepSaveDuration; } @@ -198,7 +199,7 @@ void ws_protocol_decoder_acurite_986_feed(void* context, bool level, uint32_t du case Acurite_986DecoderStepCheckDuration: if(!level) { if(DURATION_DIFF(duration, ws_protocol_acurite_986_const.te_short) < - ws_protocol_acurite_986_const.te_delta * 10) { + ws_protocol_acurite_986_const.te_delta * 10) { if(duration < ws_protocol_acurite_986_const.te_short) { subghz_protocol_blocks_add_bit(&instance->decoder, 0); instance->decoder.parser_step = Acurite_986DecoderStepSaveDuration; @@ -209,8 +210,9 @@ void ws_protocol_decoder_acurite_986_feed(void* context, bool level, uint32_t du } else { //Found syncPostfix instance->decoder.parser_step = Acurite_986DecoderStepReset; - if((instance->decoder.decode_count_bit == ws_protocol_acurite_986_const.min_count_bit_for_found) && - ws_protocol_acurite_986_check(instance)) { + if((instance->decoder.decode_count_bit == + ws_protocol_acurite_986_const.min_count_bit_for_found) && + ws_protocol_acurite_986_check(instance)) { instance->generic.data = instance->decoder.decode_data; instance->generic.data_count_bit = instance->decoder.decode_count_bit; ws_protocol_acurite_986_remote_controller(&instance->generic); @@ -248,9 +250,7 @@ SubGhzProtocolStatus furi_assert(context); WSProtocolDecoderAcurite_986* instance = context; return ws_block_generic_deserialize_check_count_bit( - &instance->generic, - flipper_format, - ws_protocol_acurite_986_const.min_count_bit_for_found); + &instance->generic, flipper_format, ws_protocol_acurite_986_const.min_count_bit_for_found); } void ws_protocol_decoder_acurite_986_get_string(void* context, FuriString* output) { diff --git a/lib/subghz/protocols/lacrosse_tx141thbv2.c b/lib/subghz/protocols/lacrosse_tx141thbv2.c index 6a091723e7..9149f46660 100644 --- a/lib/subghz/protocols/lacrosse_tx141thbv2.c +++ b/lib/subghz/protocols/lacrosse_tx141thbv2.c @@ -276,7 +276,8 @@ SubGhzProtocolStatus ws_protocol_decoder_lacrosse_tx141thbv2_deserialize( if(ret != SubGhzProtocolStatusOk) { break; } - if(instance->generic.data_count_bit != ws_protocol_lacrosse_tx141thbv2_const.min_count_bit_for_found && + if(instance->generic.data_count_bit != + ws_protocol_lacrosse_tx141thbv2_const.min_count_bit_for_found && instance->generic.data_count_bit != LACROSSE_TX141TH_BV2_BIT_COUNT) { FURI_LOG_E(TAG, "Wrong number of bits in key"); ret = SubGhzProtocolStatusErrorValueBitCount;