@duet3d/objectmodel 3.7.0-beta.9 → 3.7.0-rc.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/ModelCollection.d.ts +11 -1
- package/dist/ModelCollection.js +24 -4
- package/dist/ObjectModel.js +2 -2
- package/dist/boards/Driver.d.ts +2 -1
- package/dist/boards/Driver.js +2 -1
- package/dist/boards/directDisplay/DirectDisplayScreen.d.ts +1 -1
- package/dist/boards/directDisplay/DirectDisplayScreen.js +3 -3
- package/dist/boards/directDisplay/DirectDisplayScreenST7567.d.ts +1 -1
- package/dist/boards/directDisplay/DirectDisplayScreenST7567.js +3 -3
- package/dist/boards/index.d.ts +25 -10
- package/dist/boards/index.js +35 -14
- package/dist/documentation.json +82 -16
- package/dist/enums.json +11 -8
- package/dist/move/index.d.ts +1 -0
- package/dist/move/index.js +1 -0
- package/dist/move/kinematics/CoreKinematics.d.ts +1 -1
- package/dist/move/kinematics/CoreKinematics.js +3 -3
- package/dist/move/kinematics/DeltaKinematics.d.ts +1 -1
- package/dist/move/kinematics/DeltaKinematics.js +3 -3
- package/dist/move/kinematics/HangprinterKinematics.d.ts +1 -1
- package/dist/move/kinematics/HangprinterKinematics.js +3 -3
- package/dist/move/kinematics/KinematicsBase.d.ts +6 -6
- package/dist/move/kinematics/KinematicsBase.js +7 -6
- package/dist/move/kinematics/PolarKinematics.d.ts +1 -1
- package/dist/move/kinematics/PolarKinematics.js +3 -3
- package/dist/move/kinematics/ScaraKinematics.d.ts +1 -1
- package/dist/move/kinematics/ScaraKinematics.js +3 -3
- package/dist/move/kinematics/index.d.ts +1 -1
- package/dist/move/kinematics/index.js +3 -3
- package/dist/plugins/PluginManifest.d.ts +1 -1
- package/dist/plugins/PluginManifest.js +2 -2
- package/dist/sensors/Endstop.d.ts +1 -0
- package/dist/sensors/Endstop.js +1 -0
- package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +1 -1
- package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +3 -3
- package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +1 -1
- package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +3 -3
- package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +1 -1
- package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +3 -3
- package/dist/sensors/FilamentMonitors/index.d.ts +1 -1
- package/dist/sensors/FilamentMonitors/index.js +3 -3
- package/dist/sensors/Probe.d.ts +9 -1
- package/dist/sensors/Probe.js +12 -0
- package/dist/state/MessageBox.d.ts +1 -1
- package/dist/state/MessageBox.js +2 -2
- package/package.json +1 -1
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import type { IModelObject } from "./ModelObject";
|
|
2
|
+
/**
|
|
3
|
+
* Factory creating the item for a given index
|
|
4
|
+
*/
|
|
5
|
+
export type ItemFactory<T> = (index: number) => T;
|
|
2
6
|
/**
|
|
3
7
|
* Class for storing model object items in an array
|
|
4
8
|
*/
|
|
5
9
|
export declare class ModelCollection<T extends IModelObject | null> extends Array<T> implements IModelObject {
|
|
10
|
+
/**
|
|
11
|
+
* Derived arrays from filter, map, slice etc. would otherwise be constructed as
|
|
12
|
+
* new ModelCollection(length), leaving $itemConstructor set to a number
|
|
13
|
+
*/
|
|
14
|
+
static get [Symbol.species](): ArrayConstructor;
|
|
6
15
|
/**
|
|
7
16
|
* Constructor of this class
|
|
8
17
|
* @param itemConstructor Item constructor type that items must derive from
|
|
18
|
+
* @param itemFactory Factory to use for collections whose item class depends on the position, e.g. boards
|
|
9
19
|
*/
|
|
10
20
|
constructor(itemConstructor: {
|
|
11
21
|
new (): T;
|
|
12
|
-
});
|
|
22
|
+
}, itemFactory?: ItemFactory<T> | null);
|
|
13
23
|
/**
|
|
14
24
|
* Overridden push method to perform better type checks
|
|
15
25
|
* @param items Items to add
|
package/dist/ModelCollection.js
CHANGED
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import { isModelObject } from "./ModelObject";
|
|
2
|
+
/**
|
|
3
|
+
* Create the item for a given index. This is deliberately not a method of the collection because
|
|
4
|
+
* a non-public member would make the class nominally typed, which breaks assignability of the
|
|
5
|
+
* reactive proxies consumers wrap the object model in
|
|
6
|
+
* @param collection Collection the item is created for
|
|
7
|
+
* @param index Index the new item is going to be stored at
|
|
8
|
+
* @returns New item
|
|
9
|
+
*/
|
|
10
|
+
function createItem(collection, index) {
|
|
11
|
+
return (collection.$itemFactory !== null) ? collection.$itemFactory(index) : new collection.$itemConstructor();
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* Class for storing model object items in an array
|
|
4
15
|
*/
|
|
5
16
|
export class ModelCollection extends Array {
|
|
17
|
+
/**
|
|
18
|
+
* Derived arrays from filter, map, slice etc. would otherwise be constructed as
|
|
19
|
+
* new ModelCollection(length), leaving $itemConstructor set to a number
|
|
20
|
+
*/
|
|
21
|
+
static get [Symbol.species]() {
|
|
22
|
+
return Array;
|
|
23
|
+
}
|
|
6
24
|
/**
|
|
7
25
|
* Constructor of this class
|
|
8
26
|
* @param itemConstructor Item constructor type that items must derive from
|
|
27
|
+
* @param itemFactory Factory to use for collections whose item class depends on the position, e.g. boards
|
|
9
28
|
*/
|
|
10
|
-
constructor(itemConstructor) {
|
|
29
|
+
constructor(itemConstructor, itemFactory = null) {
|
|
11
30
|
super();
|
|
12
31
|
Object.setPrototypeOf(this, ModelCollection.prototype);
|
|
13
32
|
Object.defineProperty(this, "$itemConstructor", { enumerable: false, value: itemConstructor });
|
|
33
|
+
Object.defineProperty(this, "$itemFactory", { enumerable: false, value: itemFactory });
|
|
14
34
|
}
|
|
15
35
|
// Unfortunately it isn't possible to override index operators in JS/TS
|
|
16
36
|
/**
|
|
@@ -24,7 +44,7 @@ export class ModelCollection extends Array {
|
|
|
24
44
|
super.push(item);
|
|
25
45
|
}
|
|
26
46
|
else {
|
|
27
|
-
const newItem =
|
|
47
|
+
const newItem = createItem(that, this.length);
|
|
28
48
|
super.push(newItem.update(item));
|
|
29
49
|
}
|
|
30
50
|
}
|
|
@@ -55,7 +75,7 @@ export class ModelCollection extends Array {
|
|
|
55
75
|
this[i] = jsonElement[i];
|
|
56
76
|
}
|
|
57
77
|
else {
|
|
58
|
-
const refItem =
|
|
78
|
+
const refItem = createItem(that, i);
|
|
59
79
|
this[i] = refItem.update(newItem, authoritative);
|
|
60
80
|
}
|
|
61
81
|
}
|
|
@@ -79,7 +99,7 @@ export class ModelCollection extends Array {
|
|
|
79
99
|
super.push(itemToAdd);
|
|
80
100
|
}
|
|
81
101
|
else {
|
|
82
|
-
const newItem =
|
|
102
|
+
const newItem = createItem(that, i);
|
|
83
103
|
super.push(newItem.update(itemToAdd, authoritative));
|
|
84
104
|
}
|
|
85
105
|
}
|
package/dist/ObjectModel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ModelCollection from "./ModelCollection";
|
|
2
2
|
import ModelDictionary from "./ModelDictionary";
|
|
3
3
|
import ModelObject from "./ModelObject";
|
|
4
|
-
import Board from "./boards";
|
|
4
|
+
import Board, { getBoard } from "./boards";
|
|
5
5
|
import Directories from "./directories";
|
|
6
6
|
import Fan from "./fans";
|
|
7
7
|
import Heat from "./heat";
|
|
@@ -25,7 +25,7 @@ import LedStrip from "./ledStrips";
|
|
|
25
25
|
export class ObjectModel extends ModelObject {
|
|
26
26
|
constructor() {
|
|
27
27
|
super();
|
|
28
|
-
this.boards = new ModelCollection(Board);
|
|
28
|
+
this.boards = new ModelCollection(Board, getBoard);
|
|
29
29
|
this.directories = new Directories();
|
|
30
30
|
this.fans = new ModelCollection(Fan);
|
|
31
31
|
this.global = new ModelDictionary(false);
|
package/dist/boards/Driver.d.ts
CHANGED
package/dist/boards/Driver.js
CHANGED
|
@@ -27,7 +27,8 @@ export var DriverMode;
|
|
|
27
27
|
DriverMode[DriverMode["spreadCycle"] = 2] = "spreadCycle";
|
|
28
28
|
DriverMode[DriverMode["stealthChop"] = 3] = "stealthChop";
|
|
29
29
|
DriverMode[DriverMode["direct"] = 4] = "direct";
|
|
30
|
-
DriverMode[DriverMode["
|
|
30
|
+
DriverMode[DriverMode["assistedOpen"] = 5] = "assistedOpen";
|
|
31
|
+
DriverMode[DriverMode["unknown"] = 6] = "unknown";
|
|
31
32
|
})(DriverMode || (DriverMode = {}));
|
|
32
33
|
export class DriverConfig extends ModelObject {
|
|
33
34
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IModelObject } from "../../ModelObject";
|
|
2
2
|
import DirectDisplayScreenBase from "./DirectDisplayScreenBase";
|
|
3
3
|
export declare class DirectDisplayScreen extends DirectDisplayScreenBase {
|
|
4
|
-
update(jsonElement: any): IModelObject | null;
|
|
4
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
5
5
|
}
|
|
6
6
|
export default DirectDisplayScreen;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { getDirectDisplayScreen } from ".";
|
|
2
2
|
import DirectDisplayScreenBase from "./DirectDisplayScreenBase";
|
|
3
3
|
export class DirectDisplayScreen extends DirectDisplayScreenBase {
|
|
4
|
-
update(jsonElement) {
|
|
4
|
+
update(jsonElement, authoritative = false) {
|
|
5
5
|
if (jsonElement === null) {
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
8
8
|
if (typeof jsonElement.controller === "string" && jsonElement.controller !== this.controller) {
|
|
9
|
-
return getDirectDisplayScreen(jsonElement.controller).update(jsonElement);
|
|
9
|
+
return getDirectDisplayScreen(jsonElement.controller).update(jsonElement, authoritative);
|
|
10
10
|
}
|
|
11
|
-
return super.update(jsonElement);
|
|
11
|
+
return super.update(jsonElement, authoritative);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export default DirectDisplayScreen;
|
|
@@ -4,6 +4,6 @@ export declare class DirectDisplayScreenST7567 extends DirectDisplayScreenBase {
|
|
|
4
4
|
constructor();
|
|
5
5
|
contrast: number;
|
|
6
6
|
resistorRatio: number;
|
|
7
|
-
update(jsonElement: any): IModelObject | null;
|
|
7
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
8
8
|
}
|
|
9
9
|
export default DirectDisplayScreenST7567;
|
|
@@ -6,14 +6,14 @@ export class DirectDisplayScreenST7567 extends DirectDisplayScreenBase {
|
|
|
6
6
|
this.contrast = 30;
|
|
7
7
|
this.resistorRatio = 6;
|
|
8
8
|
}
|
|
9
|
-
update(jsonElement) {
|
|
9
|
+
update(jsonElement, authoritative = false) {
|
|
10
10
|
if (jsonElement === null) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
13
|
if (typeof jsonElement.controller === "string" && jsonElement.controller !== this.controller) {
|
|
14
|
-
return getDirectDisplayScreen(jsonElement.controller).update(jsonElement);
|
|
14
|
+
return getDirectDisplayScreen(jsonElement.controller).update(jsonElement, authoritative);
|
|
15
15
|
}
|
|
16
|
-
return super.update(jsonElement);
|
|
16
|
+
return super.update(jsonElement, authoritative);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
export default DirectDisplayScreenST7567;
|
package/dist/boards/index.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ import Driver from "./Driver";
|
|
|
5
5
|
export declare class Accelerometer extends ModelObject {
|
|
6
6
|
orientation: number;
|
|
7
7
|
points: number;
|
|
8
|
+
resolution: number;
|
|
8
9
|
runs: number;
|
|
10
|
+
samplingRate: number;
|
|
9
11
|
}
|
|
10
12
|
export declare class BoardClosedLoop extends ModelObject {
|
|
11
13
|
points: number;
|
|
@@ -30,30 +32,43 @@ export declare class Board extends ModelObject {
|
|
|
30
32
|
constructor();
|
|
31
33
|
accelerometer: Accelerometer | null;
|
|
32
34
|
canAddress: number | null;
|
|
33
|
-
closedLoop: BoardClosedLoop | null;
|
|
34
|
-
directDisplay: DirectDisplay | null;
|
|
35
35
|
drivers: ModelCollection<Driver> | null;
|
|
36
36
|
firmwareDate: string;
|
|
37
37
|
firmwareFileName: string;
|
|
38
|
-
firmwareName: string;
|
|
39
38
|
firmwareVersion: string;
|
|
40
39
|
freeRam: number | null;
|
|
41
|
-
iapFileNameSBC: string | null;
|
|
42
|
-
iapFileNameSD: string | null;
|
|
43
|
-
inductiveSensor: InductiveSensor | null;
|
|
44
|
-
maxHeaters: number;
|
|
45
40
|
maxMotors: number;
|
|
46
41
|
mcuTemp: MinMaxCurrent | null;
|
|
47
42
|
name: string;
|
|
48
43
|
shortName: string;
|
|
49
|
-
state: BoardState;
|
|
50
|
-
supportsDirectDisplay: boolean;
|
|
51
|
-
timeout: number;
|
|
52
44
|
uniqueId: string | null;
|
|
53
45
|
v12: MinMaxCurrent | null;
|
|
54
46
|
vIn: MinMaxCurrent | null;
|
|
47
|
+
}
|
|
48
|
+
export declare class MainBoard extends Board {
|
|
49
|
+
constructor();
|
|
50
|
+
directDisplay: DirectDisplay | null;
|
|
51
|
+
firmwareName: string;
|
|
52
|
+
iapFileNameSBC: string | null;
|
|
53
|
+
iapFileNameSD: string | null;
|
|
54
|
+
maxHeaters: number;
|
|
55
|
+
supportsDirectDisplay: boolean;
|
|
55
56
|
wifiFirmwareFileName: string | null;
|
|
56
57
|
}
|
|
58
|
+
export declare class ExpansionBoard extends Board {
|
|
59
|
+
constructor();
|
|
60
|
+
closedLoop: BoardClosedLoop | null;
|
|
61
|
+
inductiveSensor: InductiveSensor | null;
|
|
62
|
+
state: BoardState;
|
|
63
|
+
timeout: number;
|
|
64
|
+
}
|
|
57
65
|
export default Board;
|
|
66
|
+
/**
|
|
67
|
+
* Create the board instance for a given index. The first item is always the mainboard,
|
|
68
|
+
* every other item is an expansion board connected over CAN
|
|
69
|
+
* @param index Index in the boards array
|
|
70
|
+
* @returns New board instance
|
|
71
|
+
*/
|
|
72
|
+
export declare function getBoard(index: number): Board;
|
|
58
73
|
export * from "./directDisplay";
|
|
59
74
|
export * from "./Driver";
|
package/dist/boards/index.js
CHANGED
|
@@ -7,7 +7,9 @@ export class Accelerometer extends ModelObject {
|
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.orientation = 20;
|
|
9
9
|
this.points = 0;
|
|
10
|
+
this.resolution = 0;
|
|
10
11
|
this.runs = 0;
|
|
12
|
+
this.samplingRate = 0;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
export class BoardClosedLoop extends ModelObject {
|
|
@@ -41,39 +43,58 @@ export class Board extends ModelObject {
|
|
|
41
43
|
super();
|
|
42
44
|
this.accelerometer = null;
|
|
43
45
|
this.canAddress = null;
|
|
44
|
-
this.closedLoop = null;
|
|
45
|
-
this.directDisplay = null;
|
|
46
46
|
this.drivers = null;
|
|
47
47
|
this.firmwareDate = "";
|
|
48
48
|
this.firmwareFileName = "";
|
|
49
|
-
this.firmwareName = "";
|
|
50
49
|
this.firmwareVersion = "";
|
|
51
50
|
this.freeRam = null;
|
|
52
|
-
this.iapFileNameSBC = null;
|
|
53
|
-
this.iapFileNameSD = null;
|
|
54
|
-
this.inductiveSensor = null;
|
|
55
|
-
this.maxHeaters = 0;
|
|
56
51
|
this.maxMotors = 0;
|
|
57
52
|
this.mcuTemp = null;
|
|
58
53
|
this.name = "";
|
|
59
54
|
this.shortName = "";
|
|
60
|
-
this.state = BoardState.unknown;
|
|
61
|
-
this.supportsDirectDisplay = false;
|
|
62
|
-
this.timeout = 10;
|
|
63
55
|
this.uniqueId = null;
|
|
64
56
|
this.v12 = null;
|
|
65
57
|
this.vIn = null;
|
|
66
|
-
this.wifiFirmwareFileName = null;
|
|
67
58
|
ModelObject.wrapModelProperty(this, "accelerometer", Accelerometer);
|
|
68
|
-
ModelObject.wrapModelProperty(this, "closedLoop", BoardClosedLoop);
|
|
69
|
-
ModelObject.wrapModelProperty(this, "directDisplay", DirectDisplay);
|
|
70
59
|
ModelObject.wrapModelCollectionProperty(this, "drivers", Driver);
|
|
71
|
-
ModelObject.wrapModelProperty(this, "inductiveSensor", InductiveSensor);
|
|
72
60
|
ModelObject.wrapModelProperty(this, "mcuTemp", MinMaxCurrent);
|
|
73
61
|
ModelObject.wrapModelProperty(this, "v12", MinMaxCurrent);
|
|
74
62
|
ModelObject.wrapModelProperty(this, "vIn", MinMaxCurrent);
|
|
75
63
|
}
|
|
76
64
|
}
|
|
65
|
+
export class MainBoard extends Board {
|
|
66
|
+
constructor() {
|
|
67
|
+
super();
|
|
68
|
+
this.directDisplay = null;
|
|
69
|
+
this.firmwareName = "";
|
|
70
|
+
this.iapFileNameSBC = null;
|
|
71
|
+
this.iapFileNameSD = null;
|
|
72
|
+
this.maxHeaters = 0;
|
|
73
|
+
this.supportsDirectDisplay = false;
|
|
74
|
+
this.wifiFirmwareFileName = null;
|
|
75
|
+
ModelObject.wrapModelProperty(this, "directDisplay", DirectDisplay);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export class ExpansionBoard extends Board {
|
|
79
|
+
constructor() {
|
|
80
|
+
super();
|
|
81
|
+
this.closedLoop = null;
|
|
82
|
+
this.inductiveSensor = null;
|
|
83
|
+
this.state = BoardState.unknown;
|
|
84
|
+
this.timeout = 10;
|
|
85
|
+
ModelObject.wrapModelProperty(this, "closedLoop", BoardClosedLoop);
|
|
86
|
+
ModelObject.wrapModelProperty(this, "inductiveSensor", InductiveSensor);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
77
89
|
export default Board;
|
|
90
|
+
/**
|
|
91
|
+
* Create the board instance for a given index. The first item is always the mainboard,
|
|
92
|
+
* every other item is an expansion board connected over CAN
|
|
93
|
+
* @param index Index in the boards array
|
|
94
|
+
* @returns New board instance
|
|
95
|
+
*/
|
|
96
|
+
export function getBoard(index) {
|
|
97
|
+
return (index === 0) ? new MainBoard() : new ExpansionBoard();
|
|
98
|
+
}
|
|
78
99
|
export * from "./directDisplay";
|
|
79
100
|
export * from "./Driver";
|
package/dist/documentation.json
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
"remarks": "See https://docs.duet3d.com/en/Duet3D_hardware/Accessories/Duet3D_Accelerometer#orientation for a list of orientations"
|
|
10
10
|
},
|
|
11
11
|
"boards[].accelerometer.points": "Number of collected data points in the last run or 0 if it failed",
|
|
12
|
+
"boards[].accelerometer.resolution": "Resolution the accelerometer is programmed for (in bits) or 0 if unknown",
|
|
12
13
|
"boards[].accelerometer.runs": "Number of completed sampling runs",
|
|
14
|
+
"boards[].accelerometer.samplingRate": {
|
|
15
|
+
"summary": "Rate the accelerometer is programmed for (in Hz) or 0 if unknown",
|
|
16
|
+
"remarks": "This is the rate the accelerometer settled on, which may be lower than the one M955 asked for. Once it has completed a run, the rate measured during that run is reported instead"
|
|
17
|
+
},
|
|
13
18
|
"boards[].canAddress": "CAN address of this board or null if not applicable",
|
|
14
19
|
"boards[].closedLoop": "Closed loop data of this board or null if unknown",
|
|
15
20
|
"boards[].closedLoop.points": "Number of collected data points in the last run or 0 if it failed",
|
|
@@ -18,6 +23,7 @@
|
|
|
18
23
|
"boards[].directDisplay.encoder": "Encoder of this screen or null if none",
|
|
19
24
|
"boards[].directDisplay.encoder.pulsesPerClick": "Number of pulses per click of the rotary encoder",
|
|
20
25
|
"boards[].directDisplay.screen": "Screen information",
|
|
26
|
+
"boards[].directDisplay.screen.contrast": "Configured contrast",
|
|
21
27
|
"boards[].directDisplay.screen.controller": {
|
|
22
28
|
"values": {
|
|
23
29
|
"ST7920": "ST7920 controller",
|
|
@@ -25,6 +31,7 @@
|
|
|
25
31
|
"ILI9488": "ILI9488 controller"
|
|
26
32
|
}
|
|
27
33
|
},
|
|
34
|
+
"boards[].directDisplay.screen.resistorRatio": "Configured resistor ratio",
|
|
28
35
|
"boards[].drivers": "Drivers of this board",
|
|
29
36
|
"boards[].drivers[].closedLoop.currentFraction": "Current fraction of the configured motor current used",
|
|
30
37
|
"boards[].drivers[].closedLoop.positionError": "Position error in full steps of the motor",
|
|
@@ -37,7 +44,8 @@
|
|
|
37
44
|
"2": "SpreadCycle",
|
|
38
45
|
"3": "StealthChop (includes stealthChop2)",
|
|
39
46
|
"4": "Field-oriented control (direct)",
|
|
40
|
-
"5": "
|
|
47
|
+
"5": "Assisted open loop",
|
|
48
|
+
"6": "Driver mode is unknown"
|
|
41
49
|
}
|
|
42
50
|
},
|
|
43
51
|
"boards[].firmwareDate": "Date of the firmware build",
|
|
@@ -45,14 +53,8 @@
|
|
|
45
53
|
"boards[].firmwareName": "Name of the firmware build",
|
|
46
54
|
"boards[].firmwareVersion": "Version of the firmware build",
|
|
47
55
|
"boards[].freeRam": "Amount of free RAM on this board (in bytes or null if unknown)",
|
|
48
|
-
"boards[].iapFileNameSBC":
|
|
49
|
-
|
|
50
|
-
"remarks": "This is only available for the mainboard (first board item)"
|
|
51
|
-
},
|
|
52
|
-
"boards[].iapFileNameSD": {
|
|
53
|
-
"summary": "Filename of the IAP binary that is used for updates from the SD card or null if unsupported",
|
|
54
|
-
"remarks": "This is only available for the mainboard (first board item)"
|
|
55
|
-
},
|
|
56
|
+
"boards[].iapFileNameSBC": "Filename of the IAP binary that is used for updates from the SBC or null if unsupported",
|
|
57
|
+
"boards[].iapFileNameSD": "Filename of the IAP binary that is used for updates from the SD card or null if unsupported",
|
|
56
58
|
"boards[].inductiveSensor": "Information about an inductive sensor or null if not present",
|
|
57
59
|
"boards[].maxHeaters": "Maximum number of heaters this board can control",
|
|
58
60
|
"boards[].maxMotors": "Maximum number of motors this board can drive",
|
|
@@ -538,6 +540,14 @@
|
|
|
538
540
|
"move.keepout[].coords[].max": "Maximum axis coordinate",
|
|
539
541
|
"move.keepout[].coords[].min": "Minimum axis coordinate",
|
|
540
542
|
"move.kinematics": "Configured kinematics options",
|
|
543
|
+
"move.kinematics.anchors": "Anchor configurations for A, B, C, Dz",
|
|
544
|
+
"move.kinematics.crosstalk": "Proximal to distal, proximal to Z and distal to Z crosstalk",
|
|
545
|
+
"move.kinematics.deltaRadius": "Delta radius (in mm)",
|
|
546
|
+
"move.kinematics.distalLength": "Distal arm length (in mm)",
|
|
547
|
+
"move.kinematics.forwardMatrix": "Forward matrix",
|
|
548
|
+
"move.kinematics.homedHeight": "Homed height of a delta printer in mm",
|
|
549
|
+
"move.kinematics.inverseMatrix": "Inverse matrix",
|
|
550
|
+
"move.kinematics.minRadius": "Requested minimum radius (in mm)",
|
|
541
551
|
"move.kinematics.name": {
|
|
542
552
|
"summary": "Name of the configured kinematics",
|
|
543
553
|
"values": {
|
|
@@ -547,19 +557,46 @@
|
|
|
547
557
|
"coreXYUV": "CoreXY with extra UV axes",
|
|
548
558
|
"coreXZ": "CoreXZ",
|
|
549
559
|
"markForged": "MarkForged",
|
|
550
|
-
"
|
|
551
|
-
"
|
|
552
|
-
"
|
|
553
|
-
"
|
|
554
|
-
"
|
|
555
|
-
"
|
|
560
|
+
"FiveBarScara": "Five-bar SCARA",
|
|
561
|
+
"Hangprinter": "Hangprinter",
|
|
562
|
+
"delta": "Linear delta",
|
|
563
|
+
"Polar": "Polar",
|
|
564
|
+
"Rotary delta": "Rotary delta",
|
|
565
|
+
"Scara": "SCARA",
|
|
556
566
|
"unknown": "Unknown"
|
|
557
567
|
}
|
|
558
568
|
},
|
|
569
|
+
"move.kinematics.printRadius": "Print radius for Hangprinter and Delta geometries (in mm)",
|
|
570
|
+
"move.kinematics.proximalLength": "Proximal arm length (in mm)",
|
|
571
|
+
"move.kinematics.psiLimits": "Psi limits (in degrees)",
|
|
572
|
+
"move.kinematics.radiusHomed": "Homed radius (in mm)",
|
|
573
|
+
"move.kinematics.radiusMax": "Maximum radius (in mm)",
|
|
574
|
+
"move.kinematics.radiusMin": "Minimum radius (in mm)",
|
|
559
575
|
"move.kinematics.segmentation": "Segmentation parameters or null if not configured",
|
|
560
576
|
"move.kinematics.segmentation.minSegLength": "Minimum length of a segment (in mm)",
|
|
561
577
|
"move.kinematics.segmentation.segmentsPerSec": "Number of segments per second",
|
|
578
|
+
"move.kinematics.thetaLimits": "Theta limits (in degrees)",
|
|
579
|
+
"move.kinematics.tiltCorrection": "Parameters describing the tilt correction",
|
|
580
|
+
"move.kinematics.tiltCorrection.correctionFactor": "Correction factor",
|
|
581
|
+
"move.kinematics.tiltCorrection.lastCorrections": "Last corrections (in mm)",
|
|
582
|
+
"move.kinematics.tiltCorrection.maxCorrection": "Maximum Z correction (in mm)",
|
|
583
|
+
"move.kinematics.tiltCorrection.screwPitch": "Pitch of the Z leadscrews (in mm)",
|
|
584
|
+
"move.kinematics.tiltCorrection.screwX": "X positions of the leadscrews (in mm)",
|
|
585
|
+
"move.kinematics.tiltCorrection.screwY": "Y positions of the leadscrews (in mm)",
|
|
586
|
+
"move.kinematics.towers": "Delta tower properties",
|
|
587
|
+
"move.kinematics.towers[].angleCorrection": "Tower position corrections (in degrees)",
|
|
588
|
+
"move.kinematics.towers[].diagonal": "Diagonal rod length (in mm)",
|
|
589
|
+
"move.kinematics.towers[].endstopAdjustment": "Deviation of the ideal endstop position (in mm)",
|
|
590
|
+
"move.kinematics.towers[].xPos": "X coordinate of this tower (in mm)",
|
|
591
|
+
"move.kinematics.towers[].yPos": "Y coordinate of this tower (in mm)",
|
|
592
|
+
"move.kinematics.ttAccMax": "Maximum turntable acceleration (in mm/s^2)",
|
|
593
|
+
"move.kinematics.ttSpeedMax": "Maximum turntable speed (in mm/s)",
|
|
594
|
+
"move.kinematics.xOffset": "X offset (in mm)",
|
|
595
|
+
"move.kinematics.xTilt": "How much Z needs to be raised for each unit of movement in the +X direction",
|
|
596
|
+
"move.kinematics.yOffset": "Y offset (in mm)",
|
|
597
|
+
"move.kinematics.yTilt": "How much Z needs to be raised for each unit of movement in the +Y direction",
|
|
562
598
|
"move.limitAxes": "Limit axis positions by their minima and maxima",
|
|
599
|
+
"move.minSpeed": "Minimum allowed movement speed (in mm/min)",
|
|
563
600
|
"move.motionSystems": "List of configured motion systems",
|
|
564
601
|
"move.motionSystems[].currentMove": "Information about the current move",
|
|
565
602
|
"move.motionSystems[].currentMove.acceleration": "Acceleration of the current move (in mm/s^2)",
|
|
@@ -876,10 +913,28 @@
|
|
|
876
913
|
"zProbeAsEndstop": "Z-probe acts as an endstop",
|
|
877
914
|
"motorStallAny": "Motor stall detection stops all the drives when triggered",
|
|
878
915
|
"motorStallIndividual": "Motor stall detection stops individual drives when triggered",
|
|
916
|
+
"motorStallEncoder": "Encoder position error stops all the drives when triggered",
|
|
879
917
|
"unknown": "Unknown type"
|
|
880
918
|
}
|
|
881
919
|
},
|
|
882
920
|
"sensors.filamentMonitors": "List of configured filament monitors",
|
|
921
|
+
"sensors.filamentMonitors[].agc": "AGC reading of this filament monitor (null if unknown)",
|
|
922
|
+
"sensors.filamentMonitors[].avgPercentage": "Average ratio of measured vs. commanded movement",
|
|
923
|
+
"sensors.filamentMonitors[].calibrated": "Calibrated properties of this filament monitor",
|
|
924
|
+
"sensors.filamentMonitors[].calibrated.mmPerPulse": "Extruded distance per pulse (in mm)",
|
|
925
|
+
"sensors.filamentMonitors[].calibrated.mmPerRev": "Extruded distance per revolution (in mm)",
|
|
926
|
+
"sensors.filamentMonitors[].calibrated.percentMax": "Maximum percentage (0..1 or greater)",
|
|
927
|
+
"sensors.filamentMonitors[].calibrated.percentMin": "Minimum percentage (0..1)",
|
|
928
|
+
"sensors.filamentMonitors[].calibrated.sensitivity": "Calibrated sensitivity",
|
|
929
|
+
"sensors.filamentMonitors[].calibrated.totalDistance": "Total extruded distance (in mm)",
|
|
930
|
+
"sensors.filamentMonitors[].configured": "Configured properties of this filament monitor",
|
|
931
|
+
"sensors.filamentMonitors[].configured.allMoves": "Whether all moves and not only printing moves are supposed to be checked",
|
|
932
|
+
"sensors.filamentMonitors[].configured.calibrationFactor": "Calibration factor of this sensor",
|
|
933
|
+
"sensors.filamentMonitors[].configured.mmPerPulse": "Extruded distance per pulse (in mm)",
|
|
934
|
+
"sensors.filamentMonitors[].configured.mmPerRev": "Extruded distance per revolution (in mm)",
|
|
935
|
+
"sensors.filamentMonitors[].configured.percentMax": "Maximum percentage (0..1 or greater)",
|
|
936
|
+
"sensors.filamentMonitors[].configured.percentMin": "Minimum percentage (0..1)",
|
|
937
|
+
"sensors.filamentMonitors[].configured.sampleDistance": "Sample distance (in mm)",
|
|
883
938
|
"sensors.filamentMonitors[].enableMode": {
|
|
884
939
|
"summary": "Enable mode of this filament monitor",
|
|
885
940
|
"values": {
|
|
@@ -890,6 +945,10 @@
|
|
|
890
945
|
},
|
|
891
946
|
"sensors.filamentMonitors[].enabled": "Whether this filament monitor is enabled",
|
|
892
947
|
"sensors.filamentMonitors[].filamentPresent": "Indicates if filament is present in this filament monitor (null if unknown)",
|
|
948
|
+
"sensors.filamentMonitors[].lastPercentage": "Last ratio of measured vs. commanded movement",
|
|
949
|
+
"sensors.filamentMonitors[].maxPercentage": "Maximum ratio of measured vs. commanded movement",
|
|
950
|
+
"sensors.filamentMonitors[].minPercentage": "Minimum ratio of measured vs. commanded movement",
|
|
951
|
+
"sensors.filamentMonitors[].position": "Reported sensor position of this filament monitor. The maximum value depends on the type of the sensor, e.g. 0..1023 for a Duet3D MFM.",
|
|
893
952
|
"sensors.filamentMonitors[].status": {
|
|
894
953
|
"summary": "Last reported status of this filament monitor",
|
|
895
954
|
"values": {
|
|
@@ -902,6 +961,7 @@
|
|
|
902
961
|
"sensorError": "Sensor encountered an error"
|
|
903
962
|
}
|
|
904
963
|
},
|
|
964
|
+
"sensors.filamentMonitors[].totalExtrusion": "Total extrusion commanded (in mm)",
|
|
905
965
|
"sensors.filamentMonitors[].type": {
|
|
906
966
|
"summary": "Type of this filament monitor",
|
|
907
967
|
"values": {
|
|
@@ -922,6 +982,11 @@
|
|
|
922
982
|
"sensors.probes[].diveHeights": "Dive heights of the probe (in mm). The first element is the dive height for the first tap; the second element is used for subsequent taps when multi-tapping",
|
|
923
983
|
"sensors.probes[].isCalibrated": "Indicates if the scanning probe is calibrated",
|
|
924
984
|
"sensors.probes[].lastStopHeight": "Height of the probe where it stopped last time (in mm)",
|
|
985
|
+
"sensors.probes[].loadCell": "Load cell parameters (only applicable for load cell probes, otherwise null)",
|
|
986
|
+
"sensors.probes[].loadCell.force": "Force measured by the load cell relative to the last tare (in g)",
|
|
987
|
+
"sensors.probes[].loadCell.gramsPerCount": "Scale of the load cell (in g per count)",
|
|
988
|
+
"sensors.probes[].loadCell.preload": "Preload of the load cell at the last tare (in g)",
|
|
989
|
+
"sensors.probes[].loadCell.preloadWindow": "Safe window for the preload (in g, low and high limit). Two equal values disable the check",
|
|
925
990
|
"sensors.probes[].maxProbeCount": "Maximum number of times to probe after a bad reading was determined",
|
|
926
991
|
"sensors.probes[].measuredHeight": "Measured height (only applicable for scanning probes, in mm or null)",
|
|
927
992
|
"sensors.probes[].offsets": "X+Y offsets (in mm)",
|
|
@@ -952,7 +1017,8 @@
|
|
|
952
1017
|
"8": "A switch that is triggered when the probe is activated (unfiltered)",
|
|
953
1018
|
"9": "A BLTouch probe",
|
|
954
1019
|
"10": "Z motor stall detection",
|
|
955
|
-
"11": "Analog scanning probe"
|
|
1020
|
+
"11": "Analog scanning probe",
|
|
1021
|
+
"12": "Load cell probe measuring the contact force"
|
|
956
1022
|
}
|
|
957
1023
|
},
|
|
958
1024
|
"sensors.probes[].value": "Current analog values of the probe",
|
package/dist/enums.json
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"2",
|
|
11
11
|
"3",
|
|
12
12
|
"4",
|
|
13
|
-
"5"
|
|
13
|
+
"5",
|
|
14
|
+
"6"
|
|
14
15
|
],
|
|
15
16
|
"boards[].state": [
|
|
16
17
|
"unknown",
|
|
@@ -127,12 +128,12 @@
|
|
|
127
128
|
"coreXYUV",
|
|
128
129
|
"coreXZ",
|
|
129
130
|
"markForged",
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
131
|
+
"FiveBarScara",
|
|
132
|
+
"Hangprinter",
|
|
133
|
+
"delta",
|
|
134
|
+
"Polar",
|
|
135
|
+
"Rotary delta",
|
|
136
|
+
"Scara",
|
|
136
137
|
"unknown"
|
|
137
138
|
],
|
|
138
139
|
"move.shaping.type": [
|
|
@@ -241,6 +242,7 @@
|
|
|
241
242
|
"zProbeAsEndstop",
|
|
242
243
|
"motorStallAny",
|
|
243
244
|
"motorStallIndividual",
|
|
245
|
+
"motorStallEncoder",
|
|
244
246
|
"unknown"
|
|
245
247
|
],
|
|
246
248
|
"sensors.filamentMonitors[].enableMode": [
|
|
@@ -276,7 +278,8 @@
|
|
|
276
278
|
"8",
|
|
277
279
|
"9",
|
|
278
280
|
"10",
|
|
279
|
-
"11"
|
|
281
|
+
"11",
|
|
282
|
+
"12"
|
|
280
283
|
],
|
|
281
284
|
"spindles[].state": [
|
|
282
285
|
"unconfigured",
|
package/dist/move/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare class Move extends ModelObject {
|
|
|
43
43
|
readonly keepout: ModelCollection<KeepoutZone | null>;
|
|
44
44
|
kinematics: Kinematics;
|
|
45
45
|
limitAxes: boolean;
|
|
46
|
+
minSpeed: number;
|
|
46
47
|
noMovesBeforeHoming: boolean;
|
|
47
48
|
readonly motionSystems: ModelCollection<MotionSystem>;
|
|
48
49
|
/**
|
package/dist/move/index.js
CHANGED
|
@@ -57,6 +57,7 @@ export class Move extends ModelObject {
|
|
|
57
57
|
this.keepout = new ModelCollection(KeepoutZone);
|
|
58
58
|
this.kinematics = new CoreKinematics(KinematicsName.cartesian);
|
|
59
59
|
this.limitAxes = true;
|
|
60
|
+
this.minSpeed = 30;
|
|
60
61
|
this.noMovesBeforeHoming = true;
|
|
61
62
|
this.motionSystems = new ModelCollection(MotionSystem);
|
|
62
63
|
/**
|
|
@@ -4,6 +4,6 @@ export declare class CoreKinematics extends ZLeadscrewKinematics {
|
|
|
4
4
|
constructor(name: KinematicsName);
|
|
5
5
|
forwardMatrix: Array<Array<number>>;
|
|
6
6
|
inverseMatrix: Array<Array<number>>;
|
|
7
|
-
update(jsonElement: any): IModelObject | null;
|
|
7
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
8
8
|
}
|
|
9
9
|
export default CoreKinematics;
|
|
@@ -14,14 +14,14 @@ export class CoreKinematics extends ZLeadscrewKinematics {
|
|
|
14
14
|
[0, 0, 1]
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
|
-
update(jsonElement) {
|
|
17
|
+
update(jsonElement, authoritative = false) {
|
|
18
18
|
if (jsonElement === null) {
|
|
19
19
|
throw new Error("Kinematics must not be null");
|
|
20
20
|
}
|
|
21
21
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
22
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
22
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
23
23
|
}
|
|
24
|
-
return super.update(jsonElement);
|
|
24
|
+
return super.update(jsonElement, authoritative);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
export default CoreKinematics;
|
|
@@ -16,6 +16,6 @@ export declare class DeltaKinematics extends KinematicsBase {
|
|
|
16
16
|
readonly towers: ModelCollection<DeltaTower>;
|
|
17
17
|
xTilt: number;
|
|
18
18
|
yTilt: number;
|
|
19
|
-
update(jsonElement: any): IModelObject | null;
|
|
19
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
20
20
|
}
|
|
21
21
|
export default DeltaKinematics;
|
|
@@ -22,14 +22,14 @@ export class DeltaKinematics extends KinematicsBase {
|
|
|
22
22
|
this.xTilt = 0;
|
|
23
23
|
this.yTilt = 0;
|
|
24
24
|
}
|
|
25
|
-
update(jsonElement) {
|
|
25
|
+
update(jsonElement, authoritative = false) {
|
|
26
26
|
if (jsonElement === null) {
|
|
27
27
|
throw new Error("Kinematics must not be null");
|
|
28
28
|
}
|
|
29
29
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
30
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
30
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
31
31
|
}
|
|
32
|
-
return super.update(jsonElement);
|
|
32
|
+
return super.update(jsonElement, authoritative);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
export default DeltaKinematics;
|
|
@@ -4,6 +4,6 @@ export declare class HangprinterKinematics extends KinematicsBase {
|
|
|
4
4
|
anchors: Array<Array<number>>;
|
|
5
5
|
printRadius: number;
|
|
6
6
|
constructor();
|
|
7
|
-
update(jsonElement: any): IModelObject | null;
|
|
7
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
8
8
|
}
|
|
9
9
|
export default HangprinterKinematics;
|
|
@@ -11,14 +11,14 @@ export class HangprinterKinematics extends KinematicsBase {
|
|
|
11
11
|
];
|
|
12
12
|
this.printRadius = 1500;
|
|
13
13
|
}
|
|
14
|
-
update(jsonElement) {
|
|
14
|
+
update(jsonElement, authoritative = false) {
|
|
15
15
|
if (jsonElement === null) {
|
|
16
16
|
throw new Error("Kinematics must not be null");
|
|
17
17
|
}
|
|
18
18
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
19
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
19
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
20
20
|
}
|
|
21
|
-
return super.update(jsonElement);
|
|
21
|
+
return super.update(jsonElement, authoritative);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
export default HangprinterKinematics;
|
|
@@ -6,12 +6,12 @@ export declare enum KinematicsName {
|
|
|
6
6
|
coreXYUV = "coreXYUV",
|
|
7
7
|
coreXZ = "coreXZ",
|
|
8
8
|
markForged = "markForged",
|
|
9
|
-
fiveBarScara = "
|
|
10
|
-
hangprinter = "
|
|
11
|
-
linearDelta = "
|
|
12
|
-
polar = "
|
|
13
|
-
rotaryDelta = "
|
|
14
|
-
scara = "
|
|
9
|
+
fiveBarScara = "FiveBarScara",
|
|
10
|
+
hangprinter = "Hangprinter",
|
|
11
|
+
linearDelta = "delta",
|
|
12
|
+
polar = "Polar",
|
|
13
|
+
rotaryDelta = "Rotary delta",
|
|
14
|
+
scara = "Scara",
|
|
15
15
|
unknown = "unknown"
|
|
16
16
|
}
|
|
17
17
|
export declare class MoveSegmentation extends ModelObject {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ModelObject from "../../ModelObject";
|
|
2
|
+
// Values are the spellings reported by RepRapFirmware, which are inconsistently capitalized
|
|
2
3
|
export var KinematicsName;
|
|
3
4
|
(function (KinematicsName) {
|
|
4
5
|
KinematicsName["cartesian"] = "cartesian";
|
|
@@ -7,12 +8,12 @@ export var KinematicsName;
|
|
|
7
8
|
KinematicsName["coreXYUV"] = "coreXYUV";
|
|
8
9
|
KinematicsName["coreXZ"] = "coreXZ";
|
|
9
10
|
KinematicsName["markForged"] = "markForged";
|
|
10
|
-
KinematicsName["fiveBarScara"] = "
|
|
11
|
-
KinematicsName["hangprinter"] = "
|
|
12
|
-
KinematicsName["linearDelta"] = "
|
|
13
|
-
KinematicsName["polar"] = "
|
|
14
|
-
KinematicsName["rotaryDelta"] = "
|
|
15
|
-
KinematicsName["scara"] = "
|
|
11
|
+
KinematicsName["fiveBarScara"] = "FiveBarScara";
|
|
12
|
+
KinematicsName["hangprinter"] = "Hangprinter";
|
|
13
|
+
KinematicsName["linearDelta"] = "delta";
|
|
14
|
+
KinematicsName["polar"] = "Polar";
|
|
15
|
+
KinematicsName["rotaryDelta"] = "Rotary delta";
|
|
16
|
+
KinematicsName["scara"] = "Scara";
|
|
16
17
|
KinematicsName["unknown"] = "unknown";
|
|
17
18
|
})(KinematicsName || (KinematicsName = {}));
|
|
18
19
|
export class MoveSegmentation extends ModelObject {
|
|
@@ -7,6 +7,6 @@ export declare class PolarKinematics extends KinematicsBase {
|
|
|
7
7
|
radiusMin: number;
|
|
8
8
|
ttAccMax: number;
|
|
9
9
|
ttSpeedMax: number;
|
|
10
|
-
update(jsonElement: any): IModelObject | null;
|
|
10
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
11
11
|
}
|
|
12
12
|
export default PolarKinematics;
|
|
@@ -9,14 +9,14 @@ export class PolarKinematics extends KinematicsBase {
|
|
|
9
9
|
this.ttAccMax = 0;
|
|
10
10
|
this.ttSpeedMax = 0;
|
|
11
11
|
}
|
|
12
|
-
update(jsonElement) {
|
|
12
|
+
update(jsonElement, authoritative = false) {
|
|
13
13
|
if (jsonElement === null) {
|
|
14
14
|
throw new Error("Kinematics must not be null");
|
|
15
15
|
}
|
|
16
16
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
17
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
17
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
18
18
|
}
|
|
19
|
-
return super.update(jsonElement);
|
|
19
|
+
return super.update(jsonElement, authoritative);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
export default PolarKinematics;
|
|
@@ -9,6 +9,6 @@ export declare class ScaraKinematics extends ZLeadscrewKinematics {
|
|
|
9
9
|
thetaLimits: number[];
|
|
10
10
|
xOffset: number;
|
|
11
11
|
yOffset: number;
|
|
12
|
-
update(jsonElement: any): IModelObject | null;
|
|
12
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
13
13
|
}
|
|
14
14
|
export default ScaraKinematics;
|
|
@@ -12,14 +12,14 @@ export class ScaraKinematics extends ZLeadscrewKinematics {
|
|
|
12
12
|
this.xOffset = 0;
|
|
13
13
|
this.yOffset = 0;
|
|
14
14
|
}
|
|
15
|
-
update(jsonElement) {
|
|
15
|
+
update(jsonElement, authoritative = false) {
|
|
16
16
|
if (jsonElement === null) {
|
|
17
17
|
throw new Error("Kinematics must not be null");
|
|
18
18
|
}
|
|
19
19
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
20
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
20
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
21
21
|
}
|
|
22
|
-
return super.update(jsonElement);
|
|
22
|
+
return super.update(jsonElement, authoritative);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
export default ScaraKinematics;
|
|
@@ -2,7 +2,7 @@ import type { IModelObject } from "../../ModelObject";
|
|
|
2
2
|
import KinematicsBase, { KinematicsName } from "./KinematicsBase";
|
|
3
3
|
export declare class Kinematics extends KinematicsBase {
|
|
4
4
|
constructor(name?: KinematicsName);
|
|
5
|
-
update(jsonElement: any): IModelObject | null;
|
|
5
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
6
6
|
}
|
|
7
7
|
export default Kinematics;
|
|
8
8
|
export declare function getKinematics(name: KinematicsName): KinematicsBase;
|
|
@@ -8,14 +8,14 @@ export class Kinematics extends KinematicsBase {
|
|
|
8
8
|
constructor(name = KinematicsName.cartesian) {
|
|
9
9
|
super(name);
|
|
10
10
|
}
|
|
11
|
-
update(jsonElement) {
|
|
11
|
+
update(jsonElement, authoritative = false) {
|
|
12
12
|
if (jsonElement === null) {
|
|
13
13
|
throw new Error("Kinematics must not be null");
|
|
14
14
|
}
|
|
15
15
|
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
16
|
-
return getKinematics(jsonElement.name).update(jsonElement);
|
|
16
|
+
return getKinematics(jsonElement.name).update(jsonElement, authoritative);
|
|
17
17
|
}
|
|
18
|
-
return super.update(jsonElement);
|
|
18
|
+
return super.update(jsonElement, authoritative);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
export default Kinematics;
|
|
@@ -64,6 +64,6 @@ export declare class PluginManifest extends ModelObject {
|
|
|
64
64
|
rrfVersion: string | null;
|
|
65
65
|
data: Map<string, any>;
|
|
66
66
|
static checkVersion(actual: string, required: string): boolean;
|
|
67
|
-
update(jsonElement: any): IModelObject | null;
|
|
67
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
68
68
|
}
|
|
69
69
|
export default PluginManifest;
|
|
@@ -109,14 +109,14 @@ export class PluginManifest extends ModelObject {
|
|
|
109
109
|
}
|
|
110
110
|
return true;
|
|
111
111
|
}
|
|
112
|
-
update(jsonElement) {
|
|
112
|
+
update(jsonElement, authoritative = false) {
|
|
113
113
|
if (typeof jsonElement.data === "object") {
|
|
114
114
|
for (const key in jsonElement.data) {
|
|
115
115
|
this.data.set(key, jsonElement.data[key]);
|
|
116
116
|
}
|
|
117
117
|
delete jsonElement.data;
|
|
118
118
|
}
|
|
119
|
-
return super.update(jsonElement);
|
|
119
|
+
return super.update(jsonElement, authoritative);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
export default PluginManifest;
|
|
@@ -4,6 +4,7 @@ export declare enum EndstopType {
|
|
|
4
4
|
ZProbeAsEndstop = "zProbeAsEndstop",
|
|
5
5
|
motorStallAny = "motorStallAny",
|
|
6
6
|
motorStallIndividual = "motorStallIndividual",
|
|
7
|
+
motorStallEncoder = "motorStallEncoder",
|
|
7
8
|
unknown = "unknown"
|
|
8
9
|
}
|
|
9
10
|
export declare class Endstop extends ModelObject {
|
package/dist/sensors/Endstop.js
CHANGED
|
@@ -5,6 +5,7 @@ export var EndstopType;
|
|
|
5
5
|
EndstopType["ZProbeAsEndstop"] = "zProbeAsEndstop";
|
|
6
6
|
EndstopType["motorStallAny"] = "motorStallAny";
|
|
7
7
|
EndstopType["motorStallIndividual"] = "motorStallIndividual";
|
|
8
|
+
EndstopType["motorStallEncoder"] = "motorStallEncoder";
|
|
8
9
|
EndstopType["unknown"] = "unknown";
|
|
9
10
|
})(EndstopType || (EndstopType = {}));
|
|
10
11
|
export class Endstop extends ModelObject {
|
|
@@ -18,6 +18,6 @@ export declare class LaserFilamentMonitor extends Duet3DFilamentMonitor {
|
|
|
18
18
|
constructor();
|
|
19
19
|
calibrated: LaserFilamentMonitorCalibrated | null;
|
|
20
20
|
readonly configured: LaserFilamentMonitorConfigured;
|
|
21
|
-
update(jsonElement: any): IModelObject | null;
|
|
21
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
22
22
|
}
|
|
23
23
|
export default LaserFilamentMonitor;
|
|
@@ -28,14 +28,14 @@ export class LaserFilamentMonitor extends Duet3DFilamentMonitor {
|
|
|
28
28
|
this.configured = new LaserFilamentMonitorConfigured();
|
|
29
29
|
ModelObject.wrapModelProperty(this, "calibrated", LaserFilamentMonitorCalibrated);
|
|
30
30
|
}
|
|
31
|
-
update(jsonElement) {
|
|
31
|
+
update(jsonElement, authoritative = false) {
|
|
32
32
|
if (jsonElement === null) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
35
|
if (typeof jsonElement.type === "string" && jsonElement.type !== this.type) {
|
|
36
|
-
return getFilamentMonitor(jsonElement.type).update(jsonElement);
|
|
36
|
+
return getFilamentMonitor(jsonElement.type).update(jsonElement, authoritative);
|
|
37
37
|
}
|
|
38
|
-
return super.update(jsonElement);
|
|
38
|
+
return super.update(jsonElement, authoritative);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
export default LaserFilamentMonitor;
|
|
@@ -18,6 +18,6 @@ export declare class PulsedFilamentMonitor extends FilamentMonitorBase {
|
|
|
18
18
|
calibrated: PulsedFilamentMonitorCalibrated | null;
|
|
19
19
|
readonly configured: PulsedFilamentMonitorConfigured;
|
|
20
20
|
position: number;
|
|
21
|
-
update(jsonElement: any): IModelObject | null;
|
|
21
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
22
22
|
}
|
|
23
23
|
export default PulsedFilamentMonitor;
|
|
@@ -27,14 +27,14 @@ export class PulsedFilamentMonitor extends FilamentMonitorBase {
|
|
|
27
27
|
this.position = 0;
|
|
28
28
|
ModelObject.wrapModelProperty(this, "calibrated", PulsedFilamentMonitorCalibrated);
|
|
29
29
|
}
|
|
30
|
-
update(jsonElement) {
|
|
30
|
+
update(jsonElement, authoritative = false) {
|
|
31
31
|
if (jsonElement === null) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
if (typeof jsonElement.type === "string" && jsonElement.type !== this.type) {
|
|
35
|
-
return getFilamentMonitor(jsonElement.type).update(jsonElement);
|
|
35
|
+
return getFilamentMonitor(jsonElement.type).update(jsonElement, authoritative);
|
|
36
36
|
}
|
|
37
|
-
return super.update(jsonElement);
|
|
37
|
+
return super.update(jsonElement, authoritative);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
export default PulsedFilamentMonitor;
|
|
@@ -19,6 +19,6 @@ export declare class RotatingMagnetFilamentMonitor extends Duet3DFilamentMonitor
|
|
|
19
19
|
agc: number | null;
|
|
20
20
|
calibrated: RotatingMagnetFilamentMonitorCalibrated | null;
|
|
21
21
|
readonly configured: RotatingMagnetFilamentMonitorConfigured;
|
|
22
|
-
update(jsonElement: any): IModelObject | null;
|
|
22
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
23
23
|
}
|
|
24
24
|
export default RotatingMagnetFilamentMonitor;
|
|
@@ -29,14 +29,14 @@ export class RotatingMagnetFilamentMonitor extends Duet3DFilamentMonitor {
|
|
|
29
29
|
this.configured = new RotatingMagnetFilamentMonitorConfigured();
|
|
30
30
|
ModelObject.wrapModelProperty(this, "calibrated", RotatingMagnetFilamentMonitorCalibrated);
|
|
31
31
|
}
|
|
32
|
-
update(jsonElement) {
|
|
32
|
+
update(jsonElement, authoritative = false) {
|
|
33
33
|
if (jsonElement === null) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
if (typeof jsonElement.type === "string" && jsonElement.type !== this.type) {
|
|
37
|
-
return getFilamentMonitor(jsonElement.type).update(jsonElement);
|
|
37
|
+
return getFilamentMonitor(jsonElement.type).update(jsonElement, authoritative);
|
|
38
38
|
}
|
|
39
|
-
return super.update(jsonElement);
|
|
39
|
+
return super.update(jsonElement, authoritative);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
export default RotatingMagnetFilamentMonitor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IModelObject } from "../../ModelObject";
|
|
2
2
|
import FilamentMonitorBase, { FilamentMonitorType } from "./FilamentMonitorBase";
|
|
3
3
|
export declare class FilamentMonitor extends FilamentMonitorBase {
|
|
4
|
-
update(jsonElement: any): IModelObject | null;
|
|
4
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
5
5
|
}
|
|
6
6
|
export default FilamentMonitor;
|
|
7
7
|
export declare function getFilamentMonitor(type: FilamentMonitorType): FilamentMonitorBase;
|
|
@@ -3,14 +3,14 @@ import LaserFilamentMonitor from "./LaserFilamentMonitor";
|
|
|
3
3
|
import PulsedFilamentMonitor from "./PulsedFilamentMonitor";
|
|
4
4
|
import RotatingMagnetFilamentMonitor from "./RotatingMagnetFilamentMonitor";
|
|
5
5
|
export class FilamentMonitor extends FilamentMonitorBase {
|
|
6
|
-
update(jsonElement) {
|
|
6
|
+
update(jsonElement, authoritative = false) {
|
|
7
7
|
if (jsonElement === null) {
|
|
8
8
|
return null;
|
|
9
9
|
}
|
|
10
10
|
if (typeof jsonElement.type === "string" && jsonElement.type !== this.type) {
|
|
11
|
-
return getFilamentMonitor(jsonElement.type).update(jsonElement);
|
|
11
|
+
return getFilamentMonitor(jsonElement.type).update(jsonElement, authoritative);
|
|
12
12
|
}
|
|
13
|
-
return super.update(jsonElement);
|
|
13
|
+
return super.update(jsonElement, authoritative);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export default FilamentMonitor;
|
package/dist/sensors/Probe.d.ts
CHANGED
|
@@ -11,7 +11,14 @@ export declare enum ProbeType {
|
|
|
11
11
|
unfilteredDigital = 8,
|
|
12
12
|
blTouch = 9,
|
|
13
13
|
zMotorStall = 10,
|
|
14
|
-
scanningAnalog = 11
|
|
14
|
+
scanningAnalog = 11,
|
|
15
|
+
loadCell = 12
|
|
16
|
+
}
|
|
17
|
+
export declare class ProbeLoadCell extends ModelObject {
|
|
18
|
+
force: number;
|
|
19
|
+
gramsPerCount: number;
|
|
20
|
+
preload: number;
|
|
21
|
+
preloadWindow: Array<number>;
|
|
15
22
|
}
|
|
16
23
|
export declare class ProbeTouchMode extends ModelObject {
|
|
17
24
|
active: boolean;
|
|
@@ -31,6 +38,7 @@ export declare class Probe extends ModelObject {
|
|
|
31
38
|
diveHeights: Array<number>;
|
|
32
39
|
isCalibrated: boolean | null;
|
|
33
40
|
lastStopHeight: number;
|
|
41
|
+
loadCell: ProbeLoadCell | null;
|
|
34
42
|
maxProbeCount: number;
|
|
35
43
|
measuredHeight: number | null;
|
|
36
44
|
offsets: Array<number>;
|
package/dist/sensors/Probe.js
CHANGED
|
@@ -13,7 +13,17 @@ export var ProbeType;
|
|
|
13
13
|
ProbeType[ProbeType["blTouch"] = 9] = "blTouch";
|
|
14
14
|
ProbeType[ProbeType["zMotorStall"] = 10] = "zMotorStall";
|
|
15
15
|
ProbeType[ProbeType["scanningAnalog"] = 11] = "scanningAnalog";
|
|
16
|
+
ProbeType[ProbeType["loadCell"] = 12] = "loadCell";
|
|
16
17
|
})(ProbeType || (ProbeType = {}));
|
|
18
|
+
export class ProbeLoadCell extends ModelObject {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.force = 0;
|
|
22
|
+
this.gramsPerCount = 0;
|
|
23
|
+
this.preload = 0;
|
|
24
|
+
this.preloadWindow = [0, 0];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
17
27
|
export class ProbeTouchMode extends ModelObject {
|
|
18
28
|
constructor() {
|
|
19
29
|
super(...arguments);
|
|
@@ -36,6 +46,7 @@ export class Probe extends ModelObject {
|
|
|
36
46
|
this.diveHeights = [0, 0];
|
|
37
47
|
this.isCalibrated = null;
|
|
38
48
|
this.lastStopHeight = 0;
|
|
49
|
+
this.loadCell = null;
|
|
39
50
|
this.maxProbeCount = 1;
|
|
40
51
|
this.measuredHeight = null;
|
|
41
52
|
this.offsets = [0, 0];
|
|
@@ -50,6 +61,7 @@ export class Probe extends ModelObject {
|
|
|
50
61
|
this.triggerHeight = 0.7;
|
|
51
62
|
this.type = ProbeType.none;
|
|
52
63
|
this.value = [];
|
|
64
|
+
ModelObject.wrapModelProperty(this, "loadCell", ProbeLoadCell);
|
|
53
65
|
ModelObject.wrapModelProperty(this, "touchMode", ProbeTouchMode);
|
|
54
66
|
}
|
|
55
67
|
}
|
|
@@ -22,6 +22,6 @@ export declare class MessageBox extends ModelObject {
|
|
|
22
22
|
seq: number;
|
|
23
23
|
timeout: number;
|
|
24
24
|
title: string;
|
|
25
|
-
update(jsonElement: any): IModelObject | null;
|
|
25
|
+
update(jsonElement: any, authoritative?: boolean): IModelObject | null;
|
|
26
26
|
}
|
|
27
27
|
export default MessageBox;
|
package/dist/state/MessageBox.js
CHANGED
|
@@ -25,11 +25,11 @@ export class MessageBox extends ModelObject {
|
|
|
25
25
|
this.timeout = 0;
|
|
26
26
|
this.title = "";
|
|
27
27
|
}
|
|
28
|
-
update(jsonElement) {
|
|
28
|
+
update(jsonElement, authoritative = false) {
|
|
29
29
|
if (jsonElement instanceof Object && (typeof jsonElement.default === "number" || typeof jsonElement.default === "string")) {
|
|
30
30
|
this.default = jsonElement.default;
|
|
31
31
|
}
|
|
32
|
-
return super.update(jsonElement);
|
|
32
|
+
return super.update(jsonElement, authoritative);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
export default MessageBox;
|