Skip to content

Commit

Permalink
nfc: add Caltrain zones for Clipper (#3969)
Browse files Browse the repository at this point in the history
Co-authored-by: tomholford <tomholford@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent cb8c1e3 commit 55d1588
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions applications/main/nfc/plugins/supported_cards/clipper.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ static const IdMapping actransit_zones[] = {
};
static const size_t kNumACTransitZones = COUNT(actransit_zones);

// Instead of persisting individual Station IDs, Caltrain saves Zone numbers.
// https://www.caltrain.com/stations-zones
static const IdMapping caltrain_zones[] = {
{.id = 0x0001, .name = "Zone 1"},
{.id = 0x0002, .name = "Zone 2"},
{.id = 0x0003, .name = "Zone 3"},
{.id = 0x0004, .name = "Zone 4"},
{.id = 0x0005, .name = "Zone 5"},
{.id = 0x0006, .name = "Zone 6"},
};

static const size_t kNumCaltrainZones = COUNT(caltrain_zones);

//
// Full agency+zone mapping.
//
Expand All @@ -149,6 +162,7 @@ static const struct {
} agency_zone_map[] = {
{.agency_id = 0x0001, .zone_map = actransit_zones, .zone_count = kNumACTransitZones},
{.agency_id = 0x0004, .zone_map = bart_zones, .zone_count = kNumBARTZones},
{.agency_id = 0x0006, .zone_map = caltrain_zones, .zone_count = kNumCaltrainZones},
{.agency_id = 0x0012, .zone_map = muni_zones, .zone_count = kNumMUNIZones}};
static const size_t kNumAgencyZoneMaps = COUNT(agency_zone_map);

Expand Down

0 comments on commit 55d1588

Please # to comment.