@ikalogic/at1000 0.4.0 → 0.5.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/README.md +23 -0
- package/build/at1000-DbIvMQUc.cjs +8 -0
- package/build/at1000-DbIvMQUc.cjs.map +1 -0
- package/build/at1000-Zs18VzlP.mjs +8 -0
- package/build/at1000-Zs18VzlP.mjs.map +1 -0
- package/build/{at1000-B3HgANSi.d.mts → at1000-gm586Tc9.d.mts} +10 -16
- package/build/at1000-gm586Tc9.d.mts.map +1 -0
- package/build/{at1000-C6w5G8L4.d.cts → at1000-tUTVczQa.d.cts} +10 -16
- package/build/at1000-tUTVczQa.d.cts.map +1 -0
- package/build/browser.cjs +1 -1
- package/build/browser.cjs.map +1 -1
- package/build/browser.d.cts +5 -4
- package/build/browser.d.cts.map +1 -1
- package/build/browser.d.mts +5 -4
- package/build/browser.d.mts.map +1 -1
- package/build/browser.mjs +1 -1
- package/build/browser.mjs.map +1 -1
- package/build/{com-BLw4CGid.d.cts → com-DN1l6xqC.d.cts} +7 -3
- package/build/com-DN1l6xqC.d.cts.map +1 -0
- package/build/{com-BLw4CGid.d.mts → com-DN1l6xqC.d.mts} +7 -3
- package/build/com-DN1l6xqC.d.mts.map +1 -0
- package/build/com.cjs +1 -1
- package/build/com.cjs.map +1 -1
- package/build/com.d.cts +1 -1
- package/build/com.d.mts +1 -1
- package/build/com.mjs +1 -1
- package/build/com.mjs.map +1 -1
- package/build/common-BSrNhbq_.cjs +2 -0
- package/build/{common-BSabSaAU.cjs.map → common-BSrNhbq_.cjs.map} +1 -1
- package/build/{common-BY1vXz1l.d.cts → common-Cv6nZZS9.d.cts} +1 -2
- package/build/common-Cv6nZZS9.d.cts.map +1 -0
- package/build/{common-BY1vXz1l.d.mts → common-Cv6nZZS9.d.mts} +1 -2
- package/build/common-Cv6nZZS9.d.mts.map +1 -0
- package/build/{events-CBVQfojK.d.cts → events-Cf7iAMZP.d.cts} +4 -3
- package/build/events-Cf7iAMZP.d.cts.map +1 -0
- package/build/{events-CBVQfojK.d.mts → events-Cf7iAMZP.d.mts} +4 -3
- package/build/events-Cf7iAMZP.d.mts.map +1 -0
- package/build/events.cjs +1 -1
- package/build/events.d.cts +1 -1
- package/build/events.d.mts +1 -1
- package/build/events.mjs +1 -1
- package/build/{gpio-BuvDysYa.d.cts → gpio-CsxbjhA_.d.cts} +2 -3
- package/build/gpio-CsxbjhA_.d.cts.map +1 -0
- package/build/{gpio-DgQHE5fr.d.mts → gpio-Dk-s_yMc.d.mts} +2 -3
- package/build/gpio-Dk-s_yMc.d.mts.map +1 -0
- package/build/gpio.cjs +1 -1
- package/build/gpio.cjs.map +1 -1
- package/build/gpio.d.cts +2 -2
- package/build/gpio.d.mts +2 -2
- package/build/{hmi-BrdqKB3o.d.cts → hmi-B-potLdl.d.cts} +1 -2
- package/build/hmi-B-potLdl.d.cts.map +1 -0
- package/build/{hmi-BrdqKB3o.d.mts → hmi-B-potLdl.d.mts} +1 -2
- package/build/hmi-B-potLdl.d.mts.map +1 -0
- package/build/hmi.cjs +1 -1
- package/build/hmi.cjs.map +1 -1
- package/build/hmi.d.cts +1 -1
- package/build/hmi.d.mts +1 -1
- package/build/management.cjs +1 -1
- package/build/management.d.cts +20 -3
- package/build/management.d.cts.map +1 -1
- package/build/management.d.mts +20 -3
- package/build/management.d.mts.map +1 -1
- package/build/management.mjs +1 -1
- package/build/node.cjs +1 -1
- package/build/node.cjs.map +1 -1
- package/build/node.d.cts +16 -11
- package/build/node.d.cts.map +1 -1
- package/build/node.d.mts +16 -11
- package/build/node.d.mts.map +1 -1
- package/build/node.mjs +1 -1
- package/build/node.mjs.map +1 -1
- package/build/package-0hAwYBa1.cjs +2 -0
- package/build/package-0hAwYBa1.cjs.map +1 -0
- package/build/package-CU5MagIg.mjs +2 -0
- package/build/package-CU5MagIg.mjs.map +1 -0
- package/build/{power-FmknBUz2.d.cts → power-B8QFbKdP.d.cts} +2 -3
- package/build/power-B8QFbKdP.d.cts.map +1 -0
- package/build/{power-HWfK-Ybw.d.mts → power-BZmXOJyK.d.mts} +2 -3
- package/build/power-BZmXOJyK.d.mts.map +1 -0
- package/build/power.cjs +1 -1
- package/build/power.cjs.map +1 -1
- package/build/power.d.cts +2 -2
- package/build/power.d.mts +2 -2
- package/build/{relays-8EGNIK1T.d.cts → relays-TADiLsPk.d.cts} +1 -3
- package/build/relays-TADiLsPk.d.cts.map +1 -0
- package/build/{relays-8EGNIK1T.d.mts → relays-TADiLsPk.d.mts} +1 -3
- package/build/relays-TADiLsPk.d.mts.map +1 -0
- package/build/relays.cjs +1 -1
- package/build/relays.cjs.map +1 -1
- package/build/relays.d.cts +1 -1
- package/build/relays.d.mts +1 -1
- package/build/{session-D7TpUd6L.d.cts → session-qWW9mqWH.d.cts} +1 -2
- package/build/session-qWW9mqWH.d.cts.map +1 -0
- package/build/{session-D7TpUd6L.d.mts → session-qWW9mqWH.d.mts} +1 -2
- package/build/session-qWW9mqWH.d.mts.map +1 -0
- package/build/session.cjs +1 -1
- package/build/session.d.cts +1 -1
- package/build/session.d.mts +1 -1
- package/build/session.mjs +1 -1
- package/package.json +6 -2
- package/build/at1000-B3HgANSi.d.mts.map +0 -1
- package/build/at1000-B_udjy0I.cjs +0 -8
- package/build/at1000-B_udjy0I.cjs.map +0 -1
- package/build/at1000-BjVj0Ujk.mjs +0 -8
- package/build/at1000-BjVj0Ujk.mjs.map +0 -1
- package/build/at1000-C6w5G8L4.d.cts.map +0 -1
- package/build/com-BLw4CGid.d.cts.map +0 -1
- package/build/com-BLw4CGid.d.mts.map +0 -1
- package/build/common-BSabSaAU.cjs +0 -2
- package/build/common-BY1vXz1l.d.cts.map +0 -1
- package/build/common-BY1vXz1l.d.mts.map +0 -1
- package/build/events-CBVQfojK.d.cts.map +0 -1
- package/build/events-CBVQfojK.d.mts.map +0 -1
- package/build/gpio-BuvDysYa.d.cts.map +0 -1
- package/build/gpio-DgQHE5fr.d.mts.map +0 -1
- package/build/hmi-BrdqKB3o.d.cts.map +0 -1
- package/build/hmi-BrdqKB3o.d.mts.map +0 -1
- package/build/package-Bcvmz2Lx.cjs +0 -2
- package/build/package-Bcvmz2Lx.cjs.map +0 -1
- package/build/package-CN49oc-F.mjs +0 -2
- package/build/package-CN49oc-F.mjs.map +0 -1
- package/build/power-FmknBUz2.d.cts.map +0 -1
- package/build/power-HWfK-Ybw.d.mts.map +0 -1
- package/build/relays-8EGNIK1T.d.cts.map +0 -1
- package/build/relays-8EGNIK1T.d.mts.map +0 -1
- package/build/session-D7TpUd6L.d.cts.map +0 -1
- package/build/session-D7TpUd6L.d.mts.map +0 -1
- /package/build/{chunk-CMqjfN_6.cjs → rolldown-runtime-CMqjfN_6.cjs} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/api/events.d.ts
|
|
4
3
|
declare const eventDataSchemas: {
|
|
5
4
|
readonly 'com.can_config': v.ObjectSchema<{
|
|
@@ -50,6 +49,7 @@ declare const eventDataSchemas: {
|
|
|
50
49
|
readonly id: v.NumberSchema<undefined>;
|
|
51
50
|
readonly extended_id: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
52
51
|
readonly rtr: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
52
|
+
readonly dlc: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 8, undefined>]>, undefined>;
|
|
53
53
|
readonly data: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.NumberSchema<undefined>, undefined>, v.MinLengthAction<number[], 0, undefined>, v.MaxLengthAction<number[], 8, undefined>]>, readonly []>;
|
|
54
54
|
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5000, undefined>]>, undefined>;
|
|
55
55
|
}, undefined>, undefined>;
|
|
@@ -225,6 +225,7 @@ declare const eventDataSchemas: {
|
|
|
225
225
|
readonly progress: v.NumberSchema<undefined>;
|
|
226
226
|
readonly message: v.StringSchema<undefined>;
|
|
227
227
|
readonly error: v.StringSchema<undefined>;
|
|
228
|
+
readonly boot: v.OptionalSchema<v.PicklistSchema<["confirmed", "pending", "unknown"], undefined>, undefined>;
|
|
228
229
|
}, undefined>;
|
|
229
230
|
readonly 'power.dut': v.ObjectSchema<{
|
|
230
231
|
readonly enabled: v.BooleanSchema<undefined>;
|
|
@@ -293,7 +294,7 @@ type PayloadEvent = { [K in keyof EventDataSchemas]: {
|
|
|
293
294
|
id?: number;
|
|
294
295
|
ts: number;
|
|
295
296
|
data: v.InferOutput<EventDataSchemas[K]>;
|
|
296
|
-
} }[keyof EventDataSchemas];
|
|
297
|
+
}; }[keyof EventDataSchemas];
|
|
297
298
|
type DataLessEvent = {
|
|
298
299
|
type: (typeof dataLessEvents)[number];
|
|
299
300
|
id?: number;
|
|
@@ -356,4 +357,4 @@ declare class EventsApi {
|
|
|
356
357
|
}
|
|
357
358
|
//#endregion
|
|
358
359
|
export { EventsApi as i, DeviceEvent as n, EventType as r, AnyDeviceEvent as t };
|
|
359
|
-
//# sourceMappingURL=events-
|
|
360
|
+
//# sourceMappingURL=events-Cf7iAMZP.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-Cf7iAMZP.d.cts","names":[],"sources":["../src/api/events.ts"],"mappings":";;cAiCM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuCA;KAgBD,0BAA0B;;KAGnB,kBAAkB,2BAA2B;KAEpD,kBACF,WAAW;EACV,MAAM;EACN;EACA;EACA,MAAM,EAAE,YAAY,iBAAiB;WAEjC;KAEH;EAAkB,cAAc;EAAyB;EAAa;;;KAG/D,cAAc,eAAe;;;;;KAM7B,iBAAiB;EAC3B;EACA;EACA;EACA;;KAIG,iBAAiB;;cAST;mBAUkB;UATrB;mBACS;mBACA;UACT;UACA;UACA;UACA;UACA;EAEqB,YAAA;;MAGzB;;;;;;;EAUE,QAAQ;IAAY;MAAqB;;EAsB/C;;;;;;EAmBA,GAAG,UAAU,WACX,MAAM,GACN,WAAW,OAAO,QAAQ;IAAe,MAAM;;EAEjD,GAAG,WAAW,WAAW,OAAO;;EAqBhC,cAAc,UAAU;UAOhB;UA+DA;UAiBA;UAgDA;UAcA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
|
|
3
2
|
//#region src/api/events.d.ts
|
|
4
3
|
declare const eventDataSchemas: {
|
|
5
4
|
readonly 'com.can_config': v.ObjectSchema<{
|
|
@@ -50,6 +49,7 @@ declare const eventDataSchemas: {
|
|
|
50
49
|
readonly id: v.NumberSchema<undefined>;
|
|
51
50
|
readonly extended_id: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
52
51
|
readonly rtr: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
52
|
+
readonly dlc: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 8, undefined>]>, undefined>;
|
|
53
53
|
readonly data: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.NumberSchema<undefined>, undefined>, v.MinLengthAction<number[], 0, undefined>, v.MaxLengthAction<number[], 8, undefined>]>, readonly []>;
|
|
54
54
|
readonly timeout: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 5000, undefined>]>, undefined>;
|
|
55
55
|
}, undefined>, undefined>;
|
|
@@ -225,6 +225,7 @@ declare const eventDataSchemas: {
|
|
|
225
225
|
readonly progress: v.NumberSchema<undefined>;
|
|
226
226
|
readonly message: v.StringSchema<undefined>;
|
|
227
227
|
readonly error: v.StringSchema<undefined>;
|
|
228
|
+
readonly boot: v.OptionalSchema<v.PicklistSchema<["confirmed", "pending", "unknown"], undefined>, undefined>;
|
|
228
229
|
}, undefined>;
|
|
229
230
|
readonly 'power.dut': v.ObjectSchema<{
|
|
230
231
|
readonly enabled: v.BooleanSchema<undefined>;
|
|
@@ -293,7 +294,7 @@ type PayloadEvent = { [K in keyof EventDataSchemas]: {
|
|
|
293
294
|
id?: number;
|
|
294
295
|
ts: number;
|
|
295
296
|
data: v.InferOutput<EventDataSchemas[K]>;
|
|
296
|
-
} }[keyof EventDataSchemas];
|
|
297
|
+
}; }[keyof EventDataSchemas];
|
|
297
298
|
type DataLessEvent = {
|
|
298
299
|
type: (typeof dataLessEvents)[number];
|
|
299
300
|
id?: number;
|
|
@@ -356,4 +357,4 @@ declare class EventsApi {
|
|
|
356
357
|
}
|
|
357
358
|
//#endregion
|
|
358
359
|
export { EventsApi as i, DeviceEvent as n, EventType as r, AnyDeviceEvent as t };
|
|
359
|
-
//# sourceMappingURL=events-
|
|
360
|
+
//# sourceMappingURL=events-Cf7iAMZP.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-Cf7iAMZP.d.mts","names":[],"sources":["../src/api/events.ts"],"mappings":";;cAiCM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuCA;KAgBD,0BAA0B;;KAGnB,kBAAkB,2BAA2B;KAEpD,kBACF,WAAW;EACV,MAAM;EACN;EACA;EACA,MAAM,EAAE,YAAY,iBAAiB;WAEjC;KAEH;EAAkB,cAAc;EAAyB;EAAa;;;KAG/D,cAAc,eAAe;;;;;KAM7B,iBAAiB;EAC3B;EACA;EACA;EACA;;KAIG,iBAAiB;;cAST;mBAUkB;UATrB;mBACS;mBACA;UACT;UACA;UACA;UACA;UACA;EAEqB,YAAA;;MAGzB;;;;;;;EAUE,QAAQ;IAAY;MAAqB;;EAsB/C;;;;;;EAmBA,GAAG,UAAU,WACX,MAAM,GACN,WAAW,OAAO,QAAQ;IAAe,MAAM;;EAEjD,GAAG,WAAW,WAAW,OAAO;;EAqBhC,cAAc,UAAU;UAOhB;UA+DA;UAiBA;UAgDA;UAcA"}
|
package/build/events.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-DbIvMQUc.cjs");exports.EventsApi=e.o;
|
package/build/events.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as EventsApi, n as DeviceEvent, r as EventType, t as AnyDeviceEvent } from "./events-
|
|
1
|
+
import { i as EventsApi, n as DeviceEvent, r as EventType, t as AnyDeviceEvent } from "./events-Cf7iAMZP.cjs";
|
|
2
2
|
export { AnyDeviceEvent, DeviceEvent, EventType, EventsApi };
|
package/build/events.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as EventsApi, n as DeviceEvent, r as EventType, t as AnyDeviceEvent } from "./events-
|
|
1
|
+
import { i as EventsApi, n as DeviceEvent, r as EventType, t as AnyDeviceEvent } from "./events-Cf7iAMZP.mjs";
|
|
2
2
|
export { AnyDeviceEvent, DeviceEvent, EventType, EventsApi };
|
package/build/events.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./at1000-
|
|
1
|
+
import{o as e}from"./at1000-Zs18VzlP.mjs";export{e as EventsApi};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as AnalogOutputLevel } from "./common-
|
|
1
|
+
import { t as AnalogOutputLevel } from "./common-Cv6nZZS9.cjs";
|
|
2
2
|
import { Information } from "./management.cjs";
|
|
3
3
|
import { UpFetch } from "up-fetch";
|
|
4
4
|
import * as v from "valibot";
|
|
5
|
-
|
|
6
5
|
//#region src/api/gpio.d.ts
|
|
7
6
|
declare const analogInputConfiguration: v.ObjectSchema<{
|
|
8
7
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
@@ -404,4 +403,4 @@ declare class AnalogIO {
|
|
|
404
403
|
}
|
|
405
404
|
//#endregion
|
|
406
405
|
export { openDrainConfiguration as C, gpioConfiguration as S, analogOutputConfiguration as _, DigitalInputConfiguration as a, digitalOutputConfiguration as b, GpioConfiguration as c, PartialDigitalInputConfiguration as d, PartialDigitalOutputConfiguration as f, analogInputConfiguration as g, SyncState as h, DigitalIO as i, OpenDrainConfiguration as l, SyncConfiguration as m, AnalogInputConfiguration as n, DigitalOutputConfiguration as o, PartialOpenDrainConfiguration as p, AnalogOutputConfiguration as r, GpioApi as s, AnalogIO as t, PartialAnalogOutputConfiguration as u, analogState as v, syncState as w, digitalState as x, digitalInputConfiguration as y };
|
|
407
|
-
//# sourceMappingURL=gpio-
|
|
406
|
+
//# sourceMappingURL=gpio-CsxbjhA_.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpio-C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WAAW,QAAQ;;;;;;EAanB,YAAY,aAAa,QAAQ;;;;;EAgBjC,aAAa,QAAQ;;;cAMV;mBACkB;WAAgC;EAAhC,YAAA,OAAO,SAAyB;;;;;;EAO7D,gBAAgB,QAAQ,mCAAmC,QAAQ;;;;;;EAgBnE,iBAAiB,QAAQ,oCAAoC,QAAQ;;;;;EAwB/D,QAAQ;;;;;;EASR,MAAM,0BAA0B;;;;;;EActC,qBAAqB,QAAQ,gCAAgC,QAAQ;;;cAa1D;mBACkB;WAAgC;EAAhC,YAAA,OAAO,SAAyB;;;;;;EAO7D,mBAAmB,QAAQ;;;;;;EAa3B,iBAAiB,OAAO,oBAAoB,QAAQ;;;;;EAe9C,QAAQ;;;;;;EASR,MAAM,gBAAgB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { t as AnalogOutputLevel } from "./common-
|
|
1
|
+
import { t as AnalogOutputLevel } from "./common-Cv6nZZS9.mjs";
|
|
2
2
|
import { Information } from "./management.mjs";
|
|
3
3
|
import { UpFetch } from "up-fetch";
|
|
4
4
|
import * as v from "valibot";
|
|
5
|
-
|
|
6
5
|
//#region src/api/gpio.d.ts
|
|
7
6
|
declare const analogInputConfiguration: v.ObjectSchema<{
|
|
8
7
|
readonly mode: v.LiteralSchema<"analog", undefined>;
|
|
@@ -404,4 +403,4 @@ declare class AnalogIO {
|
|
|
404
403
|
}
|
|
405
404
|
//#endregion
|
|
406
405
|
export { openDrainConfiguration as C, gpioConfiguration as S, analogOutputConfiguration as _, DigitalInputConfiguration as a, digitalOutputConfiguration as b, GpioConfiguration as c, PartialDigitalInputConfiguration as d, PartialDigitalOutputConfiguration as f, analogInputConfiguration as g, SyncState as h, DigitalIO as i, OpenDrainConfiguration as l, SyncConfiguration as m, AnalogInputConfiguration as n, DigitalOutputConfiguration as o, PartialOpenDrainConfiguration as p, AnalogOutputConfiguration as r, GpioApi as s, AnalogIO as t, PartialAnalogOutputConfiguration as u, analogState as v, syncState as w, digitalState as x, digitalInputCon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AFrB;EAEqB,YAAA,OAAO,SAAS,MAAM;;;;EAOnD,SAAS;;;;;;EAST,QAAQ,aAAa;;;;;;EAiBrB,OAAO,aAAa;;;;;EAgBpB,QAAQ,QAAQ;;;;;;;;EAehB,WAAW,QAAQ;;;;;;EAanB,YAAY,aAAa,QAAQ;;;;;EAgBjC,aAAa,QAAQ;;;cAMV;mBACkB;WAAgC;EAAhC,YAAA,OAAO,SAAyB;;;;;;EAO7D,gBAAgB,QAAQ,mCAAmC,QAAQ;;;;;;EAgBnE,iBAAiB,QAAQ,oCAAoC,QAAQ;;;;;EAwB/D,QAAQ;;;;;;EASR,MAAM,0BAA0B;;;;;;EActC,qBAAqB,QAAQ,gCAAgC,QAAQ;;;cAa1D;mBACkB;WAAgC;EAAhC,YAAA,OAAO,SAAyB;;;;;;EAO7D,mBAAmB,QAAQ;;;;;;EAa3B,iBAAiB,OAAO,oBAAoB,QAAQ;;;;;EAe9C,QAAQ;;;;;;EASR,MAAM,gBAAgB"}
|
package/build/gpio.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./common-BSrNhbq_.cjs");let n=require("valibot");n=e.t(n,1);const r=n.picklist([`release`,`hold`],`Invalid sync action`),i=n.object({mode:n.literal(`analog`),direction:n.literal(`input`)}),a=n.object({mode:n.literal(`analog`),direction:n.literal(`output`),value:n.optional(t.n)}),o=n.object({mode:n.literal(`digital`),direction:n.literal(`input`),vil:t.t,vih:t.t}),s=n.object({mode:n.literal(`digital`),direction:n.literal(`output`),value:t.r,vol:t.n,voh:t.n,vil:t.t,vih:t.t}),c=n.object({mode:n.literal(`digital`),direction:n.literal(`open_drain`),value:t.r,vil:t.t,vih:t.t});n.omit(a,[`direction`,`mode`]),n.omit(o,[`direction`,`mode`]);const l=n.partial(n.omit(s,[`direction`,`mode`]),[`vih`,`vil`]);n.omit(c,[`direction`,`mode`]);const u=n.object({value:t.r}),d=n.object({value:t.t}),f=n.object({action:r}),p=n.object({hold_state:n.picklist([`held`,`released`])}),m=n.union([s,c,o,a,i]);var h=class{fetch;count;constructor(e,t){this.fetch=e,this.count=t.capabilities.io.count}reset(){return this.fetch(`/gpio/reset`,{method:`POST`,parseResponse:()=>{}})}digital(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new g(this.fetch,e)}analog(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}`);return new _(this.fetch,e)}hold(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`hold`},schema:f})}release(){return this.fetch(`/gpio/sync`,{method:`POST`,body:{action:`release`},schema:f})}read_config(e){if(e<0||e>=this.count)throw Error(`Invalid GPIO pin ${e} (RESOURCE_NOT_FOUND)\n Suggestion: Use a pin number between 0 and ${this.count-1}\n Path: /gpio/${e}/config`);return this.fetch(`/gpio/${e}/config`,{schema:m})}read_sync(){return this.fetch(`/gpio/sync`,{schema:p})}},g=class{fetch;id;constructor(e,t){this.fetch=e,this.id=t}configure_input(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(o,{...e,mode:`digital`,direction:`input`}),schema:o})}configure_output(e){e=n.parse(l,e);let t={mode:`digital`,direction:`output`,value:e.value,vol:e.vol,voh:e.voh,vil:e.vil??e.vol+(e.voh-e.vol)/4,vih:e.vih??e.voh-(e.voh-e.vol)/4};return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(s,t),schema:s})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:u})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:n.parse(u,{value:e}),schema:u})).value}configure_open_drain(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(c,{...e,mode:`digital`,direction:`open_drain`}),schema:c})}},_=class{fetch;id;constructor(e,t){this.fetch=e,this.id=t}configure_input(){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:{mode:`analog`,direction:`input`},schema:i})}configure_output(e){return this.fetch(`/gpio/${this.id}/config`,{method:`PATCH`,body:n.parse(a,{value:e,mode:`analog`,direction:`output`}),schema:a})}async read(){return(await this.fetch(`/gpio/${this.id}/state`,{schema:d})).value}async write(e){return(await this.fetch(`/gpio/${this.id}/state`,{method:`PUT`,body:{value:e},schema:d})).value}};exports.AnalogIO=_,exports.DigitalIO=g,exports.GpioApi=h,exports.analogInputConfiguration=i,exports.analogOutputConfiguration=a,exports.analogState=d,exports.digitalInputConfiguration=o,exports.digitalOutputConfiguration=s,exports.digitalState=u,exports.gpioConfiguration=m,exports.openDrainConfiguration=c,exports.syncState=p;
|
|
2
2
|
//# sourceMappingURL=gpio.cjs.map
|
package/build/gpio.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpio.cjs","names":["v","analogOutputLevel","analogLevel","digitalLevel"],"sources":["../src/api/gpio.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel, analogOutputLevel, digitalLevel } from './common';\nimport type { Information } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst syncAction = v.picklist(['release', 'hold'], 'Invalid sync action');\nexport const analogInputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('input'),\n});\nexport const analogOutputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('output'),\n value: v.optional(analogOutputLevel),\n});\nexport const digitalInputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('input'),\n vil: analogLevel,\n vih: analogLevel,\n});\nexport const digitalOutputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('output'),\n value: digitalLevel,\n vol: analogOutputLevel,\n voh: analogOutputLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport const openDrainConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('open_drain'),\n value: digitalLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;\nexport type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;\nexport type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;\nexport type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;\nexport type OpenDrainConfiguration = v.InferOutput<typeof openDrainConfiguration>;\n\nconst partialAnalogOutputConfiguration = v.omit(analogOutputConfiguration, ['direction', 'mode']);\nexport type PartialAnalogOutputConfiguration = v.InferOutput<\n typeof partialAnalogOutputConfiguration\n>;\nconst partialDigitalInputConfiguration = v.omit(digitalInputConfiguration, ['direction', 'mode']);\nexport type PartialDigitalInputConfiguration = v.InferOutput<\n typeof partialDigitalInputConfiguration\n>;\nconst partialDigitalOutputConfiguration = v.partial(\n v.omit(digitalOutputConfiguration, ['direction', 'mode']),\n ['vih', 'vil'],\n);\nexport type PartialDigitalOutputConfiguration = v.InferInput<\n typeof partialDigitalOutputConfiguration\n>;\nconst partialOpenDrainConfiguration = v.omit(openDrainConfiguration, ['direction', 'mode']);\nexport type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;\n\nexport const digitalState = v.object({ value: digitalLevel });\nexport const analogState = v.object({ value: analogLevel });\n\nconst syncConfiguration = v.object({ action: syncAction });\nexport type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;\n\nexport const syncState = v.object({ hold_state: v.picklist(['held', 'released']) });\nexport type SyncState = v.InferOutput<typeof syncState>;\n\nexport const gpioConfiguration = v.union([\n digitalOutputConfiguration,\n openDrainConfiguration,\n digitalInputConfiguration,\n analogOutputConfiguration,\n analogInputConfiguration,\n]);\nexport type GpioConfiguration = v.InferOutput<typeof gpioConfiguration>;\n\n/** @hideconstructor */\nexport class GpioApi {\n private count: number;\n\n constructor(private readonly fetch: UpFetch, info: Information) {\n this.count = info.capabilities.io.count;\n }\n\n /**\n * Resets all IO configurations to default.\n */\n reset(): Promise<void> {\n return this.fetch('/gpio/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific digital IO pin by id.\n * @param io The IO pin id.\n * @returns The digital IO instance.\n */\n digital(io: number): DigitalIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new DigitalIO(this.fetch, io);\n }\n\n /**\n * Access a specific analog IO pin by id.\n * @param io The IO pin id.\n * @returns The analog IO instance.\n */\n analog(io: number): AnalogIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new AnalogIO(this.fetch, io);\n }\n\n /**\n * Holds the current state of all GPIO pins.\n * @returns The applied sync state.\n */\n hold(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'hold' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Releases control of the IO pins, allowing external control.\n *\n * This also sets the device as a slave.\n *\n * @returns The applied sync state.\n */\n release(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'release' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Reads back the current configuration of a specific IO pin.\n * @param io The IO pin id.\n * @returns The pin's current configuration.\n */\n read_config(io: number): Promise<GpioConfiguration> {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}/config`,\n );\n }\n\n return this.fetch(`/gpio/${io}/config`, { schema: gpioConfiguration });\n }\n\n /**\n * Reads the current hold state of all GPIO pins.\n * @returns The current sync state.\n */\n read_sync(): Promise<SyncState> {\n return this.fetch('/gpio/sync', { schema: syncState });\n }\n}\n\n/** @hideconstructor */\nexport class DigitalIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configure the pin as a digital input.\n * @param config The digital input configuration.\n * @returns The applied configuration.\n */\n configure_input(config: PartialDigitalInputConfiguration): Promise<DigitalInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n digitalInputConfiguration,\n { ...config, mode: 'digital', direction: 'input' } satisfies DigitalInputConfiguration,\n ),\n schema: digitalInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as a digital output.\n * @param config The digital output configuration.\n * @returns The applied configuration.\n */\n configure_output(config: PartialDigitalOutputConfiguration): Promise<DigitalOutputConfiguration> {\n config = v.parse(partialDigitalOutputConfiguration, config);\n\n const fullConfig = {\n mode: 'digital' as const,\n direction: 'output' as const,\n value: config.value,\n vol: config.vol,\n voh: config.voh,\n vil: config.vil ?? config.vol + (config.voh - config.vol) / 4,\n vih: config.vih ?? config.voh - (config.voh - config.vol) / 4,\n };\n\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(digitalOutputConfiguration, fullConfig),\n schema: digitalOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: digitalState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: boolean | number): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: v.parse(digitalState, { value }),\n schema: digitalState,\n }))\n .value;\n }\n\n /**\n * Configure the pin as an open drain output.\n * @param config The open drain configuration.\n * @returns The applied configuration.\n */\n configure_open_drain(config: PartialOpenDrainConfiguration): Promise<OpenDrainConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n openDrainConfiguration,\n { ...config, mode: 'digital', direction: 'open_drain' } satisfies OpenDrainConfiguration,\n ),\n schema: openDrainConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class AnalogIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configures the pin as an analog input.\n * @returns The applied configuration.\n * @returns The applied configuration.\n */\n configure_input(): Promise<AnalogInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: { mode: 'analog', direction: 'input' } satisfies AnalogInputConfiguration,\n schema: analogInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as an analog output.\n * @param config The analog output configuration.\n * @returns The applied configuration.\n */\n configure_output(value: AnalogOutputLevel): Promise<AnalogOutputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n analogOutputConfiguration,\n { value, mode: 'analog', direction: 'output' } satisfies AnalogOutputConfiguration,\n ),\n schema: analogOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: analogState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: number): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: analogState,\n }))\n .value;\n }\n}\n"],"mappings":"kLAQA,MAAM,EAAaA,EAAE,SAAS,CAAC,UAAW,MAAM,EAAG,qBAAqB,EAC3D,EAA2BA,EAAE,OAAO,CAC/C,KAAMA,EAAE,QAAQ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AA,CAAa,CAO1E,iBAAqD,CACnD,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAM,CAAE,KAAM,SAAU,UAAW,OAAQ,EAC3C,OAAQ,CACV,CAAC,CACH,CAOA,iBAAiB,EAA8D,CAC7E,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAMA,EAAE,MACN,EACA,CAAE,QAAO,KAAM,SAAU,UAAW,QAAS,CAC/C,EACA,OAAQ,CACV,CAAC,CACH,CAMA,MAAM,MAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CAAE,OAAQ,CAAY,CAAC,EAAA,CAAG,KAC/E,CAOA,MAAM,MAAM,EAAgC,CAC1C,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CACjD,OAAQ,MACR,KAAM,CAAE,OAAM,EACd,OAAQ,CACV,CAAC,EAAA,CACE,KACL,CACF"}
|
|
1
|
+
{"version":3,"file":"gpio.cjs","names":["v","analogOutputLevel","analogLevel","digitalLevel"],"sources":["../src/api/gpio.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nimport { analogLevel, type AnalogOutputLevel, analogOutputLevel, digitalLevel } from './common';\nimport type { Information } from './management';\n\nexport type { AnalogOutputLevel };\n\nconst syncAction = v.picklist(['release', 'hold'], 'Invalid sync action');\nexport const analogInputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('input'),\n});\nexport const analogOutputConfiguration = v.object({\n mode: v.literal('analog'),\n direction: v.literal('output'),\n value: v.optional(analogOutputLevel),\n});\nexport const digitalInputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('input'),\n vil: analogLevel,\n vih: analogLevel,\n});\nexport const digitalOutputConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('output'),\n value: digitalLevel,\n vol: analogOutputLevel,\n voh: analogOutputLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport const openDrainConfiguration = v.object({\n mode: v.literal('digital'),\n direction: v.literal('open_drain'),\n value: digitalLevel,\n vil: analogLevel,\n vih: analogLevel,\n});\nexport type AnalogInputConfiguration = v.InferOutput<typeof analogInputConfiguration>;\nexport type AnalogOutputConfiguration = v.InferOutput<typeof analogOutputConfiguration>;\nexport type DigitalInputConfiguration = v.InferOutput<typeof digitalInputConfiguration>;\nexport type DigitalOutputConfiguration = v.InferOutput<typeof digitalOutputConfiguration>;\nexport type OpenDrainConfiguration = v.InferOutput<typeof openDrainConfiguration>;\n\nconst partialAnalogOutputConfiguration = v.omit(analogOutputConfiguration, ['direction', 'mode']);\nexport type PartialAnalogOutputConfiguration = v.InferOutput<\n typeof partialAnalogOutputConfiguration\n>;\nconst partialDigitalInputConfiguration = v.omit(digitalInputConfiguration, ['direction', 'mode']);\nexport type PartialDigitalInputConfiguration = v.InferOutput<\n typeof partialDigitalInputConfiguration\n>;\nconst partialDigitalOutputConfiguration = v.partial(\n v.omit(digitalOutputConfiguration, ['direction', 'mode']),\n ['vih', 'vil'],\n);\nexport type PartialDigitalOutputConfiguration = v.InferInput<\n typeof partialDigitalOutputConfiguration\n>;\nconst partialOpenDrainConfiguration = v.omit(openDrainConfiguration, ['direction', 'mode']);\nexport type PartialOpenDrainConfiguration = v.InferOutput<typeof partialOpenDrainConfiguration>;\n\nexport const digitalState = v.object({ value: digitalLevel });\nexport const analogState = v.object({ value: analogLevel });\n\nconst syncConfiguration = v.object({ action: syncAction });\nexport type SyncConfiguration = v.InferOutput<typeof syncConfiguration>;\n\nexport const syncState = v.object({ hold_state: v.picklist(['held', 'released']) });\nexport type SyncState = v.InferOutput<typeof syncState>;\n\nexport const gpioConfiguration = v.union([\n digitalOutputConfiguration,\n openDrainConfiguration,\n digitalInputConfiguration,\n analogOutputConfiguration,\n analogInputConfiguration,\n]);\nexport type GpioConfiguration = v.InferOutput<typeof gpioConfiguration>;\n\n/** @hideconstructor */\nexport class GpioApi {\n private count: number;\n\n constructor(private readonly fetch: UpFetch, info: Information) {\n this.count = info.capabilities.io.count;\n }\n\n /**\n * Resets all IO configurations to default.\n */\n reset(): Promise<void> {\n return this.fetch('/gpio/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access a specific digital IO pin by id.\n * @param io The IO pin id.\n * @returns The digital IO instance.\n */\n digital(io: number): DigitalIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new DigitalIO(this.fetch, io);\n }\n\n /**\n * Access a specific analog IO pin by id.\n * @param io The IO pin id.\n * @returns The analog IO instance.\n */\n analog(io: number): AnalogIO {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}`,\n );\n }\n\n return new AnalogIO(this.fetch, io);\n }\n\n /**\n * Holds the current state of all GPIO pins.\n * @returns The applied sync state.\n */\n hold(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'hold' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Releases control of the IO pins, allowing external control.\n *\n * This also sets the device as a slave.\n *\n * @returns The applied sync state.\n */\n release(): Promise<SyncConfiguration> {\n return this.fetch('/gpio/sync', {\n method: 'POST',\n body: { action: 'release' } satisfies SyncConfiguration,\n schema: syncConfiguration,\n });\n }\n\n /**\n * Reads back the current configuration of a specific IO pin.\n * @param io The IO pin id.\n * @returns The pin's current configuration.\n */\n read_config(io: number): Promise<GpioConfiguration> {\n if (io < 0 || io >= this.count) {\n throw new Error(\n `Invalid GPIO pin ${io} (RESOURCE_NOT_FOUND)\\n Suggestion: Use a pin number between 0 and ${\n this.count - 1\n }\\n Path: /gpio/${io}/config`,\n );\n }\n\n return this.fetch(`/gpio/${io}/config`, { schema: gpioConfiguration });\n }\n\n /**\n * Reads the current hold state of all GPIO pins.\n * @returns The current sync state.\n */\n read_sync(): Promise<SyncState> {\n return this.fetch('/gpio/sync', { schema: syncState });\n }\n}\n\n/** @hideconstructor */\nexport class DigitalIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configure the pin as a digital input.\n * @param config The digital input configuration.\n * @returns The applied configuration.\n */\n configure_input(config: PartialDigitalInputConfiguration): Promise<DigitalInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n digitalInputConfiguration,\n { ...config, mode: 'digital', direction: 'input' } satisfies DigitalInputConfiguration,\n ),\n schema: digitalInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as a digital output.\n * @param config The digital output configuration.\n * @returns The applied configuration.\n */\n configure_output(config: PartialDigitalOutputConfiguration): Promise<DigitalOutputConfiguration> {\n config = v.parse(partialDigitalOutputConfiguration, config);\n\n const fullConfig = {\n mode: 'digital' as const,\n direction: 'output' as const,\n value: config.value,\n vol: config.vol,\n voh: config.voh,\n vil: config.vil ?? config.vol + (config.voh - config.vol) / 4,\n vih: config.vih ?? config.voh - (config.voh - config.vol) / 4,\n };\n\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(digitalOutputConfiguration, fullConfig),\n schema: digitalOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: digitalState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: boolean | number): Promise<boolean> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: v.parse(digitalState, { value }),\n schema: digitalState,\n }))\n .value;\n }\n\n /**\n * Configure the pin as an open drain output.\n * @param config The open drain configuration.\n * @returns The applied configuration.\n */\n configure_open_drain(config: PartialOpenDrainConfiguration): Promise<OpenDrainConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n openDrainConfiguration,\n { ...config, mode: 'digital', direction: 'open_drain' } satisfies OpenDrainConfiguration,\n ),\n schema: openDrainConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class AnalogIO {\n constructor(private readonly fetch: UpFetch, public readonly id: number) {}\n\n /**\n * Configures the pin as an analog input.\n * @returns The applied configuration.\n * @returns The applied configuration.\n */\n configure_input(): Promise<AnalogInputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: { mode: 'analog', direction: 'input' } satisfies AnalogInputConfiguration,\n schema: analogInputConfiguration,\n });\n }\n\n /**\n * Configures the pin as an analog output.\n * @param config The analog output configuration.\n * @returns The applied configuration.\n */\n configure_output(value: AnalogOutputLevel): Promise<AnalogOutputConfiguration> {\n return this.fetch(`/gpio/${this.id}/config`, {\n method: 'PATCH',\n body: v.parse(\n analogOutputConfiguration,\n { value, mode: 'analog', direction: 'output' } satisfies AnalogOutputConfiguration,\n ),\n schema: analogOutputConfiguration,\n });\n }\n\n /**\n * Reads the current state of the pin.\n * @returns The current state of the pin.\n */\n async read(): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, { schema: analogState })).value;\n }\n\n /**\n * Writes a value to the pin.\n * @param value The value to write.\n * @returns The written value.\n */\n async write(value: number): Promise<number> {\n return (await this.fetch(`/gpio/${this.id}/state`, {\n method: 'PUT',\n body: { value },\n schema: analogState,\n }))\n .value;\n }\n}\n"],"mappings":"6LAQA,MAAM,EAAaA,EAAE,SAAS,CAAC,UAAW,MAAM,EAAG,qBAAqB,EAC3D,EAA2BA,EAAE,OAAO,CAC/C,KAAMA,EAAE,QAAQ,QAAQ,EACxB,UAAWA,EAAE,QAAQ,OAAO,CAC9B,CAAC,EACY,EAA4BA,EAAE,OAAO,CA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AQ,QACR,KAAM,CAAE,KAAM,SAAU,UAAW,OAAQ,EAC3C,OAAQ,CACV,CAAC,CACH,CAOA,iBAAiB,EAA8D,CAC7E,OAAO,KAAK,MAAM,SAAS,KAAK,GAAG,SAAU,CAC3C,OAAQ,QACR,KAAMA,EAAE,MACN,EACA,CAAE,QAAO,KAAM,SAAU,UAAW,QAAS,CAC/C,EACA,OAAQ,CACV,CAAC,CACH,CAMA,MAAM,MAAwB,CAC5B,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CAAE,OAAQ,CAAY,CAAC,EAAA,CAAG,KAC/E,CAOA,MAAM,MAAM,EAAgC,CAC1C,OAAQ,MAAM,KAAK,MAAM,SAAS,KAAK,GAAG,QAAS,CACjD,OAAQ,MACR,KAAM,CAAE,OAAM,EACd,OAAQ,CACV,CAAC,EAAA,CACE,KACL,CACF"}
|
package/build/gpio.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as AnalogOutputLevel } from "./common-
|
|
2
|
-
import { C as openDrainConfiguration, S as gpioConfiguration, _ as analogOutputConfiguration, a as DigitalInputConfiguration, b as digitalOutputConfiguration, c as GpioConfiguration, d as PartialDigitalInputConfiguration, f as PartialDigitalOutputConfiguration, g as analogInputConfiguration, h as SyncState, i as DigitalIO, l as OpenDrainConfiguration, m as SyncConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as PartialOpenDrainConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialAnalogOutputConfiguration, v as analogState, w as syncState, x as digitalState, y as digitalInputConfiguration } from "./gpio-
|
|
1
|
+
import { t as AnalogOutputLevel } from "./common-Cv6nZZS9.cjs";
|
|
2
|
+
import { C as openDrainConfiguration, S as gpioConfiguration, _ as analogOutputConfiguration, a as DigitalInputConfiguration, b as digitalOutputConfiguration, c as GpioConfiguration, d as PartialDigitalInputConfiguration, f as PartialDigitalOutputConfiguration, g as analogInputConfiguration, h as SyncState, i as DigitalIO, l as OpenDrainConfiguration, m as SyncConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as PartialOpenDrainConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialAnalogOutputConfiguration, v as analogState, w as syncState, x as digitalState, y as digitalInputConfiguration } from "./gpio-CsxbjhA_.cjs";
|
|
3
3
|
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, type AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, GpioConfiguration, OpenDrainConfiguration, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, PartialOpenDrainConfiguration, SyncConfiguration, SyncState, analogInputConfiguration, analogOutputConfiguration, analogState, digitalInputConfiguration, digitalOutputConfiguration, digitalState, gpioConfiguration, openDrainConfiguration, syncState };
|
package/build/gpio.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as AnalogOutputLevel } from "./common-
|
|
2
|
-
import { C as openDrainConfiguration, S as gpioConfiguration, _ as analogOutputConfiguration, a as DigitalInputConfiguration, b as digitalOutputConfiguration, c as GpioConfiguration, d as PartialDigitalInputConfiguration, f as PartialDigitalOutputConfiguration, g as analogInputConfiguration, h as SyncState, i as DigitalIO, l as OpenDrainConfiguration, m as SyncConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as PartialOpenDrainConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialAnalogOutputConfiguration, v as analogState, w as syncState, x as digitalState, y as digitalInputConfiguration } from "./gpio-
|
|
1
|
+
import { t as AnalogOutputLevel } from "./common-Cv6nZZS9.mjs";
|
|
2
|
+
import { C as openDrainConfiguration, S as gpioConfiguration, _ as analogOutputConfiguration, a as DigitalInputConfiguration, b as digitalOutputConfiguration, c as GpioConfiguration, d as PartialDigitalInputConfiguration, f as PartialDigitalOutputConfiguration, g as analogInputConfiguration, h as SyncState, i as DigitalIO, l as OpenDrainConfiguration, m as SyncConfiguration, n as AnalogInputConfiguration, o as DigitalOutputConfiguration, p as PartialOpenDrainConfiguration, r as AnalogOutputConfiguration, s as GpioApi, t as AnalogIO, u as PartialAnalogOutputConfiguration, v as analogState, w as syncState, x as digitalState, y as digitalInputConfiguration } from "./gpio-Dk-s_yMc.mjs";
|
|
3
3
|
export { AnalogIO, AnalogInputConfiguration, AnalogOutputConfiguration, type AnalogOutputLevel, DigitalIO, DigitalInputConfiguration, DigitalOutputConfiguration, GpioApi, GpioConfiguration, OpenDrainConfiguration, PartialAnalogOutputConfiguration, PartialDigitalInputConfiguration, PartialDigitalOutputConfiguration, PartialOpenDrainConfiguration, SyncConfiguration, SyncState, analogInputConfiguration, analogOutputConfiguration, analogState, digitalInputConfiguration, digitalOutputConfiguration, digitalState, gpioConfiguration, openDrainConfiguration, syncState };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { UpFetch } from "up-fetch";
|
|
2
2
|
import * as v from "valibot";
|
|
3
|
-
|
|
4
3
|
//#region src/api/hmi.d.ts
|
|
5
4
|
declare const screenText: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>;
|
|
6
5
|
type ScreenText = v.InferOutput<typeof screenText>;
|
|
@@ -149,4 +148,4 @@ declare class Knob {
|
|
|
149
148
|
}
|
|
150
149
|
//#endregion
|
|
151
150
|
export { KnobEvent as a, ProgressValue as c, color as d, internalKnobEvent as f, text as h, Knob as i, Screen as l, progress as m, Color as n, PlaybackConfiguration as o, playbackConfiguration as p, HmiApi as r, Progress as s, Audio as t, ScreenText as u };
|
|
152
|
-
//# sourceMappingURL=hmi-
|
|
151
|
+
//# sourceMappingURL=hmi-B-potLdl.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmi-B-potLdl.d.cts","names":[],"sources":["../src/api/hmi.ts"],"mappings":";;;cAGM,YAAU,EAAA,yBAAA,EAAA,yBAAA,EAAA;KACJ,aAAa,EAAE,mBAAmB;cAEjC,MAAI,EAAA;;;cAIJ,OAAK,EAAA;;;;;KAKN,QAAQ,EAAE,mBAAmB;cAEnC,eAAa,EAAA,yBAAA,EAAA,yBAAA,EAAA,sCAAA,EAAA;KACP,gBAAgB,EAAE,mBAAmB;cACpC,UAAQ,EAAA;;;KACT,WAAW,EAAE,mBAAmB;cAE/B,uBAAqB,EAAA;;;;KAOtB,wBAAwB,EAAE,mBAAmB;cAE5C,mBAAiB,EAAA;;;;;cAKxB,WAAS,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KACH,YAAY,EAAE,mBAAmB;;cAGhC;mBACkB;EAAA,YAAA,OAAO;;;;EAKpC,SAAS;;;;;EAQT,UAAU;;;;;EAQV,SAAS;;;;;EAQT,QAAQ;;;cAMG;mBACkB;EAAA,YAAA,OAAO;;;;;;EAO9B,MAAM,MAAM,aAAa;;;;;;EAc/B,OAAO,QAAQ,QAAQ,QAAQ;;;;;;EAazB,SAAS,MAAM,gBAAgB,QAAQ;;;;EAkB7C,SAAS;;;;EAOT,cAAc;;;cAMH;mBACkB;EAAA,YAAA,OAAO;;;;;;EAO9B,KAAK,QAAQ,wBAAwB,QAAQ;;;cAUxC;mBACkB;EAAA,YAAA,OAAO;EAEpC,kBAAU;;;;;EAEV,sBAAc;EACd,sBAAc;;;;;;EAOR,WAAW,sBAAsB,QAAQ"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { UpFetch } from "up-fetch";
|
|
2
2
|
import * as v from "valibot";
|
|
3
|
-
|
|
4
3
|
//#region src/api/hmi.d.ts
|
|
5
4
|
declare const screenText: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 1024, undefined>]>;
|
|
6
5
|
type ScreenText = v.InferOutput<typeof screenText>;
|
|
@@ -149,4 +148,4 @@ declare class Knob {
|
|
|
149
148
|
}
|
|
150
149
|
//#endregion
|
|
151
150
|
export { KnobEvent as a, ProgressValue as c, color as d, internalKnobEvent as f, text as h, Knob as i, Screen as l, progress as m, Color as n, PlaybackConfiguration as o, playbackConfiguration as p, HmiApi as r, Progress as s, Audio as t, ScreenText as u };
|
|
152
|
-
//# sourceMappingURL=hmi-
|
|
151
|
+
//# sourceMappingURL=hmi-B-potLdl.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmi-B-potLdl.d.mts","names":[],"sources":["../src/api/hmi.ts"],"mappings":";;;cAGM,YAAU,EAAA,yBAAA,EAAA,yBAAA,EAAA;KACJ,aAAa,EAAE,mBAAmB;cAEjC,MAAI,EAAA;;;cAIJ,OAAK,EAAA;;;;;KAKN,QAAQ,EAAE,mBAAmB;cAEnC,eAAa,EAAA,yBAAA,EAAA,yBAAA,EAAA,sCAAA,EAAA;KACP,gBAAgB,EAAE,mBAAmB;cACpC,UAAQ,EAAA;;;KACT,WAAW,EAAE,mBAAmB;cAE/B,uBAAqB,EAAA;;;;KAOtB,wBAAwB,EAAE,mBAAmB;cAE5C,mBAAiB,EAAA;;;;;cAKxB,WAAS,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KACH,YAAY,EAAE,mBAAmB;;cAGhC;mBACkB;EAAA,YAAA,OAAO;;;;EAKpC,SAAS;;;;;EAQT,UAAU;;;;;EAQV,SAAS;;;;;EAQT,QAAQ;;;cAMG;mBACkB;EAAA,YAAA,OAAO;;;;;;EAO9B,MAAM,MAAM,aAAa;;;;;;EAc/B,OAAO,QAAQ,QAAQ,QAAQ;;;;;;EAazB,SAAS,MAAM,gBAAgB,QAAQ;;;;EAkB7C,SAAS;;;;EAOT,cAAc;;;cAMH;mBACkB;EAAA,YAAA,OAAO;;;;;;EAO9B,KAAK,QAAQ,wBAAwB,QAAQ;;;cAUxC;mBACkB;EAAA,YAAA,OAAO;EAEpC,kBAAU;;;;;EAEV,sBAAc;EACd,sBAAc;;;;;;EAOR,WAAW,sBAAsB,QAAQ"}
|
package/build/hmi.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs");let t=require("valibot");t=e.t(t,1);const n=t.pipe(t.string(),t.maxLength(1024)),r=t.object({text:n}),i=t.optional(t.pipe(t.string(),t.length(7),t.hexColor())),a=t.object({text:i,progress:i,background:i}),o=t.pipe(t.number(),t.minValue(0),t.maxValue(100)),s=t.object({progress:o}),c=t.object({sound_id:t.picklist([`success`,`warning`,`failure`,`notification_1`,`notification_2`,`imperial_march`]),volume:t.pipe(t.number(),t.minValue(0),t.maxValue(100))}),l=t.object({button_pressed:t.boolean(),button_held:t.boolean(),rotation_delta:t.number()});t.omit(l,[`button_held`]);var u=class{fetch;constructor(e){this.fetch=e}reset(){return this.fetch(`/hmi/reset`,{method:`POST`,parseResponse:()=>{}})}screen(){return new d(this.fetch)}audio(){return new f(this.fetch)}knob(){return new p(this.fetch)}},d=class{fetch;constructor(e){this.fetch=e}async print(e){return(await this.fetch(`/hmi/screen/text`,{method:`POST`,body:t.parse(r,{text:e}),schema:r})).text}colors(e){return this.fetch(`/hmi/screen/colors`,{method:`PATCH`,body:t.parse(a,e),schema:a})}async progress(e){return e==0?await this.fetch(`/hmi/screen/progress`,{method:`DELETE`,parseResponse:()=>({progress:0})}):this.fetch(`/hmi/screen/progress`,{method:`PUT`,body:t.parse(s,{progress:e}),schema:s})}clear(){return this.fetch(`/hmi/screen/clear`,{method:`POST`,parseResponse:()=>{}})}clear_text(){return this.fetch(`/hmi/screen/text`,{method:`DELETE`,parseResponse:()=>{}})}},f=class{fetch;constructor(e){this.fetch=e}async play(e){return this.fetch(`/hmi/speaker/play`,{method:`POST`,body:t.parse(c,e),schema:c})}},p=class{fetch;constructor(e){this.fetch=e}read_event=()=>this.fetch(`/hmi/knob/get_knob_event`,{schema:l});is_button_held=async()=>(await this.read_event()).button_held;is_knob_turned=async()=>Math.abs((await this.read_event()).rotation_delta)>=4;async wait_event(e){await this.read_event();let t=0,n=Math.min(50,(e??500)/10),r=Date.now();for(;e===void 0||Date.now()-r<e;){let e=await this.read_event();if(t+=e.rotation_delta,e.button_pressed||Math.abs(t)>=4)return{button_pressed:e.button_pressed,rotation_delta:Math.sign(t)};await new Promise(e=>setTimeout(e,n))}return null}};exports.Audio=f,exports.HmiApi=u,exports.Knob=p,exports.Screen=d,exports.color=a,exports.internalKnobEvent=l,exports.playbackConfiguration=c,exports.progress=s,exports.text=r;
|
|
2
2
|
//# sourceMappingURL=hmi.cjs.map
|
package/build/hmi.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmi.cjs","names":["v"],"sources":["../src/api/hmi.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst screenText = v.pipe(v.string(), v.maxLength(1024));\nexport type ScreenText = v.InferOutput<typeof screenText>;\n\nexport const text = v.object({ text: screenText });\ntype Text = v.InferOutput<typeof text>;\n\nconst optionalHexColor = v.optional(v.pipe(v.string(), v.length(7), v.hexColor()));\nexport const color = v.object({\n text: optionalHexColor,\n progress: optionalHexColor,\n background: optionalHexColor,\n});\nexport type Color = v.InferOutput<typeof color>;\n\nconst progressValue = v.pipe(v.number(), v.minValue(0), v.maxValue(100));\nexport type ProgressValue = v.InferOutput<typeof progressValue>;\nexport const progress = v.object({ progress: progressValue });\nexport type Progress = v.InferOutput<typeof progress>;\n\nexport const playbackConfiguration = v.object({\n sound_id: v.picklist(\n ['success', 'warning', 'failure', 'notification_1', 'notification_2',\n 'imperial_march'] as const,\n ),\n volume: v.pipe(v.number(), v.minValue(0), v.maxValue(100)),\n});\nexport type PlaybackConfiguration = v.InferOutput<typeof playbackConfiguration>;\n\nexport const internalKnobEvent = v.object({\n button_pressed: v.boolean(),\n button_held: v.boolean(),\n rotation_delta: v.number(),\n});\nconst knobEvent = v.omit(internalKnobEvent, ['button_held']);\nexport type KnobEvent = v.InferOutput<typeof knobEvent>;\n\n/** @hideconstructor */\nexport class HmiApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets the HMI.\n */\n reset(): Promise<void> {\n return this.fetch('/hmi/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access the screen API.\n * @returns The screen instance.\n */\n screen(): Screen {\n return new Screen(this.fetch);\n }\n\n /**\n * Access the audio API.\n * @returns The audio instance.\n */\n audio(): Audio {\n return new Audio(this.fetch);\n }\n\n /**\n * Access the knob API.\n * @returns The knob instance.\n */\n knob(): Knob {\n return new Knob(this.fetch);\n }\n}\n\n/** @hideconstructor */\nexport class Screen {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Prints text to the screen.\n * @param data The text to print.\n * @returns The printed text.\n */\n async print(data: ScreenText): Promise<string> {\n return (await this.fetch('/hmi/screen/text', {\n method: 'POST',\n body: v.parse(text, { text: data } satisfies Text),\n schema: text,\n }))\n .text;\n }\n\n /**\n * Sets the screen colors.\n * @param colors The colors to set.\n * @returns The updated colors.\n */\n colors(colors: Color): Promise<Color> {\n return this.fetch('/hmi/screen/colors', {\n method: 'PATCH',\n body: v.parse(color, colors satisfies Color),\n schema: color,\n });\n }\n\n /**\n * Sets the screen progress.\n * @param data The progress value to set.\n * @returns The updated progress.\n */\n async progress(data: ProgressValue): Promise<Progress> {\n if (data == 0) {\n return await this.fetch('/hmi/screen/progress', {\n method: 'DELETE',\n parseResponse: () => ({ progress: 0 }),\n });\n }\n\n return this.fetch('/hmi/screen/progress', {\n method: 'PUT',\n body: v.parse(progress, { progress: data } satisfies Progress),\n schema: progress,\n });\n }\n\n /**\n * Clears the screen.\n */\n clear(): Promise<void> {\n return this.fetch('/hmi/screen/clear', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Clears the text on the screen.\n */\n clear_text(): Promise<void> {\n return this.fetch('/hmi/screen/text', { method: 'DELETE', parseResponse: () => {} });\n }\n}\n\n/** @hideconstructor */\nexport class Audio {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Plays a sound.\n * @param config The configuration (sound_id, volume).\n * @returns The play configuration.\n */\n async play(config: PlaybackConfiguration): Promise<PlaybackConfiguration> {\n return this.fetch('/hmi/speaker/play', {\n method: 'POST',\n body: v.parse(playbackConfiguration, config),\n schema: playbackConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Knob {\n constructor(private readonly fetch: UpFetch) {}\n\n read_event = () => this.fetch('/hmi/knob/get_knob_event', { schema: internalKnobEvent });\n\n is_button_held = async () => (await this.read_event()).button_held;\n is_knob_turned = async () => Math.abs((await this.read_event()).rotation_delta) >= 4;\n\n /**\n * Waits for a knob event and returns it.\n * @param timeout_ms The timeout in milliseconds.\n * @returns The knob event or null if the timeout was reached.\n */\n async wait_event(timeout_ms?: number): Promise<KnobEvent | null> {\n await this.read_event(); // Discard any previous events\n let delta = 0;\n\n const interval = Math.min(50, (timeout_ms ?? 500) / 10);\n\n const startTime = Date.now();\n while (timeout_ms !== undefined ? Date.now() - startTime < timeout_ms : true) {\n const knobEvent = await this.read_event();\n delta += knobEvent.rotation_delta;\n\n if (knobEvent.button_pressed || Math.abs(delta) >= 4) {\n return { button_pressed: knobEvent.button_pressed, rotation_delta: Math.sign(delta) };\n }\n await new Promise((resolve) => setTimeout(resolve, interval));\n }\n\n return null;\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hmi.cjs","names":["v"],"sources":["../src/api/hmi.ts"],"sourcesContent":["import type { UpFetch } from 'up-fetch';\nimport * as v from 'valibot';\n\nconst screenText = v.pipe(v.string(), v.maxLength(1024));\nexport type ScreenText = v.InferOutput<typeof screenText>;\n\nexport const text = v.object({ text: screenText });\ntype Text = v.InferOutput<typeof text>;\n\nconst optionalHexColor = v.optional(v.pipe(v.string(), v.length(7), v.hexColor()));\nexport const color = v.object({\n text: optionalHexColor,\n progress: optionalHexColor,\n background: optionalHexColor,\n});\nexport type Color = v.InferOutput<typeof color>;\n\nconst progressValue = v.pipe(v.number(), v.minValue(0), v.maxValue(100));\nexport type ProgressValue = v.InferOutput<typeof progressValue>;\nexport const progress = v.object({ progress: progressValue });\nexport type Progress = v.InferOutput<typeof progress>;\n\nexport const playbackConfiguration = v.object({\n sound_id: v.picklist(\n ['success', 'warning', 'failure', 'notification_1', 'notification_2',\n 'imperial_march'] as const,\n ),\n volume: v.pipe(v.number(), v.minValue(0), v.maxValue(100)),\n});\nexport type PlaybackConfiguration = v.InferOutput<typeof playbackConfiguration>;\n\nexport const internalKnobEvent = v.object({\n button_pressed: v.boolean(),\n button_held: v.boolean(),\n rotation_delta: v.number(),\n});\nconst knobEvent = v.omit(internalKnobEvent, ['button_held']);\nexport type KnobEvent = v.InferOutput<typeof knobEvent>;\n\n/** @hideconstructor */\nexport class HmiApi {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Resets the HMI.\n */\n reset(): Promise<void> {\n return this.fetch('/hmi/reset', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Access the screen API.\n * @returns The screen instance.\n */\n screen(): Screen {\n return new Screen(this.fetch);\n }\n\n /**\n * Access the audio API.\n * @returns The audio instance.\n */\n audio(): Audio {\n return new Audio(this.fetch);\n }\n\n /**\n * Access the knob API.\n * @returns The knob instance.\n */\n knob(): Knob {\n return new Knob(this.fetch);\n }\n}\n\n/** @hideconstructor */\nexport class Screen {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Prints text to the screen.\n * @param data The text to print.\n * @returns The printed text.\n */\n async print(data: ScreenText): Promise<string> {\n return (await this.fetch('/hmi/screen/text', {\n method: 'POST',\n body: v.parse(text, { text: data } satisfies Text),\n schema: text,\n }))\n .text;\n }\n\n /**\n * Sets the screen colors.\n * @param colors The colors to set.\n * @returns The updated colors.\n */\n colors(colors: Color): Promise<Color> {\n return this.fetch('/hmi/screen/colors', {\n method: 'PATCH',\n body: v.parse(color, colors satisfies Color),\n schema: color,\n });\n }\n\n /**\n * Sets the screen progress.\n * @param data The progress value to set.\n * @returns The updated progress.\n */\n async progress(data: ProgressValue): Promise<Progress> {\n if (data == 0) {\n return await this.fetch('/hmi/screen/progress', {\n method: 'DELETE',\n parseResponse: () => ({ progress: 0 }),\n });\n }\n\n return this.fetch('/hmi/screen/progress', {\n method: 'PUT',\n body: v.parse(progress, { progress: data } satisfies Progress),\n schema: progress,\n });\n }\n\n /**\n * Clears the screen.\n */\n clear(): Promise<void> {\n return this.fetch('/hmi/screen/clear', { method: 'POST', parseResponse: () => {} });\n }\n\n /**\n * Clears the text on the screen.\n */\n clear_text(): Promise<void> {\n return this.fetch('/hmi/screen/text', { method: 'DELETE', parseResponse: () => {} });\n }\n}\n\n/** @hideconstructor */\nexport class Audio {\n constructor(private readonly fetch: UpFetch) {}\n\n /**\n * Plays a sound.\n * @param config The configuration (sound_id, volume).\n * @returns The play configuration.\n */\n async play(config: PlaybackConfiguration): Promise<PlaybackConfiguration> {\n return this.fetch('/hmi/speaker/play', {\n method: 'POST',\n body: v.parse(playbackConfiguration, config),\n schema: playbackConfiguration,\n });\n }\n}\n\n/** @hideconstructor */\nexport class Knob {\n constructor(private readonly fetch: UpFetch) {}\n\n read_event = () => this.fetch('/hmi/knob/get_knob_event', { schema: internalKnobEvent });\n\n is_button_held = async () => (await this.read_event()).button_held;\n is_knob_turned = async () => Math.abs((await this.read_event()).rotation_delta) >= 4;\n\n /**\n * Waits for a knob event and returns it.\n * @param timeout_ms The timeout in milliseconds.\n * @returns The knob event or null if the timeout was reached.\n */\n async wait_event(timeout_ms?: number): Promise<KnobEvent | null> {\n await this.read_event(); // Discard any previous events\n let delta = 0;\n\n const interval = Math.min(50, (timeout_ms ?? 500) / 10);\n\n const startTime = Date.now();\n while (timeout_ms !== undefined ? Date.now() - startTime < timeout_ms : true) {\n const knobEvent = await this.read_event();\n delta += knobEvent.rotation_delta;\n\n if (knobEvent.button_pressed || Math.abs(delta) >= 4) {\n return { button_pressed: knobEvent.button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AEvF,eAAiB,UAAa,MAAM,KAAK,WAAW,EAAA,CAAG,YACvD,eAAiB,SAAY,KAAK,KAAK,MAAM,KAAK,WAAW,EAAA,CAAG,cAAc,GAAK,EAOnF,MAAM,WAAW,EAAgD,CAC/D,MAAM,KAAK,WAAW,EACtB,IAAI,EAAQ,EAEN,EAAW,KAAK,IAAI,IAAK,GAAc,KAAO,EAAE,EAEhD,EAAY,KAAK,IAAI,EAC3B,KAAO,IAAe,IAAA,IAAY,KAAK,IAAI,EAAI,EAAY,GAAmB,CAC5E,IAAM,EAAY,MAAM,KAAK,WAAW,EAGxC,GAFA,GAAS,EAAU,eAEf,EAAU,gBAAkB,KAAK,IAAI,CAAK,GAAK,EACjD,MAAO,CAAE,eAAgB,EAAU,eAAgB,eAAgB,KAAK,KAAK,CAAK,CAAE,EAEtF,MAAM,IAAI,QAAS,GAAY,WAAW,EAAS,CAAQ,CAAC,CAC9D,CAEA,OAAO,IACT,CACF"}
|
package/build/hmi.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as KnobEvent, c as ProgressValue, d as color, f as internalKnobEvent, h as text, i as Knob, l as Screen, m as progress, n as Color, o as PlaybackConfiguration, p as playbackConfiguration, r as HmiApi, s as Progress, t as Audio, u as ScreenText } from "./hmi-
|
|
1
|
+
import { a as KnobEvent, c as ProgressValue, d as color, f as internalKnobEvent, h as text, i as Knob, l as Screen, m as progress, n as Color, o as PlaybackConfiguration, p as playbackConfiguration, r as HmiApi, s as Progress, t as Audio, u as ScreenText } from "./hmi-B-potLdl.cjs";
|
|
2
2
|
export { Audio, Color, HmiApi, Knob, KnobEvent, PlaybackConfiguration, Progress, ProgressValue, Screen, ScreenText, color, internalKnobEvent, playbackConfiguration, progress, text };
|
package/build/hmi.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as KnobEvent, c as ProgressValue, d as color, f as internalKnobEvent, h as text, i as Knob, l as Screen, m as progress, n as Color, o as PlaybackConfiguration, p as playbackConfiguration, r as HmiApi, s as Progress, t as Audio, u as ScreenText } from "./hmi-
|
|
1
|
+
import { a as KnobEvent, c as ProgressValue, d as color, f as internalKnobEvent, h as text, i as Knob, l as Screen, m as progress, n as Color, o as PlaybackConfiguration, p as playbackConfiguration, r as HmiApi, s as Progress, t as Audio, u as ScreenText } from "./hmi-B-potLdl.mjs";
|
|
2
2
|
export { Audio, Color, HmiApi, Knob, KnobEvent, PlaybackConfiguration, Progress, ProgressValue, Screen, ScreenText, color, internalKnobEvent, playbackConfiguration, progress, text };
|
package/build/management.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./at1000-DbIvMQUc.cjs");exports.CommunicationInterfaceType=e.u,exports.ManagementApi=e.d,exports.calibrationData=e.f,exports.calibrationState=e.p,exports.portMapping=e.m,exports.project=e.h,exports.projectEvent=e.g,exports.runMode=e._,exports.updateStatus=e.v;
|
package/build/management.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { UpFetch } from "up-fetch";
|
|
2
2
|
import * as v from "valibot";
|
|
3
|
-
|
|
4
3
|
//#region src/api/management.d.ts
|
|
5
4
|
declare enum CommunicationInterfaceType {
|
|
6
5
|
Can = "can",
|
|
@@ -20,6 +19,9 @@ declare const info: v.ObjectSchema<{
|
|
|
20
19
|
readonly disk_used: v.NumberSchema<undefined>;
|
|
21
20
|
readonly disk_total: v.NumberSchema<undefined>;
|
|
22
21
|
readonly docker_used: v.NumberSchema<undefined>;
|
|
22
|
+
readonly ram_used: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
23
|
+
readonly ram_total: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
24
|
+
readonly cpu_temperature: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
23
25
|
readonly capabilities: v.ObjectSchema<{
|
|
24
26
|
readonly io: v.ObjectSchema<{
|
|
25
27
|
readonly count: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.MinValueAction<number, 1, undefined>]>;
|
|
@@ -112,6 +114,7 @@ declare const project: v.ObjectSchema<{
|
|
|
112
114
|
readonly command: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
113
115
|
readonly state: v.PicklistSchema<["idle", "running", "error"], undefined>;
|
|
114
116
|
readonly mode: v.OptionalSchema<v.PicklistSchema<["normal", "development"], undefined>, undefined>;
|
|
117
|
+
readonly password_set: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
115
118
|
}, undefined>;
|
|
116
119
|
type Project = v.InferOutput<typeof project>;
|
|
117
120
|
declare const projectEvent: v.VariantSchema<"change", [v.ObjectSchema<{
|
|
@@ -142,6 +145,7 @@ declare const projectPatch: Omit<Omit<v.ObjectSchema<{
|
|
|
142
145
|
readonly command: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
143
146
|
readonly state: v.PicklistSchema<["idle", "running", "error"], undefined>;
|
|
144
147
|
readonly mode: v.OptionalSchema<v.PicklistSchema<["normal", "development"], undefined>, undefined>;
|
|
148
|
+
readonly password_set: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
145
149
|
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
146
150
|
readonly entries: Pick<{
|
|
147
151
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -157,6 +161,7 @@ declare const projectPatch: Omit<Omit<v.ObjectSchema<{
|
|
|
157
161
|
readonly command: v.OptionalSchema<v.StringSchema<undefined>, "">;
|
|
158
162
|
readonly state: v.PicklistSchema<["idle", "running", "error"], undefined>;
|
|
159
163
|
readonly mode: v.OptionalSchema<v.PicklistSchema<["normal", "development"], undefined>, undefined>;
|
|
164
|
+
readonly password_set: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
160
165
|
}, "name" | "is_default" | "command">;
|
|
161
166
|
readonly "~standard": v.StandardProps<{
|
|
162
167
|
name: string;
|
|
@@ -245,6 +250,7 @@ declare const updateStatus: v.ObjectSchema<{
|
|
|
245
250
|
readonly progress: v.NumberSchema<undefined>;
|
|
246
251
|
readonly message: v.StringSchema<undefined>;
|
|
247
252
|
readonly error: v.StringSchema<undefined>;
|
|
253
|
+
readonly boot: v.OptionalSchema<v.PicklistSchema<["confirmed", "pending", "unknown"], undefined>, undefined>;
|
|
248
254
|
}, undefined>;
|
|
249
255
|
type UpdateStatus = v.InferOutput<typeof updateStatus>;
|
|
250
256
|
declare const rebootResponse: v.ObjectSchema<{
|
|
@@ -320,7 +326,8 @@ type RelayTestResult = v.InferOutput<typeof relayTestResult>;
|
|
|
320
326
|
declare const usbTestResult: v.ObjectSchema<{
|
|
321
327
|
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
322
328
|
readonly status: v.PicklistSchema<["pass", "fail"], undefined>;
|
|
323
|
-
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
329
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
330
|
+
/** @deprecated Legacy field; only present on calibrations from older devices. */
|
|
324
331
|
readonly current_tests: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
325
332
|
readonly load_ohms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>, v.MinValueAction<number, number, undefined>]>;
|
|
326
333
|
readonly voltage_applied: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
@@ -407,7 +414,8 @@ declare const calibrationData: v.ObjectSchema<{
|
|
|
407
414
|
readonly usb: v.ArraySchema<v.ObjectSchema<{
|
|
408
415
|
readonly port: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 1, undefined>]>;
|
|
409
416
|
readonly status: v.PicklistSchema<["pass", "fail"], undefined>;
|
|
410
|
-
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
417
|
+
readonly voltage: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
418
|
+
/** @deprecated Legacy field; only present on calibrations from older devices. */
|
|
411
419
|
readonly current_tests: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
412
420
|
readonly load_ohms: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>, v.MinValueAction<number, number, undefined>]>;
|
|
413
421
|
readonly voltage_applied: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.FiniteAction<number, undefined>]>;
|
|
@@ -444,6 +452,9 @@ declare class ManagementApi {
|
|
|
444
452
|
disk_used: number;
|
|
445
453
|
disk_total: number;
|
|
446
454
|
docker_used: number;
|
|
455
|
+
ram_used?: number | undefined;
|
|
456
|
+
ram_total?: number | undefined;
|
|
457
|
+
cpu_temperature?: number | undefined;
|
|
447
458
|
capabilities: {
|
|
448
459
|
io: {
|
|
449
460
|
count: number;
|
|
@@ -562,6 +573,7 @@ declare class ManagementApi {
|
|
|
562
573
|
command: string;
|
|
563
574
|
state: "error" | "idle" | "running";
|
|
564
575
|
mode?: "normal" | "development" | undefined;
|
|
576
|
+
password_set?: boolean | undefined;
|
|
565
577
|
}[]>;
|
|
566
578
|
/**
|
|
567
579
|
* Lists the AT1000 base images present on the device.
|
|
@@ -587,6 +599,7 @@ declare class ManagementApi {
|
|
|
587
599
|
command: string;
|
|
588
600
|
state: "error" | "idle" | "running";
|
|
589
601
|
mode?: "normal" | "development" | undefined;
|
|
602
|
+
password_set?: boolean | undefined;
|
|
590
603
|
}>;
|
|
591
604
|
/**
|
|
592
605
|
* Creates a new project from a preinstalled template.
|
|
@@ -606,6 +619,7 @@ declare class ManagementApi {
|
|
|
606
619
|
command: string;
|
|
607
620
|
state: "error" | "idle" | "running";
|
|
608
621
|
mode?: "normal" | "development" | undefined;
|
|
622
|
+
password_set?: boolean | undefined;
|
|
609
623
|
}>;
|
|
610
624
|
/**
|
|
611
625
|
* Imports a project from a container image archive (.tar / .tar.gz).
|
|
@@ -627,6 +641,7 @@ declare class ManagementApi {
|
|
|
627
641
|
command: string;
|
|
628
642
|
state: "error" | "idle" | "running";
|
|
629
643
|
mode?: "normal" | "development" | undefined;
|
|
644
|
+
password_set?: boolean | undefined;
|
|
630
645
|
}>;
|
|
631
646
|
/**
|
|
632
647
|
* Patches an existing project (`name`, `is_default`, `command`). An empty `command` clears it (entrypoint autodetect).
|
|
@@ -647,6 +662,7 @@ declare class ManagementApi {
|
|
|
647
662
|
command: string;
|
|
648
663
|
state: "error" | "idle" | "running";
|
|
649
664
|
mode?: "normal" | "development" | undefined;
|
|
665
|
+
password_set?: boolean | undefined;
|
|
650
666
|
}>;
|
|
651
667
|
/**
|
|
652
668
|
* Runs a project.
|
|
@@ -762,6 +778,7 @@ declare class ManagementApi {
|
|
|
762
778
|
progress: number;
|
|
763
779
|
message: string;
|
|
764
780
|
error: string;
|
|
781
|
+
boot?: "confirmed" | "pending" | "unknown" | undefined;
|
|
765
782
|
}>;
|
|
766
783
|
/**
|
|
767
784
|
* Reboots the device.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"management.d.cts","names":[],"sources":["../src/api/management.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"management.d.cts","names":[],"sources":["../src/api/management.ts"],"mappings":";;;aAKY;EACV;EACA;EACA;EACA;EACA;EACA;;cA+EI,MAAI,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgBE,cAAc,EAAE,mBAA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