SubGhz: frequency hopping mode (#671)
* SubGhz: fix assert on worker double stop. * SubGhz: add hopping mode (315.00, 433.92, 868.00) * SubGhz: add support for new alarms on the keelog protocol * SubGhz: update te in princeton protocol * SubGhz: move static to tests, rename sniffer to hopper/auto, remove delay from timer thread, optimize locking strategy. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -65,7 +65,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
//Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -78,7 +79,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -88,7 +90,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
// Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -102,7 +105,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
}
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_rev);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -114,7 +118,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -129,7 +134,8 @@ uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, man_rev);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
|
||||
if((decrypt >> 28 == btn) &&
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial)) {
|
||||
(((((uint16_t)(decrypt >> 16)) & 0x3FF) == end_serial) ||
|
||||
((((uint16_t)(decrypt >> 16)) & 0x3FF) == 0))) {
|
||||
instance->manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
instance->common.cnt = decrypt & 0x0000FFFF;
|
||||
return 1;
|
||||
@@ -453,4 +459,4 @@ void subghz_decoder_keeloq_to_load_protocol(
|
||||
instance->common.code_last_found = data->code_found;
|
||||
instance->common.code_last_count_bit = data->code_count_bit;
|
||||
subghz_protocol_keeloq_check_remote_controller(instance);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user