Add checks for RFID error codes
This commit is contained in:
parent
beacdf98e7
commit
9fb3b6bc1c
@ -10,6 +10,12 @@ var html = `
|
|||||||
<link rel="stylesheet" href="https://unpkg.com/purecss@0.6.2/build/pure-min.css" integrity="sha384-UQiGfs9ICog+LwheBSRCt1o5cbyKIHbwjWscjemyBMT9YCUMZffs6UqUTd0hObXD" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://unpkg.com/purecss@0.6.2/build/pure-min.css" integrity="sha384-UQiGfs9ICog+LwheBSRCt1o5cbyKIHbwjWscjemyBMT9YCUMZffs6UqUTd0hObXD" crossorigin="anonymous">
|
||||||
<style>
|
<style>
|
||||||
form { margin: 1em 0; }
|
form { margin: 1em 0; }
|
||||||
|
.button-error {
|
||||||
|
color: white;
|
||||||
|
border-radius: 4px;
|
||||||
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||||
|
background: rgb(202, 60, 60);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -18,9 +24,11 @@ var html = `
|
|||||||
<h1>tag-reader-dummy</h1>
|
<h1>tag-reader-dummy</h1>
|
||||||
<form method="post" class="pure-form">
|
<form method="post" class="pure-form">
|
||||||
<input class="pure-button pure-button-primary" type="submit" name="uid" value="12121212">
|
<input class="pure-button pure-button-primary" type="submit" name="uid" value="12121212">
|
||||||
|
OK Then.mp3
|
||||||
</form>
|
</form>
|
||||||
<form method="post" class="pure-form">
|
<form method="post" class="pure-form">
|
||||||
<input class="pure-button pure-button-primary" type="submit" name="uid" value="BADC0FFEE">
|
<input class="pure-button pure-button-primary" type="submit" name="uid" value="BADC0FFEE">
|
||||||
|
Brazil Theme.mp3
|
||||||
</form>
|
</form>
|
||||||
<div>
|
<div>
|
||||||
<form method="post" class="pure-form" style="display: inline-block;">
|
<form method="post" class="pure-form" style="display: inline-block;">
|
||||||
@ -30,6 +38,14 @@ var html = `
|
|||||||
<input class="pure-button pure-button-primary" type="submit" name="uid" value="PAUSEPAUSE">
|
<input class="pure-button pure-button-primary" type="submit" name="uid" value="PAUSEPAUSE">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<form method="post" class="pure-form" style="display: inline-block;">
|
||||||
|
<input class="pure-button button-error" type="submit" name="uid" value="E1">
|
||||||
|
</form>
|
||||||
|
<form method="post" class="pure-form" style="display: inline-block;">
|
||||||
|
<input class="pure-button button-error" type="submit" name="uid" value="E2">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<form method="post" class="pure-form">
|
<form method="post" class="pure-form">
|
||||||
<input type="text" name="uid" value="0123456789"> <input class="pure-button pure-button-primary" type="submit">
|
<input type="text" name="uid" value="0123456789"> <input class="pure-button pure-button-primary" type="submit">
|
||||||
</form>
|
</form>
|
||||||
|
@ -54,6 +54,10 @@ process.on('exit', exitHandler.bind(null));
|
|||||||
process.on('SIGINT', exitHandler.bind(null, {exit:true}));
|
process.on('SIGINT', exitHandler.bind(null, {exit:true}));
|
||||||
|
|
||||||
TagReader.on('message', tag => {
|
TagReader.on('message', tag => {
|
||||||
|
if (tag == 'E1' || tag == 'E2') {
|
||||||
|
logger.debug("tagreader had rfid read error", { tag: tag });
|
||||||
|
return;
|
||||||
|
}
|
||||||
logger.debug("got tag from tagreader", { tag: tag });
|
logger.debug("got tag from tagreader", { tag: tag });
|
||||||
MediaLibrary.find(tag);
|
MediaLibrary.find(tag);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user