Merge commit 'e681fd2be571523f251ff688351a9299aa533ad4' into mntm-dev

This commit is contained in:
WillyJL
2026-02-28 21:16:56 +01:00
13 changed files with 129 additions and 60 deletions
+12 -3
View File
@@ -12,6 +12,9 @@
#define SUBGHZ_NO_ALUTECH_AT_4N_RAINBOW_TABLE 0xFFFFFFFFFFFFFFFF
#define SUBGHZ_ALUTECH_AT_4N_RAINBOW_TABLE_SIZE_BYTES 32
//variable used to bypass CounterMode settings if user just change Counter or Button
static bool bypass = false;
static const SubGhzBlockConst subghz_protocol_alutech_at_4n_const = {
.te_short = 400,
.te_long = 800,
@@ -295,9 +298,13 @@ static bool subghz_protocol_alutech_at_4n_gen_data(
instance->generic.serial = (uint32_t)(data >> 24) & 0xFFFFFFFF;
}
if(alutech_at4n_counter_mode == 0) {
// if we change counter/button in SignalSettings menu then we must bypass counter_modes, just gen and save signal file.
if(subghz_block_generic_global.cnt_need_override) bypass = true;
if((alutech_at4n_counter_mode == 0) || bypass) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
if((furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) || bypass) {
bypass = false;
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
@@ -403,8 +410,10 @@ static bool subghz_protocol_encoder_alutech_at_4n_get_upload(
btn = subghz_protocol_alutech_at_4n_get_btn_code();
// override button if we change it with signal settings button editor
if(subghz_block_generic_global_button_override_get(&btn))
if(subghz_block_generic_global_button_override_get(&btn)) {
bypass = true;
FURI_LOG_D(TAG, "Button sucessfully changed to 0x%X", btn);
}
// Gen new key
if(!subghz_protocol_alutech_at_4n_gen_data(instance, btn)) {
+11 -2
View File
@@ -11,6 +11,9 @@
#define TAG "SubGhzProtocoCameAtomo"
//variable used to bypass CounterMode settings if user just change Counter or Button
static bool bypass = false;
static const SubGhzBlockConst subghz_protocol_came_atomo_const = {
.te_short = 600,
.te_long = 1200,
@@ -189,9 +192,15 @@ static void subghz_protocol_encoder_came_atomo_get_upload(
uint8_t pack[8] = {};
if(came_atomo_counter_mode == 0) {
// if we change counter/button in SignalSettings menu then we must bypass counter_modes, just gen and save signal file.
if(subghz_block_generic_global.cnt_need_override ||
subghz_block_generic_global.btn_need_override)
bypass = true;
if(came_atomo_counter_mode == 0 || bypass) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF || bypass) {
bypass = false;
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
+16 -5
View File
@@ -15,10 +15,13 @@
#define TAG "SubGhzProtocolKeeloq"
//variable used to bypass CounterMode settings if user just change Counter or Button
static bool bypass = false;
static const SubGhzBlockConst subghz_protocol_keeloq_const = {
.te_short = 400,
.te_long = 800,
.te_delta = 140,
.te_delta = 180,
.min_count_bit_for_found = 64,
};
@@ -176,7 +179,8 @@ static bool subghz_protocol_keeloq_gen_data(
} else if(
(strcmp(instance->manufacture_name, "FAAC_RC,XT") == 0) ||
(strcmp(instance->manufacture_name, "Monarch") == 0) ||
(strcmp(instance->manufacture_name, "NICE_Smilo") == 0)) {
(strcmp(instance->manufacture_name, "NICE_Smilo") == 0) ||
(strcmp(instance->manufacture_name, "Genius_Bravo") == 0)) {
klq_last_custom_btn = 0xB;
} else if(
(strcmp(instance->manufacture_name, "Novoferm") == 0) ||
@@ -243,9 +247,10 @@ static bool subghz_protocol_keeloq_gen_data(
if(counter_up && prog_mode == PROG_MODE_OFF) {
// Counter increment conditions
if(keeloq_counter_mode == 0) {
if(keeloq_counter_mode == 0 || bypass) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF || bypass) {
bypass = false;
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
@@ -603,7 +608,13 @@ static bool
instance->encoder.size_upload = 0;
size_t upindex = 0;
if(keeloq_counter_mode == 7) {
// if we change counter/button in SignalSettings menu then we must bypass counter_modes, just gen and save signal file.
if(subghz_block_generic_global.cnt_need_override ||
subghz_block_generic_global.btn_need_override)
bypass = true;
// Create mode7 upload only if counter and button was not changed by SignalSettings menu
if(keeloq_counter_mode == 7 && !bypass) {
uint16_t temp_cnt = instance->generic.cnt;
instance->encoder.repeat = 1;
for(uint8_t i = 7; i > 0; i--) {
+13 -3
View File
@@ -21,6 +21,9 @@
#define SUBGHZ_NICE_FLOR_S_RAINBOW_TABLE_SIZE_BYTES 32
#define SUBGHZ_NO_NICE_FLOR_S_RAINBOW_TABLE 0
//variable used to bypass CounterMode settings if user just change Counter or Button
static bool bypass = false;
static const SubGhzBlockConst subghz_protocol_nice_flor_s_const = {
.te_short = 500,
.te_long = 1000,
@@ -152,8 +155,10 @@ static void subghz_protocol_encoder_nice_flor_s_get_upload(
btn = subghz_protocol_nice_flor_s_get_btn_code();
// override button if we change it with signal settings button editor
if(subghz_block_generic_global_button_override_get(&btn))
if(subghz_block_generic_global_button_override_get(&btn)) {
bypass = true;
FURI_LOG_D(TAG, "Button sucessfully changed to 0x%X", btn);
}
size_t size_upload = ((instance->generic.data_count_bit * 2) + ((37 + 2 + 2) * 2) * 16);
if(size_upload > instance->encoder.size_upload) {
@@ -161,9 +166,14 @@ static void subghz_protocol_encoder_nice_flor_s_get_upload(
} else {
instance->encoder.size_upload = size_upload;
}
if(nice_flors_counter_mode == 0) {
// if we change counter/button in SignalSettings menu then we must bypass counter_modes, just gen and save signal file.
if(subghz_block_generic_global.cnt_need_override) bypass = true;
if(nice_flors_counter_mode == 0 || bypass) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF || bypass) {
bypass = false;
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value
+12 -3
View File
@@ -10,6 +10,9 @@
#define TAG "SubGhzProtocolPhoenixV2"
//variable used to bypass CounterMode settings if user just change Counter or Button
static bool bypass = false;
static const SubGhzBlockConst subghz_protocol_phoenix_v2_const = {
.te_short = 427,
.te_long = 853,
@@ -258,13 +261,19 @@ static bool
btn = subghz_protocol_phoenix_v2_get_btn_code();
// override button if we change it with signal settings button editor
if(subghz_block_generic_global_button_override_get(&btn))
if(subghz_block_generic_global_button_override_get(&btn)) {
bypass = true;
FURI_LOG_D(TAG, "Button sucessfully changed to 0x%X", btn);
}
// Reconstruction of the data
if(v2_phoenix_counter_mode == 0) {
// if we change counter/button in SignalSettings menu then we must bypass counter_modes, just gen and save signal file.
if(subghz_block_generic_global.cnt_need_override) bypass = true;
if(v2_phoenix_counter_mode == 0 || bypass) {
// Check for OFEX (overflow experimental) mode
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) {
if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF || bypass) {
bypass = false;
// standart counter mode. PULL data from subghz_block_generic_global variables
if(!subghz_block_generic_global_counter_override_get(&instance->generic.cnt)) {
// if counter_override_get return FALSE then counter was not changed and we increase counter by standart mult value