mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 23:14:20 +00:00
SecPlus 2.0 - Add new custom button
Fix issue with add manually
This commit is contained in:
parent
a11b6e72dc
commit
1e1b85a575
2 changed files with 33 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
* SubGHz Remote: Full refactoring, app was re-made from scratch (by @gid9798)
|
||||
* Archive: Fix rename, show error message to user
|
||||
* 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: Fix counter settings in debug
|
||||
* SubGHz: Move dangerous_settings check (by @gid9798 | PR #475)
|
||||
|
|
|
@ -345,7 +345,7 @@ static void
|
|||
if(subghz_custom_btn_get_original() == 0) {
|
||||
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
|
||||
* Basic set | 0x68 | 0x80 | 0x81 | 0xE2 |
|
||||
* Basic set | 0x68 | 0x80 | 0x81 | 0xE2 | 0x78
|
||||
* @return Button 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:
|
||||
btn = 0x80;
|
||||
break;
|
||||
case 0x78:
|
||||
btn = 0x80;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -874,6 +877,9 @@ static uint8_t subghz_protocol_secplus_v2_get_btn_code() {
|
|||
case 0xE2:
|
||||
btn = 0x81;
|
||||
break;
|
||||
case 0x78:
|
||||
btn = 0x81;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
@ -892,6 +898,30 @@ static uint8_t subghz_protocol_secplus_v2_get_btn_code() {
|
|||
case 0xE2:
|
||||
btn = 0x68;
|
||||
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:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue