@duet3d/objectmodel 3.7.0-beta.9 → 3.7.0-rc.1

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.
Files changed (42) hide show
  1. package/dist/ModelCollection.d.ts +11 -1
  2. package/dist/ModelCollection.js +24 -4
  3. package/dist/ObjectModel.js +2 -2
  4. package/dist/boards/directDisplay/DirectDisplayScreen.d.ts +1 -1
  5. package/dist/boards/directDisplay/DirectDisplayScreen.js +3 -3
  6. package/dist/boards/directDisplay/DirectDisplayScreenST7567.d.ts +1 -1
  7. package/dist/boards/directDisplay/DirectDisplayScreenST7567.js +3 -3
  8. package/dist/boards/index.d.ts +25 -10
  9. package/dist/boards/index.js +35 -14
  10. package/dist/documentation.json +79 -15
  11. package/dist/enums.json +8 -7
  12. package/dist/move/index.d.ts +1 -0
  13. package/dist/move/index.js +1 -0
  14. package/dist/move/kinematics/CoreKinematics.d.ts +1 -1
  15. package/dist/move/kinematics/CoreKinematics.js +3 -3
  16. package/dist/move/kinematics/DeltaKinematics.d.ts +1 -1
  17. package/dist/move/kinematics/DeltaKinematics.js +3 -3
  18. package/dist/move/kinematics/HangprinterKinematics.d.ts +1 -1
  19. package/dist/move/kinematics/HangprinterKinematics.js +3 -3
  20. package/dist/move/kinematics/KinematicsBase.d.ts +6 -6
  21. package/dist/move/kinematics/KinematicsBase.js +7 -6
  22. package/dist/move/kinematics/PolarKinematics.d.ts +1 -1
  23. package/dist/move/kinematics/PolarKinematics.js +3 -3
  24. package/dist/move/kinematics/ScaraKinematics.d.ts +1 -1
  25. package/dist/move/kinematics/ScaraKinematics.js +3 -3
  26. package/dist/move/kinematics/index.d.ts +1 -1
  27. package/dist/move/kinematics/index.js +3 -3
  28. package/dist/plugins/PluginManifest.d.ts +1 -1
  29. package/dist/plugins/PluginManifest.js +2 -2
  30. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +1 -1
  31. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +3 -3
  32. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +1 -1
  33. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +3 -3
  34. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +1 -1
  35. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +3 -3
  36. package/dist/sensors/FilamentMonitors/index.d.ts +1 -1
  37. package/dist/sensors/FilamentMonitors/index.js +3 -3
  38. package/dist/sensors/Probe.d.ts +9 -1
  39. package/dist/sensors/Probe.js +12 -0
  40. package/dist/state/MessageBox.d.ts +1 -1
  41. package/dist/state/MessageBox.js +2 -2
  42. 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
@@ -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 = new that.$itemConstructor();
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 = new that.$itemConstructor();
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 = new that.$itemConstructor();
102
+ const newItem = createItem(that, i);
83
103
  super.push(newItem.update(itemToAdd, authoritative));
84
104
  }
85
105
  }
@@ -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);
@@ -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;
@@ -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";
@@ -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";
@@ -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",
@@ -45,14 +52,8 @@
45
52
  "boards[].firmwareName": "Name of the firmware build",
46
53
  "boards[].firmwareVersion": "Version of the firmware build",
47
54
  "boards[].freeRam": "Amount of free RAM on this board (in bytes or null if unknown)",
48
- "boards[].iapFileNameSBC": {
49
- "summary": "Filename of the IAP binary that is used for updates from the SBC or null if unsupported",
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
- },
55
+ "boards[].iapFileNameSBC": "Filename of the IAP binary that is used for updates from the SBC or null if unsupported",
56
+ "boards[].iapFileNameSD": "Filename of the IAP binary that is used for updates from the SD card or null if unsupported",
56
57
  "boards[].inductiveSensor": "Information about an inductive sensor or null if not present",
57
58
  "boards[].maxHeaters": "Maximum number of heaters this board can control",
58
59
  "boards[].maxMotors": "Maximum number of motors this board can drive",
@@ -538,6 +539,14 @@
538
539
  "move.keepout[].coords[].max": "Maximum axis coordinate",
539
540
  "move.keepout[].coords[].min": "Minimum axis coordinate",
540
541
  "move.kinematics": "Configured kinematics options",
542
+ "move.kinematics.anchors": "Anchor configurations for A, B, C, Dz",
543
+ "move.kinematics.crosstalk": "Proximal to distal, proximal to Z and distal to Z crosstalk",
544
+ "move.kinematics.deltaRadius": "Delta radius (in mm)",
545
+ "move.kinematics.distalLength": "Distal arm length (in mm)",
546
+ "move.kinematics.forwardMatrix": "Forward matrix",
547
+ "move.kinematics.homedHeight": "Homed height of a delta printer in mm",
548
+ "move.kinematics.inverseMatrix": "Inverse matrix",
549
+ "move.kinematics.minRadius": "Requested minimum radius (in mm)",
541
550
  "move.kinematics.name": {
542
551
  "summary": "Name of the configured kinematics",
543
552
  "values": {
@@ -547,19 +556,46 @@
547
556
  "coreXYUV": "CoreXY with extra UV axes",
548
557
  "coreXZ": "CoreXZ",
549
558
  "markForged": "MarkForged",
550
- "fiveBarScara": "Five-bar SCARA",
551
- "hangprinter": "Hangprinter",
552
- "linearDelta": "Linear delta",
553
- "polar": "Polar",
554
- "rotaryDelta": "Rotary delta",
555
- "scara": "SCARA",
559
+ "FiveBarScara": "Five-bar SCARA",
560
+ "Hangprinter": "Hangprinter",
561
+ "delta": "Linear delta",
562
+ "Polar": "Polar",
563
+ "Rotary delta": "Rotary delta",
564
+ "Scara": "SCARA",
556
565
  "unknown": "Unknown"
557
566
  }
558
567
  },
568
+ "move.kinematics.printRadius": "Print radius for Hangprinter and Delta geometries (in mm)",
569
+ "move.kinematics.proximalLength": "Proximal arm length (in mm)",
570
+ "move.kinematics.psiLimits": "Psi limits (in degrees)",
571
+ "move.kinematics.radiusHomed": "Homed radius (in mm)",
572
+ "move.kinematics.radiusMax": "Maximum radius (in mm)",
573
+ "move.kinematics.radiusMin": "Minimum radius (in mm)",
559
574
  "move.kinematics.segmentation": "Segmentation parameters or null if not configured",
560
575
  "move.kinematics.segmentation.minSegLength": "Minimum length of a segment (in mm)",
561
576
  "move.kinematics.segmentation.segmentsPerSec": "Number of segments per second",
577
+ "move.kinematics.thetaLimits": "Theta limits (in degrees)",
578
+ "move.kinematics.tiltCorrection": "Parameters describing the tilt correction",
579
+ "move.kinematics.tiltCorrection.correctionFactor": "Correction factor",
580
+ "move.kinematics.tiltCorrection.lastCorrections": "Last corrections (in mm)",
581
+ "move.kinematics.tiltCorrection.maxCorrection": "Maximum Z correction (in mm)",
582
+ "move.kinematics.tiltCorrection.screwPitch": "Pitch of the Z leadscrews (in mm)",
583
+ "move.kinematics.tiltCorrection.screwX": "X positions of the leadscrews (in mm)",
584
+ "move.kinematics.tiltCorrection.screwY": "Y positions of the leadscrews (in mm)",
585
+ "move.kinematics.towers": "Delta tower properties",
586
+ "move.kinematics.towers[].angleCorrection": "Tower position corrections (in degrees)",
587
+ "move.kinematics.towers[].diagonal": "Diagonal rod length (in mm)",
588
+ "move.kinematics.towers[].endstopAdjustment": "Deviation of the ideal endstop position (in mm)",
589
+ "move.kinematics.towers[].xPos": "X coordinate of this tower (in mm)",
590
+ "move.kinematics.towers[].yPos": "Y coordinate of this tower (in mm)",
591
+ "move.kinematics.ttAccMax": "Maximum turntable acceleration (in mm/s^2)",
592
+ "move.kinematics.ttSpeedMax": "Maximum turntable speed (in mm/s)",
593
+ "move.kinematics.xOffset": "X offset (in mm)",
594
+ "move.kinematics.xTilt": "How much Z needs to be raised for each unit of movement in the +X direction",
595
+ "move.kinematics.yOffset": "Y offset (in mm)",
596
+ "move.kinematics.yTilt": "How much Z needs to be raised for each unit of movement in the +Y direction",
562
597
  "move.limitAxes": "Limit axis positions by their minima and maxima",
598
+ "move.minSpeed": "Minimum allowed movement speed (in mm/min)",
563
599
  "move.motionSystems": "List of configured motion systems",
564
600
  "move.motionSystems[].currentMove": "Information about the current move",
565
601
  "move.motionSystems[].currentMove.acceleration": "Acceleration of the current move (in mm/s^2)",
@@ -880,6 +916,23 @@
880
916
  }
881
917
  },
882
918
  "sensors.filamentMonitors": "List of configured filament monitors",
919
+ "sensors.filamentMonitors[].agc": "AGC reading of this filament monitor (null if unknown)",
920
+ "sensors.filamentMonitors[].avgPercentage": "Average ratio of measured vs. commanded movement",
921
+ "sensors.filamentMonitors[].calibrated": "Calibrated properties of this filament monitor",
922
+ "sensors.filamentMonitors[].calibrated.mmPerPulse": "Extruded distance per pulse (in mm)",
923
+ "sensors.filamentMonitors[].calibrated.mmPerRev": "Extruded distance per revolution (in mm)",
924
+ "sensors.filamentMonitors[].calibrated.percentMax": "Maximum percentage (0..1 or greater)",
925
+ "sensors.filamentMonitors[].calibrated.percentMin": "Minimum percentage (0..1)",
926
+ "sensors.filamentMonitors[].calibrated.sensitivity": "Calibrated sensitivity",
927
+ "sensors.filamentMonitors[].calibrated.totalDistance": "Total extruded distance (in mm)",
928
+ "sensors.filamentMonitors[].configured": "Configured properties of this filament monitor",
929
+ "sensors.filamentMonitors[].configured.allMoves": "Whether all moves and not only printing moves are supposed to be checked",
930
+ "sensors.filamentMonitors[].configured.calibrationFactor": "Calibration factor of this sensor",
931
+ "sensors.filamentMonitors[].configured.mmPerPulse": "Extruded distance per pulse (in mm)",
932
+ "sensors.filamentMonitors[].configured.mmPerRev": "Extruded distance per revolution (in mm)",
933
+ "sensors.filamentMonitors[].configured.percentMax": "Maximum percentage (0..1 or greater)",
934
+ "sensors.filamentMonitors[].configured.percentMin": "Minimum percentage (0..1)",
935
+ "sensors.filamentMonitors[].configured.sampleDistance": "Sample distance (in mm)",
883
936
  "sensors.filamentMonitors[].enableMode": {
884
937
  "summary": "Enable mode of this filament monitor",
885
938
  "values": {
@@ -890,6 +943,10 @@
890
943
  },
891
944
  "sensors.filamentMonitors[].enabled": "Whether this filament monitor is enabled",
892
945
  "sensors.filamentMonitors[].filamentPresent": "Indicates if filament is present in this filament monitor (null if unknown)",
946
+ "sensors.filamentMonitors[].lastPercentage": "Last ratio of measured vs. commanded movement",
947
+ "sensors.filamentMonitors[].maxPercentage": "Maximum ratio of measured vs. commanded movement",
948
+ "sensors.filamentMonitors[].minPercentage": "Minimum ratio of measured vs. commanded movement",
949
+ "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
950
  "sensors.filamentMonitors[].status": {
894
951
  "summary": "Last reported status of this filament monitor",
895
952
  "values": {
@@ -902,6 +959,7 @@
902
959
  "sensorError": "Sensor encountered an error"
903
960
  }
904
961
  },
962
+ "sensors.filamentMonitors[].totalExtrusion": "Total extrusion commanded (in mm)",
905
963
  "sensors.filamentMonitors[].type": {
906
964
  "summary": "Type of this filament monitor",
907
965
  "values": {
@@ -922,6 +980,11 @@
922
980
  "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
981
  "sensors.probes[].isCalibrated": "Indicates if the scanning probe is calibrated",
924
982
  "sensors.probes[].lastStopHeight": "Height of the probe where it stopped last time (in mm)",
983
+ "sensors.probes[].loadCell": "Load cell parameters (only applicable for load cell probes, otherwise null)",
984
+ "sensors.probes[].loadCell.force": "Force measured by the load cell relative to the last tare (in g)",
985
+ "sensors.probes[].loadCell.gramsPerCount": "Scale of the load cell (in g per count)",
986
+ "sensors.probes[].loadCell.preload": "Preload of the load cell at the last tare (in g)",
987
+ "sensors.probes[].loadCell.preloadWindow": "Safe window for the preload (in g, low and high limit). Two equal values disable the check",
925
988
  "sensors.probes[].maxProbeCount": "Maximum number of times to probe after a bad reading was determined",
926
989
  "sensors.probes[].measuredHeight": "Measured height (only applicable for scanning probes, in mm or null)",
927
990
  "sensors.probes[].offsets": "X+Y offsets (in mm)",
@@ -952,7 +1015,8 @@
952
1015
  "8": "A switch that is triggered when the probe is activated (unfiltered)",
953
1016
  "9": "A BLTouch probe",
954
1017
  "10": "Z motor stall detection",
955
- "11": "Analog scanning probe"
1018
+ "11": "Analog scanning probe",
1019
+ "12": "Load cell probe measuring the contact force"
956
1020
  }
957
1021
  },
958
1022
  "sensors.probes[].value": "Current analog values of the probe",
package/dist/enums.json CHANGED
@@ -127,12 +127,12 @@
127
127
  "coreXYUV",
128
128
  "coreXZ",
129
129
  "markForged",
130
- "fiveBarScara",
131
- "hangprinter",
132
- "linearDelta",
133
- "polar",
134
- "rotaryDelta",
135
- "scara",
130
+ "FiveBarScara",
131
+ "Hangprinter",
132
+ "delta",
133
+ "Polar",
134
+ "Rotary delta",
135
+ "Scara",
136
136
  "unknown"
137
137
  ],
138
138
  "move.shaping.type": [
@@ -276,7 +276,8 @@
276
276
  "8",
277
277
  "9",
278
278
  "10",
279
- "11"
279
+ "11",
280
+ "12"
280
281
  ],
281
282
  "spindles[].state": [
282
283
  "unconfigured",
@@ -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
  /**
@@ -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 = "fiveBarScara",
10
- hangprinter = "hangprinter",
11
- linearDelta = "linearDelta",
12
- polar = "polar",
13
- rotaryDelta = "rotaryDelta",
14
- scara = "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"] = "fiveBarScara";
11
- KinematicsName["hangprinter"] = "hangprinter";
12
- KinematicsName["linearDelta"] = "linearDelta";
13
- KinematicsName["polar"] = "polar";
14
- KinematicsName["rotaryDelta"] = "rotaryDelta";
15
- KinematicsName["scara"] = "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;
@@ -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;
@@ -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>;
@@ -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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/objectmodel",
3
- "version": "3.7.0-beta.9",
3
+ "version": "3.7.0-rc.1",
4
4
  "description": "TypeScript implementation of the Duet3D Object Model",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",