mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 12:42:30 +04:00
SecPlus 2.0 - Add new custom button
Fix issue with add manually
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
* SubGHz Remote: Full refactoring, app was re-made from scratch (by @gid9798)
|
* SubGHz Remote: Full refactoring, app was re-made from scratch (by @gid9798)
|
||||||
* Archive: Fix rename, show error message to user
|
* Archive: Fix rename, show error message to user
|
||||||
* API: Cleanup, mini refactoring of some apps (+6k of free flash space)
|
* API: Cleanup, mini refactoring of some apps (+6k of free flash space)
|
||||||
|
* SubGHz: Security+ 2.0 -> add extra custom button `0x78` - Fixes issue #469
|
||||||
* SubGHz: Various fixes (by @gid9798)
|
* SubGHz: Various fixes (by @gid9798)
|
||||||
* SubGHz: Fix counter settings in debug
|
* SubGHz: Fix counter settings in debug
|
||||||
* SubGHz: Move dangerous_settings check (by @gid9798 | PR #475)
|
* SubGHz: Move dangerous_settings check (by @gid9798 | PR #475)
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ static void
|
|||||||
if(subghz_custom_btn_get_original() == 0) {
|
if(subghz_custom_btn_get_original() == 0) {
|
||||||
subghz_custom_btn_set_original(instance->btn);
|
subghz_custom_btn_set_original(instance->btn);
|
||||||
}
|
}
|
||||||
subghz_custom_btn_set_max(3);
|
subghz_custom_btn_set_max(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -377,7 +377,7 @@ static uint64_t subghz_protocol_secplus_v2_encode_half(uint8_t roll_array[], uin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines the button value for the current btn_id
|
* Defines the button value for the current btn_id
|
||||||
* Basic set | 0x68 | 0x80 | 0x81 | 0xE2 |
|
* Basic set | 0x68 | 0x80 | 0x81 | 0xE2 | 0x78
|
||||||
* @return Button code
|
* @return Button code
|
||||||
*/
|
*/
|
||||||
static uint8_t subghz_protocol_secplus_v2_get_btn_code();
|
static uint8_t subghz_protocol_secplus_v2_get_btn_code();
|
||||||
@@ -856,6 +856,9 @@ static uint8_t subghz_protocol_secplus_v2_get_btn_code() {
|
|||||||
case 0xE2:
|
case 0xE2:
|
||||||
btn = 0x80;
|
btn = 0x80;
|
||||||
break;
|
break;
|
||||||
|
case 0x78:
|
||||||
|
btn = 0x80;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -874,6 +877,9 @@ static uint8_t subghz_protocol_secplus_v2_get_btn_code() {
|
|||||||
case 0xE2:
|
case 0xE2:
|
||||||
btn = 0x81;
|
btn = 0x81;
|
||||||
break;
|
break;
|
||||||
|
case 0x78:
|
||||||
|
btn = 0x81;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -892,6 +898,30 @@ static uint8_t subghz_protocol_secplus_v2_get_btn_code() {
|
|||||||
case 0xE2:
|
case 0xE2:
|
||||||
btn = 0x68;
|
btn = 0x68;
|
||||||
break;
|
break;
|
||||||
|
case 0x78:
|
||||||
|
btn = 0xE2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else if(custom_btn_id == SUBGHZ_CUSTOM_BTN_RIGHT) {
|
||||||
|
switch(original_btn_code) {
|
||||||
|
case 0x68:
|
||||||
|
btn = 0x78;
|
||||||
|
break;
|
||||||
|
case 0x80:
|
||||||
|
btn = 0x78;
|
||||||
|
break;
|
||||||
|
case 0x81:
|
||||||
|
btn = 0x78;
|
||||||
|
break;
|
||||||
|
case 0xE2:
|
||||||
|
btn = 0x78;
|
||||||
|
break;
|
||||||
|
case 0x78:
|
||||||
|
btn = 0x68;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user