@danidoble/webserial 4.1.2 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webserial.js +5 -4
- package/dist/webserial.umd.cjs +23 -23
- package/package.json +1 -1
package/dist/webserial.js
CHANGED
|
@@ -24,7 +24,7 @@ function _a() {
|
|
|
24
24
|
const ga = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), qn = { randomUUID: ga };
|
|
25
25
|
function ba(r, n, t) {
|
|
26
26
|
var i;
|
|
27
|
-
if (qn.randomUUID && !r)
|
|
27
|
+
if (qn.randomUUID && !n && !r)
|
|
28
28
|
return qn.randomUUID();
|
|
29
29
|
r = r || {};
|
|
30
30
|
const e = r.random ?? ((i = r.rng) == null ? void 0 : i.call(r)) ?? _a();
|
|
@@ -8373,7 +8373,7 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
|
|
|
8373
8373
|
return i === 1 ? (e.name = "Relay on", e.description = "Relay on", e.no_code = 16, s = "on") : i === 0 ? (e.name = "Relay off", e.description = "Relay off", e.no_code = 17, s = "off") : (e.name = "Status unknown", e.description = "Status unknown", e.no_code = 400), this.dispatch("status:relay", { enabled: s === "on" }), e;
|
|
8374
8374
|
}, ea = function(t, e) {
|
|
8375
8375
|
const i = parseInt(t[2], 16);
|
|
8376
|
-
if (e.no_code = 20 + i, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly",
|
|
8376
|
+
if (e.no_code = 20 + i, e.name = "Status unknown", e.description = "The status of card reader does not identified correctly", i === 0)
|
|
8377
8377
|
e.request += ":disable", e.name = "Card reader disabled", e.description = "Card reader device was disabled successfully";
|
|
8378
8378
|
else if (i === 1 || i === 2)
|
|
8379
8379
|
e.request += ":dispense", e.name = "Card reader enabled", e.description = "Card reader device is now enabled";
|
|
@@ -8392,7 +8392,8 @@ Ht = new WeakMap(), Bt = new WeakMap(), Kt = new WeakMap(), w = new WeakSet(), I
|
|
|
8392
8392
|
else if (i === 10) {
|
|
8393
8393
|
const s = parseInt(t[8], 16);
|
|
8394
8394
|
s === 0 ? (e.no_code = 30, e.name = "product not dispensed", e.description = "The product requested wasn't delivered") : s === 1 && (e.no_code = 31, e.name = "product dispensed", e.description = "The product requested was delivered");
|
|
8395
|
-
}
|
|
8395
|
+
} else
|
|
8396
|
+
e.no_code = 400;
|
|
8396
8397
|
return this.dispatch("card-reader:event", e), e;
|
|
8397
8398
|
}, rt = function(t, e) {
|
|
8398
8399
|
return this.appendToQueue(o(this, w, De).call(this, t), e);
|
|
@@ -8556,7 +8557,7 @@ const Sc = {
|
|
|
8556
8557
|
wait: ut,
|
|
8557
8558
|
getSeconds: tn,
|
|
8558
8559
|
supportWebSerial: _i
|
|
8559
|
-
}, kc = "4.1.
|
|
8560
|
+
}, kc = "4.1.3";
|
|
8560
8561
|
export {
|
|
8561
8562
|
Cc as Arduino,
|
|
8562
8563
|
Tc as Boardroid,
|