Skip to content

Commit 9484ad2

Browse files
committed
Merge remote-tracking branch 'origin/dev' into astra/3917-rpc-single-tap
2 parents 164c8fe + 7d5358b commit 9484ad2

File tree

3 files changed

+2504
-1096
lines changed

3 files changed

+2504
-1096
lines changed

applications/main/nfc/plugins/supported_cards/clipper.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ static const IdMapping bart_zones[] = {
101101
{.id = 0x001d, .name = "Lake Merrit"},
102102
{.id = 0x001e, .name = "Fruitvale"},
103103
{.id = 0x001f, .name = "Coliseum"},
104-
{.id = 0x0021, .name = "San Leandro"},
104+
{.id = 0x0020, .name = "San Leandro"},
105+
{.id = 0x0021, .name = "Bay Fair"},
105106
{.id = 0x0022, .name = "Hayward"},
106107
{.id = 0x0023, .name = "South Hayward"},
107108
{.id = 0x0024, .name = "Union City"},
@@ -131,6 +132,9 @@ static const IdMapping muni_zones[] = {
131132
{.id = 0x000b, .name = "Castro"},
132133
{.id = 0x000c, .name = "Forest Hill"}, // Guessed
133134
{.id = 0x000d, .name = "West Portal"},
135+
{.id = 0x0019, .name = "Union Square/Market Street"},
136+
{.id = 0x001a, .name = "Chinatown - Rose Pak"},
137+
{.id = 0x001b, .name = "Yerba Buena/Moscone"},
134138
};
135139
static const size_t kNumMUNIZones = COUNT(muni_zones);
136140

applications/main/nfc/plugins/supported_cards/plantain.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
310310
last_payment_date.year,
311311
last_payment_date.hour,
312312
last_payment_date.minute);
313-
//payment amount. This needs to be investigated more, currently it shows incorrect amount on some cards.
314-
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
315-
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
313+
//Last payment amount.
314+
uint16_t last_payment = ((data->block[18].data[10] << 16) |
315+
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
316+
100;
317+
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
316318
furi_string_free(card_number_s);
317319
furi_string_free(tmp_s);
318320
//This is for 4K Plantains.
@@ -369,9 +371,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
369371
last_payment_date.year,
370372
last_payment_date.hour,
371373
last_payment_date.minute);
372-
//payment amount
373-
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
374-
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
374+
//Last payment amount
375+
uint16_t last_payment = ((data->block[18].data[10] << 16) |
376+
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
377+
100;
378+
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
375379
furi_string_free(card_number_s);
376380
furi_string_free(tmp_s);
377381
}

0 commit comments

Comments
 (0)