Skip to content

Commit

Permalink
Merge branch 'dev' into bug/read-of-locked-mful
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes authored Oct 31, 2024
2 parents e7cab3e + c807ffc commit cedb41b
Show file tree
Hide file tree
Showing 97 changed files with 5,455 additions and 571 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ PVS-Studio.log

.gdbinit

/fbt_options_local.py
/fbt_options_local.py

# JS packages
node_modules/
11 changes: 11 additions & 0 deletions applications/debug/unit_tests/resources/unit_tests/js/basic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
let tests = require("tests");
let flipper = require("flipper");

tests.assert_eq(1337, 1337);
tests.assert_eq("hello", "hello");

tests.assert_eq("compatible", sdkCompatibilityStatus(0, 1));
tests.assert_eq("firmwareTooOld", sdkCompatibilityStatus(100500, 0));
tests.assert_eq("firmwareTooNew", sdkCompatibilityStatus(-100500, 0));
tests.assert_eq(true, doesSdkSupport(["baseline"]));
tests.assert_eq(false, doesSdkSupport(["abobus", "other-nonexistent-feature"]));

tests.assert_eq("flipperdevices", flipper.firmwareVendor);
tests.assert_eq(0, flipper.jsSdkVersion[0]);
tests.assert_eq(1, flipper.jsSdkVersion[1]);
29 changes: 29 additions & 0 deletions applications/main/nfc/application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,35 @@ App(
sources=["plugins/supported_cards/trt.c"],
)

App(
appid="ndef_ul_parser",
apptype=FlipperAppType.PLUGIN,
cdefines=[("NDEF_PROTO", "NDEF_PROTO_UL")],
entry_point="ndef_plugin_ep",
targets=["f7"],
requires=["nfc"],
sources=["plugins/supported_cards/ndef.c"],
)
App(
appid="ndef_mfc_parser",
apptype=FlipperAppType.PLUGIN,
cdefines=[("NDEF_PROTO", "NDEF_PROTO_MFC")],
entry_point="ndef_plugin_ep",
targets=["f7"],
requires=["nfc"],
sources=["plugins/supported_cards/ndef.c"],
)

App(
appid="ndef_slix_parser",
apptype=FlipperAppType.PLUGIN,
cdefines=[("NDEF_PROTO", "NDEF_PROTO_SLIX")],
entry_point="ndef_plugin_ep",
targets=["f7"],
requires=["nfc"],
sources=["plugins/supported_cards/ndef.c"],
)

App(
appid="nfc_start",
targets=["f7"],
Expand Down
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
Loading

0 comments on commit cedb41b

Please sign in to comment.