Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into astra/3917-rpc-single-tap
Browse files Browse the repository at this point in the history
  • Loading branch information
gsurkov committed Dec 13, 2024
2 parents 164c8fe + 7d5358b commit 9484ad2
Show file tree
Hide file tree
Showing 3 changed files with 2,504 additions and 1,096 deletions.
6 changes: 5 additions & 1 deletion applications/main/nfc/plugins/supported_cards/clipper.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ static const IdMapping bart_zones[] = {
{.id = 0x001d, .name = "Lake Merrit"},
{.id = 0x001e, .name = "Fruitvale"},
{.id = 0x001f, .name = "Coliseum"},
{.id = 0x0021, .name = "San Leandro"},
{.id = 0x0020, .name = "San Leandro"},
{.id = 0x0021, .name = "Bay Fair"},
{.id = 0x0022, .name = "Hayward"},
{.id = 0x0023, .name = "South Hayward"},
{.id = 0x0024, .name = "Union City"},
Expand Down Expand Up @@ -131,6 +132,9 @@ static const IdMapping muni_zones[] = {
{.id = 0x000b, .name = "Castro"},
{.id = 0x000c, .name = "Forest Hill"}, // Guessed
{.id = 0x000d, .name = "West Portal"},
{.id = 0x0019, .name = "Union Square/Market Street"},
{.id = 0x001a, .name = "Chinatown - Rose Pak"},
{.id = 0x001b, .name = "Yerba Buena/Moscone"},
};
static const size_t kNumMUNIZones = COUNT(muni_zones);

Expand Down
16 changes: 10 additions & 6 deletions applications/main/nfc/plugins/supported_cards/plantain.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
last_payment_date.year,
last_payment_date.hour,
last_payment_date.minute);
//payment amount. This needs to be investigated more, currently it shows incorrect amount on some cards.
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
//Last payment amount.
uint16_t last_payment = ((data->block[18].data[10] << 16) |
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
100;
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
furi_string_free(card_number_s);
furi_string_free(tmp_s);
//This is for 4K Plantains.
Expand Down Expand Up @@ -369,9 +371,11 @@ static bool plantain_parse(const NfcDevice* device, FuriString* parsed_data) {
last_payment_date.year,
last_payment_date.hour,
last_payment_date.minute);
//payment amount
uint16_t last_payment = (data->block[18].data[9] << 8) | data->block[18].data[8];
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment / 100);
//Last payment amount
uint16_t last_payment = ((data->block[18].data[10] << 16) |
(data->block[18].data[9] << 8) | (data->block[18].data[8])) /
100;
furi_string_cat_printf(parsed_data, "Amount: %d rub", last_payment);
furi_string_free(card_number_s);
furi_string_free(tmp_s);
}
Expand Down
Loading

0 comments on commit 9484ad2

Please sign in to comment.