@kuriousdesign/machine-sdk 1.0.64 → 1.0.69

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 (77) hide show
  1. package/.github/workflows/publish.yml +28 -0
  2. package/README.md +28 -51
  3. package/dist/custom-types/BaseDevice/Device.d.ts +1 -1
  4. package/dist/custom-types/BaseDevice/Device.js +1 -1
  5. package/dist/custom-types/BaseDevice/index.d.ts +1 -0
  6. package/dist/custom-types/BaseDevice/index.js +1 -0
  7. package/dist/custom-types/Devices/index.d.ts +0 -2
  8. package/dist/custom-types/Devices/index.js +0 -2
  9. package/dist/custom-types/Recipe.d.ts +2 -0
  10. package/dist/custom-types/Recipe.js +9 -1
  11. package/package.json +1 -1
  12. package/src/abb/enums/GCs.mod +44 -44
  13. package/src/abb/enums/PartLocationIds.mod +13 -13
  14. package/src/abb/enums/RobTasks.mod +18 -18
  15. package/src/abb/enums/States.mod +20 -20
  16. package/src/abb/procs/MainModule.mod +188 -188
  17. package/src/abb/records/DeviceDataTypes.mod +35 -35
  18. package/src/custom-types/AppState.ts +115 -115
  19. package/src/custom-types/BaseDevice/Actions.ts +45 -45
  20. package/src/custom-types/BaseDevice/ApiOpcua.ts +71 -71
  21. package/src/custom-types/BaseDevice/Device.ts +224 -224
  22. package/src/custom-types/BaseDevice/DeviceCmds.ts +45 -45
  23. package/src/custom-types/BaseDevice/DeviceConstants.ts +9 -9
  24. package/src/custom-types/{Devices → BaseDevice}/DeviceTypes.ts +60 -60
  25. package/src/custom-types/BaseDevice/Processes.ts +38 -38
  26. package/src/custom-types/BaseDevice/index.ts +7 -6
  27. package/src/custom-types/Bridge.ts +8 -8
  28. package/src/custom-types/Com.ts +19 -19
  29. package/src/custom-types/Devices/Axis.ts +222 -222
  30. package/src/custom-types/Devices/Conductor.ts +14 -14
  31. package/src/custom-types/Devices/Pot.ts +24 -24
  32. package/src/custom-types/Devices/Robot.ts +208 -208
  33. package/src/custom-types/Devices/index.ts +3 -4
  34. package/src/custom-types/GlobalConstants.ts +98 -98
  35. package/src/custom-types/HMI.ts +52 -52
  36. package/src/custom-types/Machine.ts +130 -130
  37. package/src/custom-types/Part.ts +238 -238
  38. package/src/custom-types/RackData.ts +22 -22
  39. package/src/custom-types/Recipe.ts +250 -240
  40. package/src/custom-types/RecipeManagerFB.ts +10 -10
  41. package/src/custom-types/TaskQueue.ts +86 -86
  42. package/src/custom-types/UserManagerFB.ts +7 -7
  43. package/src/custom-types/index.ts +14 -14
  44. package/src/enums/Colors.ts +79 -79
  45. package/src/enums/DeviceId.ts +116 -116
  46. package/src/enums/ExtrusionType.ts +5 -5
  47. package/src/enums/OpcuaDatatype.ts +27 -27
  48. package/src/enums/Pages.ts +21 -21
  49. package/src/enums/States.ts +173 -173
  50. package/src/enums/TaskId.ts +37 -37
  51. package/src/enums/index.ts +9 -9
  52. package/src/functions/colorMapping.ts +43 -43
  53. package/src/functions/index.ts +2 -2
  54. package/src/functions/mqtt-helpers.ts +20 -20
  55. package/src/functions/topicMapping.ts +6 -6
  56. package/src/index.ts +3 -3
  57. package/src/plc-tags/index.ts +38 -38
  58. package/src/plc-tags/mqtt.ts +9 -9
  59. package/src/plc-tags/opcua.ts +3 -3
  60. package/src/styles/animations.css +15 -15
  61. package/tsconfig.json +13 -13
  62. package/dist/custom-types/Devices/Device.d.ts +0 -111
  63. package/dist/custom-types/Devices/Device.js +0 -108
  64. package/dist/custom-types/PartData.d.ts +0 -11
  65. package/dist/custom-types/PartData.js +0 -2
  66. package/dist/custom-types/RecipeData.d.ts +0 -7
  67. package/dist/custom-types/RecipeData.js +0 -2
  68. package/dist/enums/Errors.d.ts +0 -6
  69. package/dist/enums/Errors.js +0 -28
  70. package/dist/enums/Priorities.d.ts +0 -18
  71. package/dist/enums/Priorities.js +0 -24
  72. package/dist/enums/RobPositions.d.ts +0 -12
  73. package/dist/enums/RobPositions.js +0 -16
  74. package/dist/enums/Warnings.d.ts +0 -6
  75. package/dist/enums/Warnings.js +0 -18
  76. /package/dist/custom-types/{Devices → BaseDevice}/DeviceTypes.d.ts +0 -0
  77. /package/dist/custom-types/{Devices → BaseDevice}/DeviceTypes.js +0 -0
@@ -1,241 +1,251 @@
1
- import { GCs } from "./GlobalConstants";
2
-
3
- export interface JobData {
4
- ActiveRecipeIndex: number; // used with Machine.RecipeStore.Recipes array
5
- JobName: string; // this is the identifier for the specific job
6
- LotQty: number; // how many parts you are supposed to make per the job request
7
- GoodCnt: number; // how many good parts you've completed since starting the job
8
- ScrapCnt: number; // how many parts you've scrapped since starting the job
9
- SetupStartTime: bigint; // timestamp
10
- SetupEndTime: bigint; // timestamp
11
- SetupCompleted: boolean; // status
12
- JobStartTime: bigint; // timestamp
13
- JobEndTime: bigint; // timestamp
14
- JobComplete: boolean;
15
- }
16
-
17
- export interface ApplicatorSetpoint {
18
- speed: number; // speed robot uses while applying liner
19
- squeegeeDiameter: number; // mm of Inner Diameter
20
- zOffset: number; // mm of Distance relative to false bottom
21
- ballValveOn: boolean; // whether ball valve is on or off at this setpoint
22
- }
23
-
24
- export const exampleApplicatorSetpoints: ApplicatorSetpoint[] = [
25
- { speed: 100, squeegeeDiameter: 30.0, zOffset: -10.0, ballValveOn: true },
26
- { speed: 100, squeegeeDiameter: 30.0, zOffset: 100.0, ballValveOn: true },
27
- { speed: 150, squeegeeDiameter: 28.5, zOffset: 200.0, ballValveOn: true },
28
- { speed: 200, squeegeeDiameter: 27.0, zOffset: 300.0, ballValveOn: false },
29
- ];
30
-
31
- export const initialApplicatorSetpoints: ApplicatorSetpoint[] = Array(GCs.MAX_APPLICATOR_SETPOINTS).fill({
32
- speed: 0,
33
- squeegeeDiameter: 0.0,
34
- zOffset: 0.0,
35
- ballValveOn: false,
36
- });
37
-
38
- export interface RecipeData {
39
- index: number; // index in RecipeStore.Recipes array
40
- nickname: string; // user defined nickname for recipe
41
-
42
- tubeTypeId: number;
43
- tubeTypeString: string; // display purposes only
44
- tubeOuterDiameterMax: number; // mm, used for robot offsets in fixture
45
- falseBottomStaysOpen: boolean; // this also determines if only the tall fixture is used or not
46
-
47
- linerPotPressure: number; // PSI
48
- linerTypeString: string; // display purposes only
49
-
50
- applicatorSetpoints: ApplicatorSetpoint[]; // speed robot uses while applying liner
51
- applicatorToolId: ApplicatorTools;
52
- applicatorToolString: string;
53
- cleanerId: number; // cleaner tool used before applying liner
54
- cleanerString: string;
55
-
56
- weighingFingerId: WeighingFingers;
57
- weighingFingerString: string;
58
-
59
- numCameras: number; // number of cameras needed to take photos of a tube
60
- cameraIds: number[]; // used with NumCameras to determine how photos are taken
61
- cameraSpeeds: number[]; // speed settings for robot for each camera
62
- }
63
-
64
- export enum CameraIds {
65
- NONE = 0,
66
- CAMERA_1 = 1,
67
- CAMERA_2 = 2,
68
- CAMERA_3 = 3,
69
- }
70
-
71
- export const cameraIdToStringMap = new Map<CameraIds, string>([
72
- [CameraIds.NONE, "None"],
73
- [CameraIds.CAMERA_1, "Camera 1"],
74
- [CameraIds.CAMERA_2, "Camera 2"],
75
- [CameraIds.CAMERA_3, "Camera 3"],
76
- ]);
77
-
78
- export const cameraStringToIdMap = new Map<string, CameraIds>(Array.from(cameraIdToStringMap.entries()).map(([id, str]) => [str, id]));
79
-
80
- export enum TubeTypes {
81
- NONE = 0,
82
- TYPE_11726650 = 1,
83
- TYPE_1809_370 = 2,
84
- TYPE_1809_126 = 3,
85
- TYPE_1340_38 = 4,
86
- TYPE_3811302 = 5,
87
- TYPE_1755_037 = 6,
88
- TYPE_1517_038 = 7
89
- }
90
-
91
- export const tubeTypeIdToStringMap = new Map<number, string>([
92
- [TubeTypes.NONE, "None"],
93
- [TubeTypes.TYPE_11726650, "11726650"],
94
- [TubeTypes.TYPE_1809_370, "1809-370"],
95
- [TubeTypes.TYPE_1809_126, "1809-126"],
96
- [TubeTypes.TYPE_1340_38, "1340-38"],
97
- [TubeTypes.TYPE_3811302, "3811302"],
98
- [TubeTypes.TYPE_1755_037, "1755-037"],
99
- [TubeTypes.TYPE_1517_038, "1517-038"],
100
- ]);
101
-
102
- export const tubeTypeStringToIdMap = new Map<string, number>(Array.from(tubeTypeIdToStringMap.entries()).map(([id, str]) => [str, id]));
103
-
104
- export function getTubeTypeString(tubeType: TubeTypes): string {
105
- switch (tubeType) {
106
- case TubeTypes.TYPE_11726650:
107
- return "11726650";
108
- case TubeTypes.TYPE_1809_370:
109
- return "1809-370";
110
- case TubeTypes.TYPE_1809_126:
111
- return "1809-126";
112
- case TubeTypes.TYPE_1340_38:
113
- return "1340-38";
114
- case TubeTypes.TYPE_3811302:
115
- return "3811302";
116
- case TubeTypes.TYPE_1755_037:
117
- return "1755-037";
118
- case TubeTypes.TYPE_1517_038:
119
- return "1517-038";
120
- default:
121
- return "None";
122
- }
123
- }
124
-
125
- export const LinerTypes: string[] = [
126
- "CKU",
127
- "Tribrid",
128
- "1755",
129
- ];
130
-
131
- export enum ApplicatorTools {
132
- NONE = 0,
133
- RED_37_INCH = 1,
134
- ORANGE_LARGE = 2,
135
- YELLOW_MEDIUM = 3,
136
- GREEN_SMALL = 4,
137
- BLUE_F16 = 5
138
- }
139
-
140
-
141
-
142
- export const applicatorToolIdToStringMap = new Map<ApplicatorTools, string>([
143
- [ApplicatorTools.NONE, "None"],
144
- [ApplicatorTools.RED_37_INCH, "Red 3/7 Inch"],
145
- [ApplicatorTools.BLUE_F16, "Blue F16"],
146
- [ApplicatorTools.GREEN_SMALL, "Green Small"],
147
- [ApplicatorTools.ORANGE_LARGE, "Orange Large"],
148
- [ApplicatorTools.YELLOW_MEDIUM, "Yellow Medium"],
149
- ]);
150
-
151
- export const applicatorToolStringToIdMap = new Map<string, ApplicatorTools>(Array.from(applicatorToolIdToStringMap.entries()).map(([id, str]) => [str, id]));
152
-
153
- export enum Cleaners {
154
- NONE = 0,
155
- SMALL = 1,
156
- MEDIUM = 2,
157
- LARGE = 3
158
- }
159
-
160
- export const cleanerIdToStringMap = new Map<Cleaners, string>([
161
- [Cleaners.NONE, "None"],
162
- [Cleaners.SMALL, "Small"],
163
- [Cleaners.MEDIUM, "Medium"],
164
- [Cleaners.LARGE, "Large"],
165
- ]);
166
-
167
- export const cleanerStringToIdMap = new Map<string, Cleaners>(Array.from(cleanerIdToStringMap.entries()).map(([id, str]) => [str, id]));
168
-
169
- export enum WeighingFingers {
170
- NONE = 0,
171
- BLUE_SMALL = 1,
172
- RED_MEDIUM = 2,
173
- ORANGE_LARGE = 3,
174
- }
175
-
176
- export const weighingFingerIdToStringMap = new Map<WeighingFingers, string>([
177
- [WeighingFingers.NONE, "None"],
178
- [WeighingFingers.RED_MEDIUM, "Red Medium"],
179
- [WeighingFingers.ORANGE_LARGE, "Orange Large"],
180
- [WeighingFingers.BLUE_SMALL, "Blue Small"],
181
- ]);
182
-
183
- export const weighingFingerStringToIdMap = new Map(
184
- Array.from(weighingFingerIdToStringMap.entries()).map(([id, str]) => [str, id])
185
- );
186
-
187
-
188
- export const exampleRecipe: RecipeData = {
189
- index: 1,
190
- nickname: "Example Recipe",
191
- linerTypeString: "CKU",
192
- linerPotPressure: 50,
193
-
194
- tubeTypeId: TubeTypes.TYPE_1340_38,
195
- tubeTypeString: "1340-38",
196
- tubeOuterDiameterMax: 38.1,
197
- falseBottomStaysOpen: false,
198
-
199
- applicatorSetpoints: exampleApplicatorSetpoints,
200
- applicatorToolId: ApplicatorTools.RED_37_INCH,
201
- applicatorToolString: "Red 3/7 Inch",
202
- cleanerId: Cleaners.MEDIUM,
203
- cleanerString: "Medium",
204
- weighingFingerId: WeighingFingers.RED_MEDIUM,
205
- weighingFingerString: "Red Medium",
206
- numCameras: 2,
207
- cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
208
- cameraSpeeds: [50, 75],
209
-
210
- };
211
-
212
- export const initialRecipe: RecipeData = {
213
- index: 0,
214
- nickname: "",
215
- linerTypeString: "",
216
- tubeOuterDiameterMax: 0.0,
217
- tubeTypeId: TubeTypes.NONE,
218
- tubeTypeString: "",
219
- linerPotPressure: 0,
220
- applicatorSetpoints: initialApplicatorSetpoints,
221
- applicatorToolId: ApplicatorTools.NONE,
222
- applicatorToolString: "",
223
- cleanerId: Cleaners.NONE,
224
- cleanerString: "",
225
- weighingFingerId: WeighingFingers.NONE,
226
- weighingFingerString: "",
227
- numCameras: 0,
228
- cameraIds: Array(GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
229
- cameraSpeeds: Array(GCs.MAX_NUM_CAMERAS).fill(0),
230
- falseBottomStaysOpen: false,
231
- };
232
-
233
- export interface RecipeStore {
234
- numRecipes: number;
235
- recipes: RecipeData[];
236
- }
237
-
238
- export const initialRecipeStore: RecipeStore = {
239
- numRecipes: 2,
240
- recipes: Array(GCs.MAX_NUM_RECIPES).fill(exampleRecipe),
1
+ import { GCs } from "./GlobalConstants";
2
+
3
+ export interface JobData {
4
+ ActiveRecipeIndex: number; // used with Machine.RecipeStore.Recipes array
5
+ JobName: string; // this is the identifier for the specific job
6
+ LotQty: number; // how many parts you are supposed to make per the job request
7
+ GoodCnt: number; // how many good parts you've completed since starting the job
8
+ ScrapCnt: number; // how many parts you've scrapped since starting the job
9
+ SetupStartTime: bigint; // timestamp
10
+ SetupEndTime: bigint; // timestamp
11
+ SetupCompleted: boolean; // status
12
+ JobStartTime: bigint; // timestamp
13
+ JobEndTime: bigint; // timestamp
14
+ JobComplete: boolean;
15
+ }
16
+
17
+ export interface ApplicatorSetpoint {
18
+ speed: number; // speed robot uses while applying liner
19
+ squeegeeDiameter: number; // mm of Inner Diameter
20
+ zOffset: number; // mm of Distance relative to false bottom
21
+ ballValveOn: boolean; // whether ball valve is on or off at this setpoint
22
+ }
23
+
24
+ export const initialApplicatorSetpoint: ApplicatorSetpoint = {
25
+ speed: 0,
26
+ squeegeeDiameter: 0.0,
27
+ zOffset: 0.0,
28
+ ballValveOn: false,
29
+ };
30
+
31
+ export const exampleApplicatorSetpoints: ApplicatorSetpoint[] = [
32
+ { speed: 100, squeegeeDiameter: 30.0, zOffset: -10.0, ballValveOn: true },
33
+ { speed: 100, squeegeeDiameter: 30.0, zOffset: 100.0, ballValveOn: true },
34
+ { speed: 150, squeegeeDiameter: 28.5, zOffset: 200.0, ballValveOn: true },
35
+ { speed: 200, squeegeeDiameter: 27.0, zOffset: 300.0, ballValveOn: false },
36
+ ];
37
+
38
+ export const initialApplicatorSetpoints: ApplicatorSetpoint[] = Array(GCs.MAX_APPLICATOR_SETPOINTS).fill({
39
+ speed: 0,
40
+ squeegeeDiameter: 0.0,
41
+ zOffset: 0.0,
42
+ ballValveOn: false,
43
+ });
44
+
45
+ export interface RecipeData {
46
+ index: number; // index in RecipeStore.Recipes array
47
+ nickname: string; // user defined nickname for recipe
48
+
49
+ tubeTypeId: number;
50
+ tubeTypeString: string; // display purposes only
51
+ tubeOuterDiameterMax: number; // mm, used for robot offsets in fixture
52
+ tubeHeightMax: number; // mm, used for approach to tubes and the pick position for weighing
53
+ falseBottomStaysOpen: boolean; // this also determines if only the tall fixture is used or not
54
+
55
+ linerPotPressure: number; // PSI
56
+ linerTypeString: string; // display purposes only
57
+
58
+ applicatorSetpoints: ApplicatorSetpoint[]; // speed robot uses while applying liner
59
+ applicatorToolId: ApplicatorTools;
60
+ applicatorToolString: string;
61
+ cleanerId: number; // cleaner tool used before applying liner
62
+ cleanerString: string;
63
+
64
+ weighingFingerId: WeighingFingers;
65
+ weighingFingerString: string;
66
+
67
+ numCameras: number; // number of cameras needed to take photos of a tube
68
+ cameraIds: number[]; // used with NumCameras to determine how photos are taken
69
+ cameraSpeeds: number[]; // speed settings for robot for each camera
70
+ }
71
+
72
+ export enum CameraIds {
73
+ NONE = 0,
74
+ CAMERA_1 = 1,
75
+ CAMERA_2 = 2,
76
+ CAMERA_3 = 3,
77
+ }
78
+
79
+ export const cameraIdToStringMap = new Map<CameraIds, string>([
80
+ [CameraIds.NONE, "None"],
81
+ [CameraIds.CAMERA_1, "Camera 1"],
82
+ [CameraIds.CAMERA_2, "Camera 2"],
83
+ [CameraIds.CAMERA_3, "Camera 3"],
84
+ ]);
85
+
86
+ export const cameraStringToIdMap = new Map<string, CameraIds>(Array.from(cameraIdToStringMap.entries()).map(([id, str]) => [str, id]));
87
+
88
+ export enum TubeTypes {
89
+ NONE = 0,
90
+ TYPE_11726650 = 1,
91
+ TYPE_1809_370 = 2,
92
+ TYPE_1809_126 = 3,
93
+ TYPE_1340_38 = 4,
94
+ TYPE_3811302 = 5,
95
+ TYPE_1755_037 = 6,
96
+ TYPE_1517_038 = 7
97
+ }
98
+
99
+ export const tubeTypeIdToStringMap = new Map<number, string>([
100
+ [TubeTypes.NONE, "None"],
101
+ [TubeTypes.TYPE_11726650, "11726650"],
102
+ [TubeTypes.TYPE_1809_370, "1809-370"],
103
+ [TubeTypes.TYPE_1809_126, "1809-126"],
104
+ [TubeTypes.TYPE_1340_38, "1340-38"],
105
+ [TubeTypes.TYPE_3811302, "3811302"],
106
+ [TubeTypes.TYPE_1755_037, "1755-037"],
107
+ [TubeTypes.TYPE_1517_038, "1517-038"],
108
+ ]);
109
+
110
+ export const tubeTypeStringToIdMap = new Map<string, number>(Array.from(tubeTypeIdToStringMap.entries()).map(([id, str]) => [str, id]));
111
+
112
+ export function getTubeTypeString(tubeType: TubeTypes): string {
113
+ switch (tubeType) {
114
+ case TubeTypes.TYPE_11726650:
115
+ return "11726650";
116
+ case TubeTypes.TYPE_1809_370:
117
+ return "1809-370";
118
+ case TubeTypes.TYPE_1809_126:
119
+ return "1809-126";
120
+ case TubeTypes.TYPE_1340_38:
121
+ return "1340-38";
122
+ case TubeTypes.TYPE_3811302:
123
+ return "3811302";
124
+ case TubeTypes.TYPE_1755_037:
125
+ return "1755-037";
126
+ case TubeTypes.TYPE_1517_038:
127
+ return "1517-038";
128
+ default:
129
+ return "None";
130
+ }
131
+ }
132
+
133
+ export const LinerTypes: string[] = [
134
+ "CKU",
135
+ "Tribrid",
136
+ "1755",
137
+ ];
138
+
139
+ export enum ApplicatorTools {
140
+ NONE = 0,
141
+ RED_37_INCH = 1,
142
+ ORANGE_LARGE = 2,
143
+ YELLOW_MEDIUM = 3,
144
+ GREEN_SMALL = 4,
145
+ BLUE_F16 = 5
146
+ }
147
+
148
+
149
+
150
+ export const applicatorToolIdToStringMap = new Map<ApplicatorTools, string>([
151
+ [ApplicatorTools.NONE, "None"],
152
+ [ApplicatorTools.RED_37_INCH, "Red 3/7 Inch"],
153
+ [ApplicatorTools.BLUE_F16, "Blue F16"],
154
+ [ApplicatorTools.GREEN_SMALL, "Green Small"],
155
+ [ApplicatorTools.ORANGE_LARGE, "Orange Large"],
156
+ [ApplicatorTools.YELLOW_MEDIUM, "Yellow Medium"],
157
+ ]);
158
+
159
+ export const applicatorToolStringToIdMap = new Map<string, ApplicatorTools>(Array.from(applicatorToolIdToStringMap.entries()).map(([id, str]) => [str, id]));
160
+
161
+ export enum Cleaners {
162
+ NONE = 0,
163
+ SMALL = 1,
164
+ MEDIUM = 2,
165
+ LARGE = 3
166
+ }
167
+
168
+ export const cleanerIdToStringMap = new Map<Cleaners, string>([
169
+ [Cleaners.NONE, "None"],
170
+ [Cleaners.SMALL, "Small"],
171
+ [Cleaners.MEDIUM, "Medium"],
172
+ [Cleaners.LARGE, "Large"],
173
+ ]);
174
+
175
+ export const cleanerStringToIdMap = new Map<string, Cleaners>(Array.from(cleanerIdToStringMap.entries()).map(([id, str]) => [str, id]));
176
+
177
+ export enum WeighingFingers {
178
+ NONE = 0,
179
+ BLUE_SMALL = 1,
180
+ RED_MEDIUM = 2,
181
+ ORANGE_LARGE = 3,
182
+ }
183
+
184
+ export const weighingFingerIdToStringMap = new Map<WeighingFingers, string>([
185
+ [WeighingFingers.NONE, "None"],
186
+ [WeighingFingers.RED_MEDIUM, "Red Medium"],
187
+ [WeighingFingers.ORANGE_LARGE, "Orange Large"],
188
+ [WeighingFingers.BLUE_SMALL, "Blue Small"],
189
+ ]);
190
+
191
+ export const weighingFingerStringToIdMap = new Map(
192
+ Array.from(weighingFingerIdToStringMap.entries()).map(([id, str]) => [str, id])
193
+ );
194
+
195
+
196
+ export const exampleRecipe: RecipeData = {
197
+ index: 1,
198
+ nickname: "Example Recipe",
199
+ linerTypeString: "CKU",
200
+ linerPotPressure: 50,
201
+
202
+ tubeTypeId: TubeTypes.TYPE_1340_38,
203
+ tubeTypeString: "1340-38",
204
+ tubeOuterDiameterMax: 38.1,
205
+ tubeHeightMax: 100, // example value in mm
206
+ falseBottomStaysOpen: false,
207
+
208
+ applicatorSetpoints: exampleApplicatorSetpoints,
209
+ applicatorToolId: ApplicatorTools.RED_37_INCH,
210
+ applicatorToolString: "Red 3/7 Inch",
211
+ cleanerId: Cleaners.MEDIUM,
212
+ cleanerString: "Medium",
213
+ weighingFingerId: WeighingFingers.RED_MEDIUM,
214
+ weighingFingerString: "Red Medium",
215
+ numCameras: 2,
216
+ cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
217
+ cameraSpeeds: [50, 75],
218
+
219
+ };
220
+
221
+ export const initialRecipe: RecipeData = {
222
+ index: 0,
223
+ nickname: "",
224
+ linerTypeString: "",
225
+ tubeOuterDiameterMax: 0.0,
226
+ tubeTypeId: TubeTypes.NONE,
227
+ tubeTypeString: "",
228
+ tubeHeightMax: 0, // example value in mm
229
+ linerPotPressure: 0,
230
+ applicatorSetpoints: initialApplicatorSetpoints,
231
+ applicatorToolId: ApplicatorTools.NONE,
232
+ applicatorToolString: "",
233
+ cleanerId: Cleaners.NONE,
234
+ cleanerString: "",
235
+ weighingFingerId: WeighingFingers.NONE,
236
+ weighingFingerString: "",
237
+ numCameras: 0,
238
+ cameraIds: Array(GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
239
+ cameraSpeeds: Array(GCs.MAX_NUM_CAMERAS).fill(0),
240
+ falseBottomStaysOpen: false,
241
+ };
242
+
243
+ export interface RecipeStore {
244
+ numRecipes: number;
245
+ recipes: RecipeData[];
246
+ }
247
+
248
+ export const initialRecipeStore: RecipeStore = {
249
+ numRecipes: 2,
250
+ recipes: Array(GCs.MAX_NUM_RECIPES).fill(exampleRecipe),
241
251
  };
@@ -1,11 +1,11 @@
1
- import { ComponentAnimation } from ".";
2
-
3
- export interface RecipeManagerPbs {
4
- editBtn: ComponentAnimation;
5
- changeBtn: ComponentAnimation;
6
- jobSetupBtn: ComponentAnimation;
7
- activateBtn: boolean;
8
- startSetupBtn: boolean;
9
- finishSetupBtn: boolean;
10
- cancelBtn: boolean;
1
+ import { ComponentAnimation } from ".";
2
+
3
+ export interface RecipeManagerPbs {
4
+ editBtn: ComponentAnimation;
5
+ changeBtn: ComponentAnimation;
6
+ jobSetupBtn: ComponentAnimation;
7
+ activateBtn: boolean;
8
+ startSetupBtn: boolean;
9
+ finishSetupBtn: boolean;
10
+ cancelBtn: boolean;
11
11
  }