@duet3d/objectmodel 3.5.0-beta.21 → 3.5.0-beta.24
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/ModelObject.d.ts +1 -1
- package/dist/ModelObject.js +3 -3
- package/dist/ModelSet.d.ts +2 -1
- package/dist/ModelSet.js +2 -0
- package/dist/boards/index.js +6 -6
- package/dist/job/index.js +2 -2
- package/dist/move/Extruder.js +1 -1
- package/dist/move/MoveCompensation.js +2 -2
- package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +1 -1
- package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +1 -1
- package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +1 -1
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.js +14 -3
- package/package.json +1 -1
package/dist/ModelObject.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare abstract class ModelObject implements IModelObject {
|
|
|
29
29
|
* @param key Property key of the derived class
|
|
30
30
|
* @param constructor Constructor for creating new elements
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
static wrapModelProperty<S extends IModelObject, K extends keyof S, T extends IModelObject>(self: S, key: K, constructor: {
|
|
33
33
|
new (): T;
|
|
34
34
|
}): void;
|
|
35
35
|
}
|
package/dist/ModelObject.js
CHANGED
|
@@ -174,9 +174,9 @@ class ModelObject {
|
|
|
174
174
|
* @param key Property key of the derived class
|
|
175
175
|
* @param constructor Constructor for creating new elements
|
|
176
176
|
*/
|
|
177
|
-
wrapModelProperty(key, constructor) {
|
|
178
|
-
let propertyValue =
|
|
179
|
-
Object.defineProperty(
|
|
177
|
+
static wrapModelProperty(self, key, constructor) {
|
|
178
|
+
let propertyValue = self[key];
|
|
179
|
+
Object.defineProperty(self, key, {
|
|
180
180
|
get() { return propertyValue; },
|
|
181
181
|
set(newValue) {
|
|
182
182
|
if (newValue === null) {
|
package/dist/ModelSet.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Wrapper around a standard set to make sure it serializes to an array
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export declare class ModelSet<T> extends Set<T> {
|
|
5
5
|
/**
|
|
6
6
|
* Convert this object to JSON
|
|
7
7
|
* @returns JSON object
|
|
8
8
|
*/
|
|
9
9
|
toJSON(): T[];
|
|
10
10
|
}
|
|
11
|
+
export default ModelSet;
|
package/dist/ModelSet.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModelSet = void 0;
|
|
3
4
|
/**
|
|
4
5
|
* Wrapper around a standard set to make sure it serializes to an array
|
|
5
6
|
*/
|
|
@@ -10,4 +11,5 @@ class ModelSet extends Set {
|
|
|
10
11
|
*/
|
|
11
12
|
toJSON() { return Array.from(this); }
|
|
12
13
|
}
|
|
14
|
+
exports.ModelSet = ModelSet;
|
|
13
15
|
exports.default = ModelSet;
|
package/dist/boards/index.js
CHANGED
|
@@ -69,12 +69,12 @@ class Board extends ModelObject_1.default {
|
|
|
69
69
|
this.v12 = null;
|
|
70
70
|
this.vIn = null;
|
|
71
71
|
this.wifiFirmwareFileName = null;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
ModelObject_1.default.wrapModelProperty(this, "accelerometer", Accelerometer);
|
|
73
|
+
ModelObject_1.default.wrapModelProperty(this, "closedLoop", ClosedLoop);
|
|
74
|
+
ModelObject_1.default.wrapModelProperty(this, "directDisplay", DirectDisplay);
|
|
75
|
+
ModelObject_1.default.wrapModelProperty(this, "mcuTemp", MinMaxCurrent);
|
|
76
|
+
ModelObject_1.default.wrapModelProperty(this, "v12", MinMaxCurrent);
|
|
77
|
+
ModelObject_1.default.wrapModelProperty(this, "vIn", MinMaxCurrent);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
exports.Board = Board;
|
package/dist/job/index.js
CHANGED
|
@@ -59,8 +59,8 @@ class Job extends ModelObject_1.default {
|
|
|
59
59
|
this.rawExtrusion = null;
|
|
60
60
|
this.timesLeft = new TimesLeft();
|
|
61
61
|
this.warmUpDuration = null;
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
ModelObject_1.default.wrapModelProperty(this, "build", Build_1.default);
|
|
63
|
+
ModelObject_1.default.wrapModelProperty(this, "file", GCodeFileInfo_1.default);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
exports.Job = Job;
|
package/dist/move/Extruder.js
CHANGED
|
@@ -32,7 +32,7 @@ class Extruder extends ModelObject_1.default {
|
|
|
32
32
|
this.rawPosition = 0;
|
|
33
33
|
this.speed = 100;
|
|
34
34
|
this.stepsPerMm = 420;
|
|
35
|
-
|
|
35
|
+
ModelObject_1.default.wrapModelProperty(this, "driver", DriverId_1.default);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.Extruder = Extruder;
|
|
@@ -39,8 +39,8 @@ class MoveCompensation extends ModelObject_1.default {
|
|
|
39
39
|
this.probeGrid = new ProbeGrid();
|
|
40
40
|
this.skew = new Skew();
|
|
41
41
|
this.type = MoveCompensationType.none;
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
ModelObject_1.default.wrapModelProperty(this, "liveGrid", ProbeGrid);
|
|
43
|
+
ModelObject_1.default.wrapModelProperty(this, "meshDeviation", MoveCalibration_1.MoveDeviations);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
exports.MoveCompensation = MoveCompensation;
|
|
@@ -30,7 +30,7 @@ class LaserFilamentMonitor extends FilamentMonitorBase_1.default {
|
|
|
30
30
|
super(FilamentMonitorBase_1.FilamentMonitorType.laser);
|
|
31
31
|
this.calibrated = new LaserFilamentMonitorCalibrated();
|
|
32
32
|
this.configured = new LaserFilamentMonitorConfigured();
|
|
33
|
-
|
|
33
|
+
ModelObject_1.default.wrapModelProperty(this, "calibrated", LaserFilamentMonitorCalibrated);
|
|
34
34
|
}
|
|
35
35
|
update(jsonElement) {
|
|
36
36
|
if (jsonElement === null) {
|
|
@@ -29,7 +29,7 @@ class PulsedFilamentMonitor extends FilamentMonitorBase_1.default {
|
|
|
29
29
|
super(FilamentMonitorBase_1.FilamentMonitorType.pulsed);
|
|
30
30
|
this.calibrated = new PulsedFilamentMonitorCalibrated();
|
|
31
31
|
this.configured = new PulsedFilamentMonitorConfigured();
|
|
32
|
-
|
|
32
|
+
ModelObject_1.default.wrapModelProperty(this, "calibrated", PulsedFilamentMonitorCalibrated);
|
|
33
33
|
}
|
|
34
34
|
update(jsonElement) {
|
|
35
35
|
if (jsonElement === null) {
|
|
@@ -30,7 +30,7 @@ class RotatingMagnetFilamentMonitor extends FilamentMonitorBase_1.default {
|
|
|
30
30
|
super(FilamentMonitorBase_1.FilamentMonitorType.rotatingMagnet);
|
|
31
31
|
this.calibrated = new RotatingMagnetFilamentMonitorCalibrated();
|
|
32
32
|
this.configured = new RotatingMagnetFilamentMonitorConfigured();
|
|
33
|
-
|
|
33
|
+
ModelObject_1.default.wrapModelProperty(this, "calibrated", RotatingMagnetFilamentMonitorCalibrated);
|
|
34
34
|
}
|
|
35
35
|
update(jsonElement) {
|
|
36
36
|
if (jsonElement === null) {
|
package/dist/state/index.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ export declare class BeepRequest extends ModelObject {
|
|
|
7
7
|
duration: number;
|
|
8
8
|
frequency: number;
|
|
9
9
|
}
|
|
10
|
+
export declare class ConfigErr extends ModelObject {
|
|
11
|
+
file: string | null;
|
|
12
|
+
line: number;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
10
15
|
export declare class GpOutputPort extends ModelObject {
|
|
11
16
|
freq: number;
|
|
12
17
|
pwm: number;
|
|
@@ -27,6 +32,7 @@ export declare class State extends ModelObject {
|
|
|
27
32
|
atxPower: boolean | null;
|
|
28
33
|
atxPowerPort: string | null;
|
|
29
34
|
beep: BeepRequest | null;
|
|
35
|
+
configErr: ConfigErr | null;
|
|
30
36
|
currentTool: number;
|
|
31
37
|
deferredPowerDown: boolean | null;
|
|
32
38
|
displayMessage: string;
|
package/dist/state/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.State = exports.MachineMode = exports.LogLevel = exports.GpOutputPort = exports.BeepRequest = void 0;
|
|
17
|
+
exports.State = exports.MachineMode = exports.LogLevel = exports.GpOutputPort = exports.ConfigErr = exports.BeepRequest = void 0;
|
|
18
18
|
const ModelObject_1 = require("../ModelObject");
|
|
19
19
|
const ModelCollection_1 = require("../ModelCollection");
|
|
20
20
|
const MessageBox_1 = require("./MessageBox");
|
|
@@ -28,6 +28,15 @@ class BeepRequest extends ModelObject_1.default {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.BeepRequest = BeepRequest;
|
|
31
|
+
class ConfigErr extends ModelObject_1.default {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.file = null;
|
|
35
|
+
this.line = -1;
|
|
36
|
+
this.message = "";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ConfigErr = ConfigErr;
|
|
31
40
|
class GpOutputPort extends ModelObject_1.default {
|
|
32
41
|
constructor() {
|
|
33
42
|
super(...arguments);
|
|
@@ -55,6 +64,7 @@ class State extends ModelObject_1.default {
|
|
|
55
64
|
this.atxPower = null;
|
|
56
65
|
this.atxPowerPort = null;
|
|
57
66
|
this.beep = null;
|
|
67
|
+
this.configErr = null;
|
|
58
68
|
this.currentTool = -1;
|
|
59
69
|
this.deferredPowerDown = null;
|
|
60
70
|
this.displayMessage = "";
|
|
@@ -78,8 +88,9 @@ class State extends ModelObject_1.default {
|
|
|
78
88
|
this.thisInput = null;
|
|
79
89
|
this.time = null;
|
|
80
90
|
this.upTime = 0;
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
ModelObject_1.default.wrapModelProperty(this, "beep", BeepRequest);
|
|
92
|
+
ModelObject_1.default.wrapModelProperty(this, "configErr", ConfigErr);
|
|
93
|
+
ModelObject_1.default.wrapModelProperty(this, "messageBox", MessageBox_1.default);
|
|
83
94
|
}
|
|
84
95
|
}
|
|
85
96
|
exports.State = State;
|