SubGhz: Unit_test and bugfixes (#1104)
* SubGhz: CLI add "subghz decode_raw" * SubGhz: unit_test * SubGhz: add Hormann_hsm_raw unit_test * SubGhz: fix duration raw * Unit_test: fix total test timer * SubGHz: fix name display scher_khan * SubGhz: fix deviation protocol kia * SubGhz: return max name length to previous value * FuriHal: correctly handle mute in speaker * UnitTests: fix grammar in subghz Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -95,15 +95,15 @@ void subghz_protocol_decoder_kia_feed(void* context, bool level, uint32_t durati
|
||||
|
||||
switch(instance->decoder.parser_step) {
|
||||
case KIADecoderStepReset:
|
||||
if((!level) && (DURATION_DIFF(duration, subghz_protocol_kia_const.te_short) <
|
||||
subghz_protocol_kia_const.te_delta)) {
|
||||
if((level) && (DURATION_DIFF(duration, subghz_protocol_kia_const.te_short) <
|
||||
subghz_protocol_kia_const.te_delta)) {
|
||||
instance->decoder.parser_step = KIADecoderStepCheckPreambula;
|
||||
instance->decoder.te_last = duration;
|
||||
instance->header_count = 0;
|
||||
}
|
||||
break;
|
||||
case KIADecoderStepCheckPreambula:
|
||||
if(!level) {
|
||||
if(level) {
|
||||
if((DURATION_DIFF(duration, subghz_protocol_kia_const.te_short) <
|
||||
subghz_protocol_kia_const.te_delta) ||
|
||||
(DURATION_DIFF(duration, subghz_protocol_kia_const.te_long) <
|
||||
@@ -139,7 +139,7 @@ void subghz_protocol_decoder_kia_feed(void* context, bool level, uint32_t durati
|
||||
}
|
||||
break;
|
||||
case KIADecoderStepSaveDuration:
|
||||
if(!level) {
|
||||
if(level) {
|
||||
if(duration >=
|
||||
(subghz_protocol_kia_const.te_long + subghz_protocol_kia_const.te_delta * 2)) {
|
||||
//Found stop bit
|
||||
@@ -164,7 +164,7 @@ void subghz_protocol_decoder_kia_feed(void* context, bool level, uint32_t durati
|
||||
}
|
||||
break;
|
||||
case KIADecoderStepCheckDuration:
|
||||
if(level) {
|
||||
if(!level) {
|
||||
if((DURATION_DIFF(instance->decoder.te_last, subghz_protocol_kia_const.te_short) <
|
||||
subghz_protocol_kia_const.te_delta) &&
|
||||
(DURATION_DIFF(duration, subghz_protocol_kia_const.te_short) <
|
||||
|
Reference in New Issue
Block a user