diff --git a/documentation/SubGHzCounterMode.md b/documentation/SubGHzCounterMode.md index 4dc486301..54fd0e24e 100644 --- a/documentation/SubGHzCounterMode.md +++ b/documentation/SubGHzCounterMode.md @@ -71,6 +71,9 @@ CounterMode: 1 - Counter sequence: `0x807B / 0x807C / 0x007B / 0x007C` - Works with external CAME RE432 receiver, may work with other type of receivers +**Mode 3:** +- Counter freeze - do not increment + --- ### 3. Alutech AT-4N @@ -121,6 +124,9 @@ CounterMode: 1 - Alternates between 0 and maximum value (65535) - Might work with some systems (let us know!) +**Mode 6:** +- Counter freeze - do not increment + --- ## Notes and Warnings diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index bdd30e59f..56ed6ce38 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -220,7 +220,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload( } else { instance->generic.cnt++; } - } else { + } else if(came_atomo_counter_mode == 2) { // Mode 2 // 0x807B / 0x807C / 0x007B / 0x007C if(instance->generic.cnt != 0x807B && instance->generic.cnt != 0x807C && @@ -231,6 +231,8 @@ static void subghz_protocol_encoder_came_atomo_get_upload( } else { instance->generic.cnt++; } + } else { + // Mode 3 - Freeze counter } // Save original button for later use diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index 3456560a3..c90cfcf0e 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -251,7 +251,7 @@ static bool subghz_protocol_keeloq_gen_data( } else { instance->generic.cnt++; } - } else { + } else if(keeloq_counter_mode == 5) { // Mode 5 // 0000 / FFFF if((instance->generic.cnt + 0x1) > 0xFFFF) { @@ -259,6 +259,8 @@ static bool subghz_protocol_keeloq_gen_data( } else { instance->generic.cnt = 0xFFFF; } + } else { + // Mode 6 - Freeze counter } } if(prog_mode == PROG_MODE_OFF) {