@duet3d/objectmodel 3.7.0-beta.1 → 3.7.0-beta.11

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 (52) hide show
  1. package/README.md +1 -7
  2. package/dist/ModelCollection.d.ts +8 -2
  3. package/dist/ModelCollection.js +25 -12
  4. package/dist/ModelDictionary.d.ts +4 -2
  5. package/dist/ModelDictionary.js +8 -6
  6. package/dist/ModelObject.d.ts +13 -2
  7. package/dist/ModelObject.js +50 -5
  8. package/dist/ObjectModel.d.ts +5 -0
  9. package/dist/ObjectModel.js +7 -2
  10. package/dist/boards/directDisplay/DirectDisplayScreen.d.ts +1 -1
  11. package/dist/boards/directDisplay/DirectDisplayScreen.js +3 -3
  12. package/dist/boards/directDisplay/DirectDisplayScreenST7567.d.ts +1 -1
  13. package/dist/boards/directDisplay/DirectDisplayScreenST7567.js +3 -3
  14. package/dist/boards/index.d.ts +23 -9
  15. package/dist/boards/index.js +33 -13
  16. package/dist/documentation.json +66 -18
  17. package/dist/index.d.ts +0 -1
  18. package/dist/index.js +0 -10
  19. package/dist/move/index.d.ts +1 -0
  20. package/dist/move/index.js +1 -0
  21. package/dist/move/kinematics/CoreKinematics.d.ts +1 -1
  22. package/dist/move/kinematics/CoreKinematics.js +3 -3
  23. package/dist/move/kinematics/DeltaKinematics.d.ts +1 -1
  24. package/dist/move/kinematics/DeltaKinematics.js +3 -3
  25. package/dist/move/kinematics/HangprinterKinematics.d.ts +1 -1
  26. package/dist/move/kinematics/HangprinterKinematics.js +3 -3
  27. package/dist/move/kinematics/PolarKinematics.d.ts +1 -1
  28. package/dist/move/kinematics/PolarKinematics.js +3 -3
  29. package/dist/move/kinematics/ScaraKinematics.d.ts +1 -1
  30. package/dist/move/kinematics/ScaraKinematics.js +3 -3
  31. package/dist/move/kinematics/index.d.ts +1 -1
  32. package/dist/move/kinematics/index.js +3 -3
  33. package/dist/plugins/PluginManifest.d.ts +1 -1
  34. package/dist/plugins/PluginManifest.js +2 -2
  35. package/dist/sbc/Upgrade.d.ts +6 -0
  36. package/dist/sbc/Upgrade.js +9 -0
  37. package/dist/sbc/index.d.ts +4 -0
  38. package/dist/sbc/index.js +5 -1
  39. package/dist/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +1 -0
  40. package/dist/sensors/FilamentMonitors/FilamentMonitorBase.js +1 -0
  41. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +1 -1
  42. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +3 -3
  43. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +1 -1
  44. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +3 -3
  45. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +2 -1
  46. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +4 -3
  47. package/dist/sensors/FilamentMonitors/index.d.ts +1 -1
  48. package/dist/sensors/FilamentMonitors/index.js +3 -3
  49. package/dist/state/MessageBox.d.ts +1 -1
  50. package/dist/state/MessageBox.js +2 -2
  51. package/dist/state/RestorePoint.js +1 -1
  52. package/package.json +9 -9
@@ -11,13 +11,12 @@
11
11
  "boards[].accelerometer.points": "Number of collected data points in the last run or 0 if it failed",
12
12
  "boards[].accelerometer.runs": "Number of completed sampling runs",
13
13
  "boards[].canAddress": "CAN address of this board or null if not applicable",
14
- "boards[].closedLoop": "Closed loop data of this board or null if unknown",
15
14
  "boards[].closedLoop.points": "Number of collected data points in the last run or 0 if it failed",
16
15
  "boards[].closedLoop.runs": "Number of completed sampling runs",
17
- "boards[].directDisplay": "Details about a connected display or null if none is connected",
18
16
  "boards[].directDisplay.encoder": "Encoder of this screen or null if none",
19
17
  "boards[].directDisplay.encoder.pulsesPerClick": "Number of pulses per click of the rotary encoder",
20
18
  "boards[].directDisplay.screen": "Screen information",
19
+ "boards[].directDisplay.screen.contrast": "Configured contrast",
21
20
  "boards[].directDisplay.screen.controller": {
22
21
  "values": {
23
22
  "ST7920": "ST7920 controller",
@@ -25,6 +24,7 @@
25
24
  "ILI9488": "ILI9488 controller"
26
25
  }
27
26
  },
27
+ "boards[].directDisplay.screen.resistorRatio": "Configured resistor ratio",
28
28
  "boards[].drivers": "Drivers of this board",
29
29
  "boards[].drivers[].closedLoop.currentFraction": "Current fraction of the configured motor current used",
30
30
  "boards[].drivers[].closedLoop.positionError": "Position error in full steps of the motor",
@@ -42,19 +42,8 @@
42
42
  },
43
43
  "boards[].firmwareDate": "Date of the firmware build",
44
44
  "boards[].firmwareFileName": "Filename of the firmware binary",
45
- "boards[].firmwareName": "Name of the firmware build",
46
45
  "boards[].firmwareVersion": "Version of the firmware build",
47
46
  "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
- },
56
- "boards[].inductiveSensor": "Information about an inductive sensor or null if not present",
57
- "boards[].maxHeaters": "Maximum number of heaters this board can control",
58
47
  "boards[].maxMotors": "Maximum number of motors this board can drive",
59
48
  "boards[].mcuTemp": "Minimum, maximum, and current temperatures of the MCU or null if unknown",
60
49
  "boards[].mcuTemp.current": "Current value",
@@ -63,7 +52,6 @@
63
52
  "boards[].name": "Full name of the board",
64
53
  "boards[].shortName": "Short name of this board",
65
54
  "boards[].state": {
66
- "summary": "State of this board",
67
55
  "values": {
68
56
  "unknown": "Unknown state",
69
57
  "flashing": "Flashing new firmware",
@@ -73,7 +61,6 @@
73
61
  "timedOut": "Board timed out"
74
62
  }
75
63
  },
76
- "boards[].supportsDirectDisplay": "Indicates if this board supports external displays",
77
64
  "boards[].uniqueId": "Unique identifier of the board or null if unknown",
78
65
  "boards[].v12": "Minimum, maximum, and current voltages on the 12V rail or null if unknown",
79
66
  "boards[].v12.current": "Current value",
@@ -83,7 +70,6 @@
83
70
  "boards[].vIn.current": "Current value",
84
71
  "boards[].vIn.max": "Maximum value",
85
72
  "boards[].vIn.min": "Minimum value",
86
- "boards[].wifiFirmwareFileName": "Filename of the on-board WiFi chip or null if not present",
87
73
  "directories": {
88
74
  "summary": "Information about the individual directories",
89
75
  "remarks": "This may not be available in RepRapFirmware if no mass storages are available"
@@ -498,6 +484,7 @@
498
484
  "move.currentMove.distance": "Total distance of the current move (in mm)",
499
485
  "move.currentMove.duration": "Duration of the current move (in s)",
500
486
  "move.currentMove.extrusionRate": "Current extrusion rate (in mm/s)",
487
+ "move.currentMove.filePosition": "Position in the job file of the move being executed (in bytes or null)",
501
488
  "move.currentMove.laserPwm": "Laser PWM of the current move (0..1) or null if not applicable",
502
489
  "move.currentMove.requestedSpeed": "Requested speed of the current move (in mm/s)",
503
490
  "move.currentMove.topSpeed": "Top speed of the current move (in mm/s)",
@@ -536,6 +523,14 @@
536
523
  "move.keepout[].coords[].max": "Maximum axis coordinate",
537
524
  "move.keepout[].coords[].min": "Minimum axis coordinate",
538
525
  "move.kinematics": "Configured kinematics options",
526
+ "move.kinematics.anchors": "Anchor configurations for A, B, C, Dz",
527
+ "move.kinematics.crosstalk": "Proximal to distal, proximal to Z and distal to Z crosstalk",
528
+ "move.kinematics.deltaRadius": "Delta radius (in mm)",
529
+ "move.kinematics.distalLength": "Distal arm length (in mm)",
530
+ "move.kinematics.forwardMatrix": "Forward matrix",
531
+ "move.kinematics.homedHeight": "Homed height of a delta printer in mm",
532
+ "move.kinematics.inverseMatrix": "Inverse matrix",
533
+ "move.kinematics.minRadius": "Requested minimum radius (in mm)",
539
534
  "move.kinematics.name": {
540
535
  "summary": "Name of the configured kinematics",
541
536
  "values": {
@@ -554,9 +549,35 @@
554
549
  "unknown": "Unknown"
555
550
  }
556
551
  },
552
+ "move.kinematics.printRadius": "Print radius for Hangprinter and Delta geometries (in mm)",
553
+ "move.kinematics.proximalLength": "Proximal arm length (in mm)",
554
+ "move.kinematics.psiLimits": "Psi limits (in degrees)",
555
+ "move.kinematics.radiusHomed": "Homed radius (in mm)",
556
+ "move.kinematics.radiusMax": "Maximum radius (in mm)",
557
+ "move.kinematics.radiusMin": "Minimum radius (in mm)",
557
558
  "move.kinematics.segmentation": "Segmentation parameters or null if not configured",
558
559
  "move.kinematics.segmentation.minSegLength": "Minimum length of a segment (in mm)",
559
560
  "move.kinematics.segmentation.segmentsPerSec": "Number of segments per second",
561
+ "move.kinematics.thetaLimits": "Theta limits (in degrees)",
562
+ "move.kinematics.tiltCorrection": "Parameters describing the tilt correction",
563
+ "move.kinematics.tiltCorrection.correctionFactor": "Correction factor",
564
+ "move.kinematics.tiltCorrection.lastCorrections": "Last corrections (in mm)",
565
+ "move.kinematics.tiltCorrection.maxCorrection": "Maximum Z correction (in mm)",
566
+ "move.kinematics.tiltCorrection.screwPitch": "Pitch of the Z leadscrews (in mm)",
567
+ "move.kinematics.tiltCorrection.screwX": "X positions of the leadscrews (in mm)",
568
+ "move.kinematics.tiltCorrection.screwY": "Y positions of the leadscrews (in mm)",
569
+ "move.kinematics.towers": "Delta tower properties",
570
+ "move.kinematics.towers[].angleCorrection": "Tower position corrections (in degrees)",
571
+ "move.kinematics.towers[].diagonal": "Diagonal rod length (in mm)",
572
+ "move.kinematics.towers[].endstopAdjustment": "Deviation of the ideal endstop position (in mm)",
573
+ "move.kinematics.towers[].xPos": "X coordinate of this tower (in mm)",
574
+ "move.kinematics.towers[].yPos": "Y coordinate of this tower (in mm)",
575
+ "move.kinematics.ttAccMax": "Maximum turntable acceleration (in mm/s^2)",
576
+ "move.kinematics.ttSpeedMax": "Maximum turntable speed (in mm/s)",
577
+ "move.kinematics.xOffset": "X offset (in mm)",
578
+ "move.kinematics.xTilt": "How much Z needs to be raised for each unit of movement in the +X direction",
579
+ "move.kinematics.yOffset": "Y offset (in mm)",
580
+ "move.kinematics.yTilt": "How much Z needs to be raised for each unit of movement in the +Y direction",
560
581
  "move.limitAxes": "Limit axis positions by their minima and maxima",
561
582
  "move.motionSystems": "List of configured motion systems",
562
583
  "move.motionSystems[].currentMove": "Information about the current move",
@@ -565,6 +586,7 @@
565
586
  "move.motionSystems[].currentMove.distance": "Total distance of the current move (in mm)",
566
587
  "move.motionSystems[].currentMove.duration": "Duration of the current move (in s)",
567
588
  "move.motionSystems[].currentMove.extrusionRate": "Current extrusion rate (in mm/s)",
589
+ "move.motionSystems[].currentMove.filePosition": "Position in the job file of the move being executed (in bytes or null)",
568
590
  "move.motionSystems[].currentMove.laserPwm": "Laser PWM of the current move (0..1) or null if not applicable",
569
591
  "move.motionSystems[].currentMove.requestedSpeed": "Requested speed of the current move (in mm/s)",
570
592
  "move.motionSystems[].currentMove.topSpeed": "Top speed of the current move (in mm/s)",
@@ -578,7 +600,7 @@
578
600
  "move.motionSystems[].restorePoints[].extruderPos": "The virtual extruder position at the start of this move",
579
601
  "move.motionSystems[].restorePoints[].fanPwm": "PWM value of the tool fan (0..1)",
580
602
  "move.motionSystems[].restorePoints[].feedRate": "Requested feedrate (in mm/s)",
581
- "move.motionSystems[].restorePoints[].gCommandNumber": "Which of G0/G1/G2/G3 generated the move at this restore point",
603
+ "move.motionSystems[].restorePoints[].gCommandNumber": "Which of G0/G1/G2/G3 generated the move at this restore point, or -1 if unknown",
582
604
  "move.motionSystems[].restorePoints[].ioBits": "The output port bits setting for this move or null if not applicable",
583
605
  "move.motionSystems[].restorePoints[].laserPwm": "Laser PWM value (0..1) or null if not applicable",
584
606
  "move.motionSystems[].restorePoints[].toolNumber": "The tool number that was active",
@@ -782,6 +804,9 @@
782
804
  "sbc.memory.total": "Total memory (in bytes)",
783
805
  "sbc.model": "SBC model or null if unknown",
784
806
  "sbc.serial": "Serial of the SBC or null if unknown",
807
+ "sbc.upgrade": "Details about a software upgrade in progress or null if no upgrade is running",
808
+ "sbc.upgrade.message": "Description of the current upgrade step",
809
+ "sbc.upgrade.progress": "Progress of the current upgrade step (0..1) or null if indeterminate",
785
810
  "sbc.uptime": "Uptime of the running system (in s)",
786
811
  "sensors": "Information about connected sensors including Z-probes and endstops",
787
812
  "sensors.analog": "List of analog sensors",
@@ -874,6 +899,23 @@
874
899
  }
875
900
  },
876
901
  "sensors.filamentMonitors": "List of configured filament monitors",
902
+ "sensors.filamentMonitors[].agc": "AGC reading of this filament monitor (null if unknown)",
903
+ "sensors.filamentMonitors[].avgPercentage": "Average ratio of measured vs. commanded movement",
904
+ "sensors.filamentMonitors[].calibrated": "Calibrated properties of this filament monitor",
905
+ "sensors.filamentMonitors[].calibrated.mmPerPulse": "Extruded distance per pulse (in mm)",
906
+ "sensors.filamentMonitors[].calibrated.mmPerRev": "Extruded distance per revolution (in mm)",
907
+ "sensors.filamentMonitors[].calibrated.percentMax": "Maximum percentage (0..1 or greater)",
908
+ "sensors.filamentMonitors[].calibrated.percentMin": "Minimum percentage (0..1)",
909
+ "sensors.filamentMonitors[].calibrated.sensitivity": "Calibrated sensitivity",
910
+ "sensors.filamentMonitors[].calibrated.totalDistance": "Total extruded distance (in mm)",
911
+ "sensors.filamentMonitors[].configured": "Configured properties of this filament monitor",
912
+ "sensors.filamentMonitors[].configured.allMoves": "Whether all moves and not only printing moves are supposed to be checked",
913
+ "sensors.filamentMonitors[].configured.calibrationFactor": "Calibration factor of this sensor",
914
+ "sensors.filamentMonitors[].configured.mmPerPulse": "Extruded distance per pulse (in mm)",
915
+ "sensors.filamentMonitors[].configured.mmPerRev": "Extruded distance per revolution (in mm)",
916
+ "sensors.filamentMonitors[].configured.percentMax": "Maximum percentage (0..1 or greater)",
917
+ "sensors.filamentMonitors[].configured.percentMin": "Minimum percentage (0..1)",
918
+ "sensors.filamentMonitors[].configured.sampleDistance": "Sample distance (in mm)",
877
919
  "sensors.filamentMonitors[].enableMode": {
878
920
  "summary": "Enable mode of this filament monitor",
879
921
  "values": {
@@ -883,6 +925,11 @@
883
925
  }
884
926
  },
885
927
  "sensors.filamentMonitors[].enabled": "Whether this filament monitor is enabled",
928
+ "sensors.filamentMonitors[].filamentPresent": "Indicates if filament is present in this filament monitor (null if unknown)",
929
+ "sensors.filamentMonitors[].lastPercentage": "Last ratio of measured vs. commanded movement",
930
+ "sensors.filamentMonitors[].maxPercentage": "Maximum ratio of measured vs. commanded movement",
931
+ "sensors.filamentMonitors[].minPercentage": "Minimum ratio of measured vs. commanded movement",
932
+ "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.",
886
933
  "sensors.filamentMonitors[].status": {
887
934
  "summary": "Last reported status of this filament monitor",
888
935
  "values": {
@@ -895,6 +942,7 @@
895
942
  "sensorError": "Sensor encountered an error"
896
943
  }
897
944
  },
945
+ "sensors.filamentMonitors[].totalExtrusion": "Total extrusion commanded (in mm)",
898
946
  "sensors.filamentMonitors[].type": {
899
947
  "summary": "Type of this filament monitor",
900
948
  "values": {
@@ -1047,7 +1095,7 @@
1047
1095
  "state.restorePoints[].extruderPos": "The virtual extruder position at the start of this move",
1048
1096
  "state.restorePoints[].fanPwm": "PWM value of the tool fan (0..1)",
1049
1097
  "state.restorePoints[].feedRate": "Requested feedrate (in mm/s)",
1050
- "state.restorePoints[].gCommandNumber": "Which of G0/G1/G2/G3 generated the move at this restore point",
1098
+ "state.restorePoints[].gCommandNumber": "Which of G0/G1/G2/G3 generated the move at this restore point, or -1 if unknown",
1051
1099
  "state.restorePoints[].ioBits": "The output port bits setting for this move or null if not applicable",
1052
1100
  "state.restorePoints[].laserPwm": "Laser PWM value (0..1) or null if not applicable",
1053
1101
  "state.restorePoints[].toolNumber": "The tool number that was active",
package/dist/index.d.ts CHANGED
@@ -23,4 +23,3 @@ export * from "./volumes";
23
23
  export * from "./ObjectModel";
24
24
  import ObjectModel from "./ObjectModel";
25
25
  export default ObjectModel;
26
- export declare function setArrayItem(array: Array<any>, index: number, value: any): void;
package/dist/index.js CHANGED
@@ -25,13 +25,3 @@ export * from "./ObjectModel";
25
25
  // Expose ObjectModel as default export
26
26
  import ObjectModel from "./ObjectModel";
27
27
  export default ObjectModel;
28
- // Unfortunately we need to define a way to update arrays to remain compatible with Vue 2 (due to IE11).
29
- // This will become obsolete as soon as DWC is upgraded to Vue 3, but that isn't going to happen anytime soon.
30
- // Until then a Vue 2 user would have to call something like this on initialization to work around this limitation:
31
- // globalThis._duetModelSetArray = (array, index, value) => Vue.set(array, index, value);
32
- // or in TypeScript
33
- // (globalThis as any)._duetModelSetArray = (array: object, index: string | number, value: any) => Vue.set(array, index, value);
34
- globalThis._duetModelSetArray = (array, index, value) => array[index] = value;
35
- export function setArrayItem(array, index, value) {
36
- globalThis._duetModelSetArray(array, index, value);
37
- }
@@ -14,6 +14,7 @@ export declare class CurrentMove extends ModelObject {
14
14
  distance: number;
15
15
  duration: number;
16
16
  extrusionRate: number;
17
+ filePosition: number | null;
17
18
  laserPwm: number | null;
18
19
  requestedSpeed: number;
19
20
  topSpeed: number;
@@ -16,6 +16,7 @@ export class CurrentMove extends ModelObject {
16
16
  this.distance = 0;
17
17
  this.duration = 0;
18
18
  this.extrusionRate = 0;
19
+ this.filePosition = null;
19
20
  this.laserPwm = null;
20
21
  this.requestedSpeed = 0;
21
22
  this.topSpeed = 0;
@@ -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;
@@ -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;
@@ -0,0 +1,6 @@
1
+ import ModelObject from "../ModelObject";
2
+ export declare class Upgrade extends ModelObject {
3
+ message: string;
4
+ progress: number | null;
5
+ }
6
+ export default Upgrade;
@@ -0,0 +1,9 @@
1
+ import ModelObject from "../ModelObject";
2
+ export class Upgrade extends ModelObject {
3
+ constructor() {
4
+ super(...arguments);
5
+ this.message = "";
6
+ this.progress = null;
7
+ }
8
+ }
9
+ export default Upgrade;
@@ -2,7 +2,9 @@ import ModelObject from "../ModelObject";
2
2
  import DSF from "./dsf";
3
3
  import CPU from "./CPU";
4
4
  import Memory from "./Memory";
5
+ import Upgrade from "./Upgrade";
5
6
  export declare class SBC extends ModelObject {
7
+ constructor();
6
8
  appArmor: boolean;
7
9
  readonly cpu: CPU;
8
10
  readonly dsf: DSF;
@@ -11,9 +13,11 @@ export declare class SBC extends ModelObject {
11
13
  readonly memory: Memory;
12
14
  model: string | null;
13
15
  serial: string | null;
16
+ upgrade: Upgrade | null;
14
17
  uptime: number | null;
15
18
  }
16
19
  export default SBC;
17
20
  export * from "./dsf";
18
21
  export * from "./CPU";
19
22
  export * from "./Memory";
23
+ export * from "./Upgrade";
package/dist/sbc/index.js CHANGED
@@ -2,9 +2,10 @@ import ModelObject from "../ModelObject";
2
2
  import DSF from "./dsf";
3
3
  import CPU from "./CPU";
4
4
  import Memory from "./Memory";
5
+ import Upgrade from "./Upgrade";
5
6
  export class SBC extends ModelObject {
6
7
  constructor() {
7
- super(...arguments);
8
+ super();
8
9
  this.appArmor = false;
9
10
  this.cpu = new CPU();
10
11
  this.dsf = new DSF();
@@ -13,10 +14,13 @@ export class SBC extends ModelObject {
13
14
  this.memory = new Memory();
14
15
  this.model = null;
15
16
  this.serial = null;
17
+ this.upgrade = null;
16
18
  this.uptime = null;
19
+ ModelObject.wrapModelProperty(this, "upgrade", Upgrade);
17
20
  }
18
21
  }
19
22
  export default SBC;
20
23
  export * from "./dsf";
21
24
  export * from "./CPU";
22
25
  export * from "./Memory";
26
+ export * from "./Upgrade";
@@ -26,6 +26,7 @@ export declare class FilamentMonitorBase extends ModelObject {
26
26
  */
27
27
  enabled: boolean;
28
28
  enableMode: FilamentMonitorEnableMode;
29
+ filamentPresent: boolean | null;
29
30
  status: FilamentMonitorStatus;
30
31
  type: FilamentMonitorType;
31
32
  constructor(type?: FilamentMonitorType);
@@ -31,6 +31,7 @@ export class FilamentMonitorBase extends ModelObject {
31
31
  */
32
32
  this.enabled = false;
33
33
  this.enableMode = FilamentMonitorEnableMode.disabled;
34
+ this.filamentPresent = null;
34
35
  this.status = FilamentMonitorStatus.noDataReceived;
35
36
  this.type = type;
36
37
  }
@@ -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;
@@ -16,8 +16,9 @@ export declare class RotatingMagnetFilamentMonitorConfigured extends ModelObject
16
16
  }
17
17
  export declare class RotatingMagnetFilamentMonitor extends Duet3DFilamentMonitor {
18
18
  constructor();
19
+ agc: number | null;
19
20
  calibrated: RotatingMagnetFilamentMonitorCalibrated | null;
20
21
  readonly configured: RotatingMagnetFilamentMonitorConfigured;
21
- update(jsonElement: any): IModelObject | null;
22
+ update(jsonElement: any, authoritative?: boolean): IModelObject | null;
22
23
  }
23
24
  export default RotatingMagnetFilamentMonitor;
@@ -24,18 +24,19 @@ export class RotatingMagnetFilamentMonitorConfigured extends ModelObject {
24
24
  export class RotatingMagnetFilamentMonitor extends Duet3DFilamentMonitor {
25
25
  constructor() {
26
26
  super(FilamentMonitorType.rotatingMagnet);
27
+ this.agc = null;
27
28
  this.calibrated = new RotatingMagnetFilamentMonitorCalibrated();
28
29
  this.configured = new RotatingMagnetFilamentMonitorConfigured();
29
30
  ModelObject.wrapModelProperty(this, "calibrated", RotatingMagnetFilamentMonitorCalibrated);
30
31
  }
31
- update(jsonElement) {
32
+ update(jsonElement, authoritative = false) {
32
33
  if (jsonElement === null) {
33
34
  return null;
34
35
  }
35
36
  if (typeof jsonElement.type === "string" && jsonElement.type !== this.type) {
36
- return getFilamentMonitor(jsonElement.type).update(jsonElement);
37
+ return getFilamentMonitor(jsonElement.type).update(jsonElement, authoritative);
37
38
  }
38
- return super.update(jsonElement);
39
+ return super.update(jsonElement, authoritative);
39
40
  }
40
41
  }
41
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;