Skip to content

Commit

Permalink
Bumping version to 0.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 8, 2018
1 parent 9ac45f1 commit f3992bf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## 0.1.9 - 2018-10-08
## 0.1.10 - 2018-10-08

* Stream from Azure Blob Storage

Expand Down
4 changes: 2 additions & 2 deletions src/Client/ReleaseNotes.fs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module internal ReleaseNotes

let Version = "0.1.9"
let Version = "0.1.10"

let IsPrerelease = false

let Notes = """
# Release Notes
## 0.1.9 - 2018-10-08
## 0.1.10 - 2018-10-08
* Stream from Azure Blob Storage
Expand Down
2 changes: 1 addition & 1 deletion src/PiServer/PiServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ startupTask.Wait()
if isWindows then
()
else
let r = nodeServices.InvokeExportAsync<string>("./read-tag", "play", "ard")
let r = nodeServices.InvokeExportAsync<string>("./read-tag", "read", "tag")
r.Wait()
let token = r.Result
let r = executeTag nodeServices token
Expand Down
29 changes: 17 additions & 12 deletions src/PiServer/read-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,19 @@ console.log("scanning...");
console.log("Please put chip or keycard in the antenna inductive zone!");
console.log("Press Ctrl-C to stop.");

var lastTag = "";

exports.read = function (callback, fileName) {
setInterval(function(){
//# reset card
var lastTag = "";
var readInterval = setInterval(function(){
mfrc522.reset();

//# Scan for cards
let response = mfrc522.findCard();
if (!response.status) {
if(lastTag != "") {
lastTag = "";
console.log("Card removed");
}
return;
}
console.log("Card detected, CardType: " + response.bitSize);


clearInterval(readInterval);

//# Get the UID of the card
response = mfrc522.getUid();
if (!response.status) {
Expand All @@ -40,8 +35,18 @@ exports.read = function (callback, fileName) {
console.log("Card read UID: %s", data);
callback(null, data);
}
}, 500);
}

exports.removed = function (callback, lastTag) {
var readInterval = setInterval(function(){
mfrc522.reset();

//# Stop
mfrc522.stopCrypto();
let response = mfrc522.findCard();
if (!response.status) {
clearInterval(readInterval);
callback(null, "");
return;
}
}, 500);
}

0 comments on commit f3992bf

Please sign in to comment.