mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-24 22:07:14 +03:00
remove serial check ui in gangqi [ci skip]
This commit is contained in:
parent
a17cbd0419
commit
9799a07db6
@ -488,23 +488,12 @@ void subghz_protocol_decoder_gangqi_get_string(void* context, FuriString* output
|
|||||||
((instance->generic.data >> 24) & 0xFF) -
|
((instance->generic.data >> 24) & 0xFF) -
|
||||||
((instance->generic.data >> 16) & 0xFF) - ((instance->generic.data >> 8) & 0xFF);
|
((instance->generic.data >> 16) & 0xFF) - ((instance->generic.data >> 8) & 0xFF);
|
||||||
|
|
||||||
// Get 3 bytes sum
|
|
||||||
uint16_t sum_3bytes_serial = ((instance->generic.serial >> 16) & 0xFF) +
|
|
||||||
((instance->generic.serial >> 8) & 0xFF) +
|
|
||||||
(instance->generic.serial & 0xFF);
|
|
||||||
// Returns true if serial is valid
|
|
||||||
bool serial_is_valid =
|
|
||||||
(((!(sum_3bytes_serial & 0x3)) &&
|
|
||||||
((0xB < sum_3bytes_serial) && (sum_3bytes_serial < 0x141))) &&
|
|
||||||
(((instance->generic.serial >> 16) & 0xFF) <= 0x3));
|
|
||||||
|
|
||||||
furi_string_cat_printf(
|
furi_string_cat_printf(
|
||||||
output,
|
output,
|
||||||
"%s %db\r\n"
|
"%s %db\r\n"
|
||||||
"Key: 0x%X%08lX\r\n"
|
"Key: 0x%X%08lX\r\n"
|
||||||
"Serial: 0x%05lX CRC: 0x%02X\r\n"
|
"Serial: 0x%05lX CRC: 0x%02X\r\n"
|
||||||
"Btn: 0x%01X - %s\r\n"
|
"Btn: 0x%01X - %s\r\n",
|
||||||
"Serial is %s\r\n",
|
|
||||||
instance->generic.protocol_name,
|
instance->generic.protocol_name,
|
||||||
instance->generic.data_count_bit,
|
instance->generic.data_count_bit,
|
||||||
(uint8_t)(instance->generic.data >> 32),
|
(uint8_t)(instance->generic.data >> 32),
|
||||||
@ -512,6 +501,5 @@ void subghz_protocol_decoder_gangqi_get_string(void* context, FuriString* output
|
|||||||
instance->generic.serial,
|
instance->generic.serial,
|
||||||
crc,
|
crc,
|
||||||
instance->generic.btn,
|
instance->generic.btn,
|
||||||
subghz_protocol_gangqi_get_button_name(instance->generic.btn),
|
subghz_protocol_gangqi_get_button_name(instance->generic.btn));
|
||||||
serial_is_valid ? "valid" : "invalid");
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user