mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
never sleep
This commit is contained in:
@@ -483,7 +483,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_SIMPLE:
|
||||
// Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
@@ -493,7 +493,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
// Normal Learning
|
||||
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
|
||||
man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -503,7 +503,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_SECURE:
|
||||
man = subghz_protocol_keeloq_common_secure_learning(
|
||||
fix, seed, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -513,7 +513,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_MAGIC_XOR_TYPE_1:
|
||||
man = subghz_protocol_keeloq_common_magic_xor_type1_learning(
|
||||
fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -523,7 +523,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_UNKNOWN:
|
||||
// Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
@@ -544,7 +544,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
// Normal Learning
|
||||
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
|
||||
man = subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -562,7 +562,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
// Secure Learning
|
||||
man = subghz_protocol_keeloq_common_secure_learning(
|
||||
fix, seed, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -580,7 +580,7 @@ static uint8_t subghz_protocol_keeloq_check_remote_controller_selector(
|
||||
// Magic xor type1 learning
|
||||
man = subghz_protocol_keeloq_common_magic_xor_type1_learning(
|
||||
fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man);
|
||||
if(subghz_protocol_keeloq_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
|
||||
@@ -132,9 +132,9 @@ static bool
|
||||
FURI_LOG_I(TAG, "counter = %04lX", instance->generic.cnt);
|
||||
FURI_LOG_I(TAG, "button = %01lX", btn);
|
||||
uint64_t decrypt = ((uint64_t)instance->generic.serial << 16) | instance->generic.cnt;
|
||||
FURI_LOG_I(TAG, "decrypt = %011lX", decrypt);
|
||||
FURI_LOG_I(TAG, "decrypt = %011lX", (uint64_t)decrypt);
|
||||
uint64_t enc_part = subghz_protocol_nice_flor_s_encrypt(decrypt, file_name);
|
||||
FURI_LOG_I(TAG, "enc_part = %011lX", enc_part);
|
||||
FURI_LOG_I(TAG, "enc_part = %011lX", (uint64_t)enc_part);
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -170,7 +170,7 @@ static bool
|
||||
//Button 4
|
||||
instance->generic.data = ((uint64_t)btn << 4) | (0xF ^ btn ^ loops[3][i]) << 44 | enc_part;
|
||||
}
|
||||
FURI_LOG_I(TAG, "key = %013lX", instance->generic.data);
|
||||
FURI_LOG_I(TAG, "key = %013lX", (uint64_t)instance->generic.data);
|
||||
|
||||
//Send header
|
||||
for(uint8_t i = 35; i > 0; i--) {
|
||||
@@ -323,7 +323,7 @@ uint64_t subghz_protocol_nice_flor_s_encrypt(uint64_t data, const char* file_nam
|
||||
k = ~p[3];
|
||||
p[3] = ~p[1];
|
||||
p[1] = k;
|
||||
FURI_LOG_I(TAG, "encrypted_data = %011lX", data);
|
||||
FURI_LOG_I(TAG, "encrypted_data = %011lX", (uint64_t)data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ static uint64_t
|
||||
p[1] = k;
|
||||
}
|
||||
}
|
||||
FURI_LOG_I(TAG, "decrypted_data = %011lX", data);
|
||||
FURI_LOG_I(TAG, "decrypted_data = %011lX", (uint64_t)data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ static void subghz_protocol_nice_flor_s_remote_controller(
|
||||
instance->btn = 0;
|
||||
} else {
|
||||
uint64_t decrypt = subghz_protocol_nice_flor_s_decrypt(instance, file_name);
|
||||
FURI_LOG_I(TAG, "init_decrypted_data = %013lX", decrypt);
|
||||
FURI_LOG_I(TAG, "init_decrypted_data = %013lX", (uint64_t)decrypt);
|
||||
instance->cnt = decrypt & 0xFFFF;
|
||||
instance->serial = (decrypt >> 16) & 0xFFFFFFF;
|
||||
instance->btn = (decrypt >> 48) & 0xF;
|
||||
|
||||
@@ -461,7 +461,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_SIMPLE:
|
||||
//Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
@@ -472,7 +472,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
|
||||
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
|
||||
man_normal_learning =
|
||||
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
|
||||
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
@@ -482,7 +482,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
|
||||
case KEELOQ_LEARNING_UNKNOWN:
|
||||
// Simple Learning
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
return 1;
|
||||
@@ -504,7 +504,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
|
||||
// https://phreakerclub.com/forum/showpost.php?p=43557&postcount=37
|
||||
man_normal_learning =
|
||||
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", manufacture_code->key);
|
||||
FURI_LOG_I(TAG, "mfkey: %016lX", (uint64_t)manufacture_code->key);
|
||||
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
|
||||
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
|
||||
*manufacture_name = string_get_cstr(manufacture_code->name);
|
||||
|
||||
Reference in New Issue
Block a user