mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-15 20:01:54 -07:00
Make FDX-B readout more descriptive
OFW PR 4297 by snowsign
This commit is contained in:
@@ -284,9 +284,12 @@ void protocol_fdx_b_render_data(ProtocolFDXB* protocol, FuriString* result) {
|
||||
|
||||
bool block_status = bit_lib_get_bit(protocol->data, 48);
|
||||
bool rudi_bit = bit_lib_get_bit(protocol->data, 49);
|
||||
uint8_t reserved = bit_lib_get_bits(protocol->data, 50, 5);
|
||||
uint8_t user_info = bit_lib_get_bits(protocol->data, 55, 5);
|
||||
uint8_t replacement_number = bit_lib_get_bits(protocol->data, 60, 3);
|
||||
uint8_t visual_start_digit =
|
||||
bit_lib_reverse_8_fast(bit_lib_get_bits(protocol->data, 50, 3) << 5);
|
||||
uint8_t reserved = bit_lib_reverse_8_fast(bit_lib_get_bits(protocol->data, 53, 2) << 6);
|
||||
uint8_t user_info = bit_lib_reverse_8_fast(bit_lib_get_bits(protocol->data, 55, 5) << 3);
|
||||
uint8_t replacement_number =
|
||||
bit_lib_reverse_8_fast(bit_lib_get_bits(protocol->data, 60, 3) << 5);
|
||||
bool animal_flag = bit_lib_get_bit(protocol->data, 63);
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
FuriString* country_full_name = furi_string_alloc();
|
||||
@@ -320,13 +323,19 @@ void protocol_fdx_b_render_data(ProtocolFDXB* protocol, FuriString* result) {
|
||||
result,
|
||||
"\n"
|
||||
"Animal: %s\n"
|
||||
"Bits: %hhX-%hhX-%hhX-%hhX-%hhX",
|
||||
"Visual Start Digit: %hu\n"
|
||||
"Replacement Number: %hu\n"
|
||||
"User Info: %hhX\n"
|
||||
"Data Block: %s\n"
|
||||
"RUDI Bit: %s\n"
|
||||
"RFU: %hhX\n",
|
||||
animal_flag ? "Yes" : "No",
|
||||
block_status,
|
||||
rudi_bit,
|
||||
reserved,
|
||||
visual_start_digit,
|
||||
replacement_number,
|
||||
user_info,
|
||||
replacement_number);
|
||||
block_status ? "Present" : "Absent",
|
||||
rudi_bit ? "Yes" : "No",
|
||||
reserved);
|
||||
|
||||
furi_string_free(country_full_name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user