This commit is contained in:
MX 2024-06-11 16:15:18 +03:00
parent b1519ef58f
commit d4d5b1b55a
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83
2 changed files with 11 additions and 11 deletions

View file

@ -189,7 +189,7 @@ static bool microel_parse(const NfcDevice* device, FuriString* parsed_data) {
//Get credit in block number 8
const uint8_t* temp_ptr = data->block[4].data;
uint16_t balance = (temp_ptr[6] << 8) | (temp_ptr[5]);
uint16_t previus_balance = (data->block[5].data[6] << 8) | (data->block[5].data[5]);
uint16_t previous_balance = (data->block[5].data[6] << 8) | (data->block[5].data[5]);
furi_string_cat_printf(parsed_data, "\e#Microel Card\n");
furi_string_cat_printf(parsed_data, "UID:");
for(size_t i = 0; i < UID_LENGTH; i++) {
@ -199,9 +199,9 @@ static bool microel_parse(const NfcDevice* device, FuriString* parsed_data) {
parsed_data, "\nCurrent Credit: %d.%02d E \n", balance / 100, balance % 100);
furi_string_cat_printf(
parsed_data,
"Previus Credit: %d.%02d E \n",
previus_balance / 100,
previus_balance % 100);
"Previous Credit: %d.%02d E \n",
previous_balance / 100,
previous_balance % 100);
parsed = true;
} while(false);

View file

@ -206,15 +206,15 @@ static bool mizip_parse(const NfcDevice* device, FuriString* parsed_data) {
//Get credit
uint8_t credit_pointer = 0x08;
uint8_t previus_credit_pointer = 0x09;
uint8_t previous_credit_pointer = 0x09;
if(data->block[10].data[0] == 0x55) {
credit_pointer = 0x09;
previus_credit_pointer = 0x08;
previous_credit_pointer = 0x08;
}
uint16_t balance = (data->block[credit_pointer].data[2] << 8) |
(data->block[credit_pointer].data[1]);
uint16_t previus_balance = (data->block[previus_credit_pointer].data[2] << 8) |
(data->block[previus_credit_pointer].data[1]);
uint16_t previous_balance = (data->block[previous_credit_pointer].data[2] << 8) |
(data->block[previous_credit_pointer].data[1]);
//parse data
furi_string_cat_printf(parsed_data, "\e#MiZIP Card\n");
@ -226,9 +226,9 @@ static bool mizip_parse(const NfcDevice* device, FuriString* parsed_data) {
parsed_data, "\nCurrent Credit: %d.%02d E \n", balance / 100, balance % 100);
furi_string_cat_printf(
parsed_data,
"Previus Credit: %d.%02d E \n",
previus_balance / 100,
previus_balance % 100);
"Previous Credit: %d.%02d E \n",
previous_balance / 100,
previous_balance % 100);
parsed = true;
} while(false);