@danidoble/webserial 4.1.1 → 4.1.2
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 +22 -22
- package/package.json +2 -2
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 && !
|
|
27
|
+
if (qn.randomUUID && !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();
|
|
@@ -7225,7 +7225,7 @@ g = new WeakSet(), Zr = function() {
|
|
|
7225
7225
|
return t.push("03"), t;
|
|
7226
7226
|
}, es = async function() {
|
|
7227
7227
|
if (this.__internal__.dispense.elevator.locking_interval) return;
|
|
7228
|
-
this.__internal__.dispense.elevator.need_reset && (this.__internal__.dispense.elevator.need_reset = !1, await this.resetWaitingProductRemovedError(), await ut(500))
|
|
7228
|
+
this.__internal__.dispense.elevator.need_reset && (this.__internal__.dispense.elevator.need_reset = !1, await this.resetWaitingProductRemovedError(), await ut(500));
|
|
7229
7229
|
const t = this;
|
|
7230
7230
|
return this.__internal__.dispense.status = "elevator-locked", this.__internal__.dispense.elevator.locking_time = 60, new Promise((e) => {
|
|
7231
7231
|
t.__internal__.dispense.elevator.locking_interval = setInterval(() => {
|
|
@@ -7513,8 +7513,9 @@ g = new WeakSet(), Zr = function() {
|
|
|
7513
7513
|
type_degrees: null,
|
|
7514
7514
|
formatted: null,
|
|
7515
7515
|
decimal_point: t[7] === "2e" ? "." : null,
|
|
7516
|
-
degrees: t[9] === "7f" ? "°" : null
|
|
7517
|
-
|
|
7516
|
+
degrees: t[9] === "7f" ? "°" : null,
|
|
7517
|
+
error: null
|
|
7518
|
+
}, t[4] === "2b" ? e.additional.sign = t[4] = "+" : ["2e", "2d"].includes(t[4]) ? e.additional.sign = t[4] = "-" : t[4] === "20" && (e.additional.error = "Error in thermometer"), this.hexToDec(t[5]) >= 48 && this.hexToDec(t[5]) <= 57 ? e.additional.tens = this.hexToDec(t[5]) - 48 : t[5] === "2a" && (e.additional.error = "Error in thermometer"), this.hexToDec(t[6]) >= 48 && this.hexToDec(t[6]) <= 57 ? e.additional.units = this.hexToDec(t[6]) - 48 : t[6] === "2a" && (e.additional.error = "Error in thermometer"), this.hexToDec(t[8]) >= 48 && this.hexToDec(t[8]) <= 57 ? e.additional.decimals = this.hexToDec(t[8]) - 48 : t[8] === "2a" && (e.additional.error = "Error in thermometer"), t[10] === "43" ? e.additional.type_degrees = "C" : t[10] === "46" && (e.additional.type_degrees = "F"), e.additional.error === "Error in thermometer" ? (e.additional.formatted = "Error in thermometer", e.description = "The current temperature cannot be read because there is an error in the thermometer") : (e.additional.formatted = (e.additional.sign ?? "") + (e.additional.tens ?? "") + (e.additional.units ?? "") + (e.additional.decimal_point ?? "") + (e.additional.decimals ?? "") + (e.additional.degrees ?? "") + (e.additional.type_degrees ?? ""), e.description = `The current temperature is ${e.additional.formatted}`), this.dispatch("temperature:current", e.additional), e;
|
|
7518
7519
|
}, Ss = function(t, e, i = 128) {
|
|
7519
7520
|
if (t[1] && (e.additional.machine.hex = t[1], e.additional.machine.dec = this.hexToDec(t[1]) - i), !(t[1] && t[2]))
|
|
7520
7521
|
e = o(this, g, ns).call(this, t, e);
|