@duet3d/objectmodel 3.6.0-beta.2 → 3.6.0-beta.4
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.
|
@@ -3,7 +3,9 @@ import { IModelObject } from "./ModelObject";
|
|
|
3
3
|
* Class for storing model object items in an array
|
|
4
4
|
*/
|
|
5
5
|
export declare class ModelCollection<T extends IModelObject | null> extends Array<T> implements IModelObject {
|
|
6
|
-
|
|
6
|
+
readonly itemConstructor: {
|
|
7
|
+
new (): T;
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* Constructor of this class
|
|
9
11
|
* @param itemConstructor Item constructor type that items must derive from
|
|
@@ -3,8 +3,10 @@ import { IModelObject } from "./ModelObject";
|
|
|
3
3
|
* Dictionary class to map object model data
|
|
4
4
|
*/
|
|
5
5
|
export declare class ModelDictionary<T> extends Map<string, T | null> implements IModelObject {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
readonly nullDeletesKeys: boolean;
|
|
7
|
+
readonly itemConstructor: {
|
|
8
|
+
new (): T;
|
|
9
|
+
} | null;
|
|
8
10
|
/**
|
|
9
11
|
* Constructor of this class
|
|
10
12
|
* @param nullDeletesKeys Whether setting null to items effectively deletes them
|
package/dist/ModelDictionary.js
CHANGED
|
@@ -14,8 +14,8 @@ class ModelDictionary extends Map {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(nullDeletesKeys, itemConstructor = null) {
|
|
16
16
|
super();
|
|
17
|
-
this.itemConstructor = itemConstructor;
|
|
18
17
|
this.nullDeletesKeys = nullDeletesKeys;
|
|
18
|
+
this.itemConstructor = itemConstructor;
|
|
19
19
|
Object.setPrototypeOf(this, ModelDictionary.prototype);
|
|
20
20
|
}
|
|
21
21
|
/**
|
package/dist/sensors/Probe.d.ts
CHANGED
|
@@ -13,7 +13,14 @@ export declare enum ProbeType {
|
|
|
13
13
|
zMotorStall = 10,
|
|
14
14
|
scanningAnalog = 11
|
|
15
15
|
}
|
|
16
|
+
export declare class ProbeTouchMode extends ModelObject {
|
|
17
|
+
active: boolean;
|
|
18
|
+
sensivity: number;
|
|
19
|
+
speed: number;
|
|
20
|
+
triggerHeight: number;
|
|
21
|
+
}
|
|
16
22
|
export declare class Probe extends ModelObject {
|
|
23
|
+
constructor();
|
|
17
24
|
calibA: number | null;
|
|
18
25
|
calibB: number | null;
|
|
19
26
|
calibrationTemperature: number;
|
|
@@ -35,6 +42,7 @@ export declare class Probe extends ModelObject {
|
|
|
35
42
|
temperatureCoefficients: Array<number>;
|
|
36
43
|
threshold: number;
|
|
37
44
|
tolerance: number;
|
|
45
|
+
touchMode: ProbeTouchMode | null;
|
|
38
46
|
travelSpeed: number;
|
|
39
47
|
triggerHeight: number;
|
|
40
48
|
type: ProbeType;
|
package/dist/sensors/Probe.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Probe = exports.ProbeType = void 0;
|
|
3
|
+
exports.Probe = exports.ProbeTouchMode = exports.ProbeType = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
var ProbeType;
|
|
6
6
|
(function (ProbeType) {
|
|
@@ -17,9 +17,19 @@ var ProbeType;
|
|
|
17
17
|
ProbeType[ProbeType["zMotorStall"] = 10] = "zMotorStall";
|
|
18
18
|
ProbeType[ProbeType["scanningAnalog"] = 11] = "scanningAnalog";
|
|
19
19
|
})(ProbeType || (exports.ProbeType = ProbeType = {}));
|
|
20
|
-
class
|
|
20
|
+
class ProbeTouchMode extends ModelObject_1.default {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
|
+
this.active = false;
|
|
24
|
+
this.sensivity = 0;
|
|
25
|
+
this.speed = 0;
|
|
26
|
+
this.triggerHeight = 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ProbeTouchMode = ProbeTouchMode;
|
|
30
|
+
class Probe extends ModelObject_1.default {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
23
33
|
this.calibA = null;
|
|
24
34
|
this.calibB = null;
|
|
25
35
|
this.calibrationTemperature = 0;
|
|
@@ -41,10 +51,12 @@ class Probe extends ModelObject_1.default {
|
|
|
41
51
|
this.temperatureCoefficients = [0, 0];
|
|
42
52
|
this.threshold = 500;
|
|
43
53
|
this.tolerance = 0.03;
|
|
54
|
+
this.touchMode = null;
|
|
44
55
|
this.travelSpeed = 6000;
|
|
45
56
|
this.triggerHeight = 0.7;
|
|
46
57
|
this.type = ProbeType.none;
|
|
47
58
|
this.value = [];
|
|
59
|
+
ModelObject_1.default.wrapModelProperty(this, "touchMode", ProbeTouchMode);
|
|
48
60
|
}
|
|
49
61
|
}
|
|
50
62
|
exports.Probe = Probe;
|