-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add locking of tags. #6
Open
RoopeHakulinen
wants to merge
6
commits into
master
Choose a base branch
from
locking
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+241
−24
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dc1883c
Add locking of tags.
RoopeHakulinen ad44596
Fix the documentation.
RoopeHakulinen ea7213b
Add missing semicolons.
RoopeHakulinen db29d44
We are protecting reads, not writes.
RoopeHakulinen ae78eb0
Merge remote-tracking branch 'origin/master' into locking
RoopeHakulinen a2951d6
Use long over int for pin everywhere.
RoopeHakulinen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,66 @@ | ||
var exec = require('cordova/exec'); | ||
|
||
|
||
exports.enabled = function(success, error) { | ||
exports.enabled = function (success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "enabled", []); | ||
}; | ||
|
||
exports.connect = function(success, error) { | ||
exports.connect = function (success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "connect", []); | ||
}; | ||
|
||
exports.disconnect = function(success, error) { | ||
exports.disconnect = function (success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "disconnect", []); | ||
}; | ||
|
||
exports.isConnected = function(success, error) { | ||
exports.isConnected = function (success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "isConnected", []); | ||
}; | ||
|
||
exports.read = function(page, success, error) { | ||
exports.read = function (page, success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "read", [page]); | ||
}; | ||
|
||
exports.write = function(page, data, success, error) { | ||
exports.write = function (page, data, success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "write", [page, data]); | ||
}; | ||
|
||
exports.unlock = function(pin, success, error) { | ||
exports.unlock = function (pin, success, error) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "unlock", [pin]); | ||
}; | ||
|
||
exports.lock = function ( | ||
pinPage, | ||
pinAckPage, | ||
protectionPage, | ||
firstPageToBeProtectedPage, | ||
firstPageToBeProtected, | ||
pin, | ||
protectAlsoReads, | ||
authenticationTryLimit, | ||
success, | ||
error | ||
) { | ||
exec(success, error, "cordova-plugin-mifare-ultralight", "lock", [ | ||
pinPage, | ||
pinAckPage, | ||
protectionPage, | ||
firstPageToBeProtectedPage, | ||
firstPageToBeProtected, | ||
pin, | ||
protectAlsoReads, | ||
authenticationTryLimit | ||
]); | ||
}; | ||
|
||
exports.lockNTAG212 = function (firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error) { | ||
exports.lock(39, 40, 38, 37, firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error); | ||
}; | ||
|
||
exports.lockMF0UL11 = function (firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error) { | ||
exports.lock(12, 13, 11, 10, firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error); | ||
}; | ||
|
||
exports.lockMF0UL21 = function (firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error) { | ||
exports.lock(27, 28, 26, 25, firstPageToBeProtected, pin, protectAlsoReads, authenticationTryLimit, success, error); | ||
}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a an error just here at compilation:
error: illegal start of expression data = {
I'm not a Java developper so I don't know how to fix it actually :/
Maybe by modifying each entry on the array like data[0] = foo, data[1] = bar, etc .?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried that with beta release 1.1.2.. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got the exact same issue on line 75 ! (sorry for the delay, I'm working at Disneyland on weekends so I'm too exhausted to code after my shift :'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should've probably checked that too.. Fixed now in beta release 1.1.3 (I wish I understood the npm publishing as 1.1.0-beta.0 was not a valid semver according to npm).
Take your time. I don't need this feature myself nor do I use the plugin really nowadays :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the last errors I get: https://pastebin.com/pgX12tTf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.1.4 available :)