@kuriousdesign/machine-sdk 1.0.62 → 1.0.63

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.
@@ -32,4 +32,7 @@ export declare const GCs: {
32
32
  NUM_PARTS_PER_FIXTURE: number;
33
33
  MAX_NUM_HW_CARDS: number;
34
34
  NUM_ENTRIES_MACHINE_LOG: number;
35
+ MAX_NUM_RECIPES: number;
36
+ MAX_NUM_CAMERAS: number;
37
+ MAX_APPLICATOR_SETPOINTS: number;
35
38
  };
@@ -81,4 +81,7 @@ exports.GCs = {
81
81
  // HW SIDE
82
82
  MAX_NUM_HW_CARDS: 16,
83
83
  NUM_ENTRIES_MACHINE_LOG: 100,
84
+ MAX_NUM_RECIPES: 20,
85
+ MAX_NUM_CAMERAS: 3,
86
+ MAX_APPLICATOR_SETPOINTS: 10,
84
87
  };
@@ -11,20 +11,32 @@ export interface JobData {
11
11
  JobEndTime: bigint;
12
12
  JobComplete: boolean;
13
13
  }
14
+ export interface ApplicatorSetpoint {
15
+ speed: number;
16
+ squeegeeDiameter: number;
17
+ zOffset: number;
18
+ ballValveOn: boolean;
19
+ }
20
+ export declare const exampleApplicatorSetpoints: ApplicatorSetpoint[];
21
+ export declare const initialApplicatorSetpoints: ApplicatorSetpoint[];
14
22
  export interface RecipeData {
15
- linerType: string;
23
+ index: number;
24
+ tubeTypeId: number;
25
+ tubeTypeString: string;
16
26
  tubeOuterDiameterMax: number;
17
- tubePartNumber: string;
18
- setpointSpeeds: number[];
19
- setpointDiameters: number[];
20
- setpointDistances: number[];
21
- applicatorToolColorId: ApplicatorTools;
22
- applicatorToolColorString: string;
27
+ falseBottomStaysOpen: boolean;
28
+ linerPotPressure: number;
29
+ linerType: string;
30
+ applicatorSetpoints: ApplicatorSetpoint[];
31
+ applicatorToolId: ApplicatorTools;
32
+ applicatorToolString: string;
33
+ cleanerId: number;
34
+ cleanerString: string;
23
35
  weighingFingerId: WeighingFingers;
24
36
  weighingFingerString: string;
25
37
  numCameras: number;
26
38
  cameraIds: number[];
27
- falseBottomStaysOpen: boolean;
39
+ cameraSpeeds: number[];
28
40
  }
29
41
  export declare enum CameraIds {
30
42
  NONE = 0,
@@ -32,7 +44,8 @@ export declare enum CameraIds {
32
44
  CAMERA_2 = 2,
33
45
  CAMERA_3 = 3
34
46
  }
35
- export declare function getCameraIdString(cameraId: CameraIds): string;
47
+ export declare const cameraIdToStringMap: Map<CameraIds, string>;
48
+ export declare const cameraStringToIdMap: Map<string, CameraIds>;
36
49
  export declare enum TubeTypes {
37
50
  NONE = 0,
38
51
  TYPE_11726650 = 1,
@@ -43,6 +56,8 @@ export declare enum TubeTypes {
43
56
  TYPE_1755_037 = 6,
44
57
  TYPE_1517_038 = 7
45
58
  }
59
+ export declare const tubeTypeIdToStringMap: Map<number, string>;
60
+ export declare const tubeTypeStringToIdMap: Map<string, number>;
46
61
  export declare function getTubeTypeString(tubeType: TubeTypes): string;
47
62
  export declare const LinerTypes: string[];
48
63
  export declare enum ApplicatorTools {
@@ -53,16 +68,24 @@ export declare enum ApplicatorTools {
53
68
  GREEN_SMALL = 4,
54
69
  BLUE_F16 = 5
55
70
  }
71
+ export declare const applicatorToolIdToStringMap: Map<ApplicatorTools, string>;
72
+ export declare const applicatorToolStringToIdMap: Map<string, ApplicatorTools>;
73
+ export declare enum Cleaners {
74
+ NONE = 0,
75
+ SMALL = 1,
76
+ MEDIUM = 2,
77
+ LARGE = 3
78
+ }
79
+ export declare const cleanerIdToStringMap: Map<Cleaners, string>;
80
+ export declare const cleanerStringToIdMap: Map<string, Cleaners>;
56
81
  export declare enum WeighingFingers {
57
82
  NONE = 0,
58
- RED_MEDIUM = 1,
59
- ORANGE_LARGE = 2,
60
- ORANGE_LARGE_2 = 3,
61
- BLUE_SMALL = 4,
62
- BLUE_SMALL_2 = 5,
63
- BLUE_SMALL_3 = 6,
64
- BLUE_SMALL_4 = 7
83
+ BLUE_SMALL = 1,
84
+ RED_MEDIUM = 2,
85
+ ORANGE_LARGE = 3
65
86
  }
87
+ export declare const weighingFingerIdToStringMap: Map<WeighingFingers, string>;
88
+ export declare const weighingFingerStringToIdMap: Map<string, WeighingFingers>;
66
89
  export declare const exampleRecipe: RecipeData;
67
90
  export declare const initialRecipe: RecipeData;
68
91
  export interface RecipeStore {
@@ -1,8 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.initialRecipeStore = exports.initialRecipe = exports.exampleRecipe = exports.WeighingFingers = exports.ApplicatorTools = exports.LinerTypes = exports.TubeTypes = exports.CameraIds = void 0;
4
- exports.getCameraIdString = getCameraIdString;
3
+ exports.initialRecipeStore = exports.initialRecipe = exports.exampleRecipe = exports.weighingFingerStringToIdMap = exports.weighingFingerIdToStringMap = exports.WeighingFingers = exports.cleanerStringToIdMap = exports.cleanerIdToStringMap = exports.Cleaners = exports.applicatorToolStringToIdMap = exports.applicatorToolIdToStringMap = exports.ApplicatorTools = exports.LinerTypes = exports.tubeTypeStringToIdMap = exports.tubeTypeIdToStringMap = exports.TubeTypes = exports.cameraStringToIdMap = exports.cameraIdToStringMap = exports.CameraIds = exports.initialApplicatorSetpoints = exports.exampleApplicatorSetpoints = void 0;
5
4
  exports.getTubeTypeString = getTubeTypeString;
5
+ const GlobalConstants_1 = require("./GlobalConstants");
6
+ exports.exampleApplicatorSetpoints = [
7
+ { speed: 100, squeegeeDiameter: 30.0, zOffset: -10.0, ballValveOn: true },
8
+ { speed: 100, squeegeeDiameter: 30.0, zOffset: 100.0, ballValveOn: true },
9
+ { speed: 150, squeegeeDiameter: 28.5, zOffset: 200.0, ballValveOn: true },
10
+ { speed: 200, squeegeeDiameter: 27.0, zOffset: 300.0, ballValveOn: false },
11
+ ];
12
+ exports.initialApplicatorSetpoints = Array(GlobalConstants_1.GCs.MAX_APPLICATOR_SETPOINTS).fill({
13
+ speed: 0,
14
+ squeegeeDiameter: 0.0,
15
+ zOffset: 0.0,
16
+ ballValveOn: false,
17
+ });
6
18
  var CameraIds;
7
19
  (function (CameraIds) {
8
20
  CameraIds[CameraIds["NONE"] = 0] = "NONE";
@@ -10,18 +22,13 @@ var CameraIds;
10
22
  CameraIds[CameraIds["CAMERA_2"] = 2] = "CAMERA_2";
11
23
  CameraIds[CameraIds["CAMERA_3"] = 3] = "CAMERA_3";
12
24
  })(CameraIds || (exports.CameraIds = CameraIds = {}));
13
- function getCameraIdString(cameraId) {
14
- switch (cameraId) {
15
- case CameraIds.CAMERA_1:
16
- return "Camera 1";
17
- case CameraIds.CAMERA_2:
18
- return "Camera 2";
19
- case CameraIds.CAMERA_3:
20
- return "Camera 3";
21
- default:
22
- return "None";
23
- }
24
- }
25
+ exports.cameraIdToStringMap = new Map([
26
+ [CameraIds.NONE, "None"],
27
+ [CameraIds.CAMERA_1, "Camera 1"],
28
+ [CameraIds.CAMERA_2, "Camera 2"],
29
+ [CameraIds.CAMERA_3, "Camera 3"],
30
+ ]);
31
+ exports.cameraStringToIdMap = new Map(Array.from(exports.cameraIdToStringMap.entries()).map(([id, str]) => [str, id]));
25
32
  var TubeTypes;
26
33
  (function (TubeTypes) {
27
34
  TubeTypes[TubeTypes["NONE"] = 0] = "NONE";
@@ -33,6 +40,17 @@ var TubeTypes;
33
40
  TubeTypes[TubeTypes["TYPE_1755_037"] = 6] = "TYPE_1755_037";
34
41
  TubeTypes[TubeTypes["TYPE_1517_038"] = 7] = "TYPE_1517_038";
35
42
  })(TubeTypes || (exports.TubeTypes = TubeTypes = {}));
43
+ exports.tubeTypeIdToStringMap = new Map([
44
+ [TubeTypes.NONE, "None"],
45
+ [TubeTypes.TYPE_11726650, "11726650"],
46
+ [TubeTypes.TYPE_1809_370, "1809-370"],
47
+ [TubeTypes.TYPE_1809_126, "1809-126"],
48
+ [TubeTypes.TYPE_1340_38, "1340-38"],
49
+ [TubeTypes.TYPE_3811302, "3811302"],
50
+ [TubeTypes.TYPE_1755_037, "1755-037"],
51
+ [TubeTypes.TYPE_1517_038, "1517-038"],
52
+ ]);
53
+ exports.tubeTypeStringToIdMap = new Map(Array.from(exports.tubeTypeIdToStringMap.entries()).map(([id, str]) => [str, id]));
36
54
  function getTubeTypeString(tubeType) {
37
55
  switch (tubeType) {
38
56
  case TubeTypes.TYPE_11726650:
@@ -67,51 +85,82 @@ var ApplicatorTools;
67
85
  ApplicatorTools[ApplicatorTools["GREEN_SMALL"] = 4] = "GREEN_SMALL";
68
86
  ApplicatorTools[ApplicatorTools["BLUE_F16"] = 5] = "BLUE_F16";
69
87
  })(ApplicatorTools || (exports.ApplicatorTools = ApplicatorTools = {}));
88
+ exports.applicatorToolIdToStringMap = new Map([
89
+ [ApplicatorTools.NONE, "None"],
90
+ [ApplicatorTools.RED_37_INCH, "Red 3/7 Inch"],
91
+ [ApplicatorTools.BLUE_F16, "Blue F16"],
92
+ [ApplicatorTools.GREEN_SMALL, "Green Small"],
93
+ [ApplicatorTools.ORANGE_LARGE, "Orange Large"],
94
+ [ApplicatorTools.YELLOW_MEDIUM, "Yellow Medium"],
95
+ ]);
96
+ exports.applicatorToolStringToIdMap = new Map(Array.from(exports.applicatorToolIdToStringMap.entries()).map(([id, str]) => [str, id]));
97
+ var Cleaners;
98
+ (function (Cleaners) {
99
+ Cleaners[Cleaners["NONE"] = 0] = "NONE";
100
+ Cleaners[Cleaners["SMALL"] = 1] = "SMALL";
101
+ Cleaners[Cleaners["MEDIUM"] = 2] = "MEDIUM";
102
+ Cleaners[Cleaners["LARGE"] = 3] = "LARGE";
103
+ })(Cleaners || (exports.Cleaners = Cleaners = {}));
104
+ exports.cleanerIdToStringMap = new Map([
105
+ [Cleaners.NONE, "None"],
106
+ [Cleaners.SMALL, "Small"],
107
+ [Cleaners.MEDIUM, "Medium"],
108
+ [Cleaners.LARGE, "Large"],
109
+ ]);
110
+ exports.cleanerStringToIdMap = new Map(Array.from(exports.cleanerIdToStringMap.entries()).map(([id, str]) => [str, id]));
70
111
  var WeighingFingers;
71
112
  (function (WeighingFingers) {
72
113
  WeighingFingers[WeighingFingers["NONE"] = 0] = "NONE";
73
- WeighingFingers[WeighingFingers["RED_MEDIUM"] = 1] = "RED_MEDIUM";
74
- WeighingFingers[WeighingFingers["ORANGE_LARGE"] = 2] = "ORANGE_LARGE";
75
- WeighingFingers[WeighingFingers["ORANGE_LARGE_2"] = 3] = "ORANGE_LARGE_2";
76
- WeighingFingers[WeighingFingers["BLUE_SMALL"] = 4] = "BLUE_SMALL";
77
- WeighingFingers[WeighingFingers["BLUE_SMALL_2"] = 5] = "BLUE_SMALL_2";
78
- WeighingFingers[WeighingFingers["BLUE_SMALL_3"] = 6] = "BLUE_SMALL_3";
79
- WeighingFingers[WeighingFingers["BLUE_SMALL_4"] = 7] = "BLUE_SMALL_4";
114
+ WeighingFingers[WeighingFingers["BLUE_SMALL"] = 1] = "BLUE_SMALL";
115
+ WeighingFingers[WeighingFingers["RED_MEDIUM"] = 2] = "RED_MEDIUM";
116
+ WeighingFingers[WeighingFingers["ORANGE_LARGE"] = 3] = "ORANGE_LARGE";
80
117
  })(WeighingFingers || (exports.WeighingFingers = WeighingFingers = {}));
118
+ exports.weighingFingerIdToStringMap = new Map([
119
+ [WeighingFingers.NONE, "None"],
120
+ [WeighingFingers.RED_MEDIUM, "Red Medium"],
121
+ [WeighingFingers.ORANGE_LARGE, "Orange Large"],
122
+ [WeighingFingers.BLUE_SMALL, "Blue Small"],
123
+ ]);
124
+ exports.weighingFingerStringToIdMap = new Map(Array.from(exports.weighingFingerIdToStringMap.entries()).map(([id, str]) => [str, id]));
81
125
  exports.exampleRecipe = {
82
126
  linerType: "CKU",
127
+ linerPotPressure: 50,
128
+ index: 1,
129
+ tubeTypeId: TubeTypes.TYPE_1340_38,
130
+ tubeTypeString: "1340-38",
83
131
  tubeOuterDiameterMax: 38.1,
84
- tubePartNumber: "11726650",
85
- setpointSpeeds: [100, 150, 200],
86
- setpointDiameters: [30.0, 28.5, 27.0],
87
- setpointDistances: [100.0, 200.0, 300.0],
88
- applicatorToolColorId: ApplicatorTools.RED_37_INCH,
89
- applicatorToolColorString: "Red 3/7 Inch",
132
+ falseBottomStaysOpen: false,
133
+ applicatorSetpoints: exports.exampleApplicatorSetpoints,
134
+ applicatorToolId: ApplicatorTools.RED_37_INCH,
135
+ applicatorToolString: "Red 3/7 Inch",
136
+ cleanerId: Cleaners.MEDIUM,
137
+ cleanerString: "Medium",
90
138
  weighingFingerId: WeighingFingers.RED_MEDIUM,
91
139
  weighingFingerString: "Red Medium",
92
140
  numCameras: 2,
93
141
  cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
94
- falseBottomStaysOpen: false,
142
+ cameraSpeeds: [50, 75],
95
143
  };
96
- const MAX_APPLICATOR_SETPOINTS = 10;
97
- const MAX_CAMERAS = 3;
98
- const MAX_NUM_RECIPES = 20;
99
144
  exports.initialRecipe = {
145
+ index: 0,
100
146
  linerType: "",
101
147
  tubeOuterDiameterMax: 0.0,
102
- tubePartNumber: "",
103
- setpointSpeeds: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
104
- setpointDiameters: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
105
- setpointDistances: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
106
- applicatorToolColorId: ApplicatorTools.NONE,
107
- applicatorToolColorString: "",
148
+ tubeTypeId: TubeTypes.NONE,
149
+ tubeTypeString: "",
150
+ linerPotPressure: 0,
151
+ applicatorSetpoints: exports.initialApplicatorSetpoints,
152
+ applicatorToolId: ApplicatorTools.NONE,
153
+ applicatorToolString: "",
154
+ cleanerId: Cleaners.NONE,
155
+ cleanerString: "",
108
156
  weighingFingerId: WeighingFingers.NONE,
109
157
  weighingFingerString: "",
110
158
  numCameras: 0,
111
- cameraIds: Array(MAX_CAMERAS).fill(CameraIds.NONE),
159
+ cameraIds: Array(GlobalConstants_1.GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
160
+ cameraSpeeds: Array(GlobalConstants_1.GCs.MAX_NUM_CAMERAS).fill(0),
112
161
  falseBottomStaysOpen: false,
113
162
  };
114
163
  exports.initialRecipeStore = {
115
164
  numRecipes: 2,
116
- recipes: Array(MAX_NUM_RECIPES).fill(exports.exampleRecipe),
165
+ recipes: Array(GlobalConstants_1.GCs.MAX_NUM_RECIPES).fill(exports.exampleRecipe),
117
166
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kuriousdesign/machine-sdk",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "Shared data types and helpers for machine-related repositories",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -93,4 +93,7 @@ export const GCs = {
93
93
  // HW SIDE
94
94
  MAX_NUM_HW_CARDS: 16,
95
95
  NUM_ENTRIES_MACHINE_LOG: 100,
96
+ MAX_NUM_RECIPES: 20,
97
+ MAX_NUM_CAMERAS: 3,
98
+ MAX_APPLICATOR_SETPOINTS: 10,
96
99
  };
@@ -1,3 +1,5 @@
1
+ import { GCs } from "./GlobalConstants";
2
+
1
3
  export interface JobData {
2
4
  ActiveRecipeIndex: number; // used with Machine.RecipeStore.Recipes array
3
5
  JobName: string; // this is the identifier for the specific job
@@ -12,20 +14,50 @@ export interface JobData {
12
14
  JobComplete: boolean;
13
15
  }
14
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
+
15
38
  export interface RecipeData {
16
- linerType: string; // display purposes only
39
+ index: number; // index in RecipeStore.Recipes array
40
+
41
+ tubeTypeId: number;
42
+ tubeTypeString: string; // display purposes only
17
43
  tubeOuterDiameterMax: number; // mm, used for robot offsets in fixture
18
- tubePartNumber: string; // display purposes only
19
- setpointSpeeds: number[]; // speed robot uses while applying liner
20
- setpointDiameters: number[]; // mm of Inner Diameters
21
- setpointDistances: number[]; // mm of Distances relative to false bottom
22
- applicatorToolColorId: ApplicatorTools;
23
- applicatorToolColorString: string;
44
+ falseBottomStaysOpen: boolean; // this also determines if only the tall fixture is used or not
45
+
46
+ linerPotPressure: number; // PSI
47
+ linerType: string; // display purposes only
48
+
49
+ applicatorSetpoints: ApplicatorSetpoint[]; // speed robot uses while applying liner
50
+ applicatorToolId: ApplicatorTools;
51
+ applicatorToolString: string;
52
+ cleanerId: number; // cleaner tool used before applying liner
53
+ cleanerString: string;
54
+
24
55
  weighingFingerId: WeighingFingers;
25
56
  weighingFingerString: string;
57
+
26
58
  numCameras: number; // number of cameras needed to take photos of a tube
27
59
  cameraIds: number[]; // used with NumCameras to determine how photos are taken
28
- falseBottomStaysOpen: boolean; // this also determines if only the tall fixture is used or not
60
+ cameraSpeeds: number[]; // speed settings for robot for each camera
29
61
  }
30
62
 
31
63
  export enum CameraIds {
@@ -35,18 +67,14 @@ export enum CameraIds {
35
67
  CAMERA_3 = 3,
36
68
  }
37
69
 
38
- export function getCameraIdString(cameraId: CameraIds): string {
39
- switch (cameraId) {
40
- case CameraIds.CAMERA_1:
41
- return "Camera 1";
42
- case CameraIds.CAMERA_2:
43
- return "Camera 2";
44
- case CameraIds.CAMERA_3:
45
- return "Camera 3";
46
- default:
47
- return "None";
48
- }
49
- }
70
+ export const cameraIdToStringMap = new Map<CameraIds, string>([
71
+ [CameraIds.NONE, "None"],
72
+ [CameraIds.CAMERA_1, "Camera 1"],
73
+ [CameraIds.CAMERA_2, "Camera 2"],
74
+ [CameraIds.CAMERA_3, "Camera 3"],
75
+ ]);
76
+
77
+ export const cameraStringToIdMap = new Map<string, CameraIds>(Array.from(cameraIdToStringMap.entries()).map(([id, str]) => [str, id]));
50
78
 
51
79
  export enum TubeTypes {
52
80
  NONE = 0,
@@ -59,6 +87,19 @@ export enum TubeTypes {
59
87
  TYPE_1517_038 = 7
60
88
  }
61
89
 
90
+ export const tubeTypeIdToStringMap = new Map<number, string>([
91
+ [TubeTypes.NONE, "None"],
92
+ [TubeTypes.TYPE_11726650, "11726650"],
93
+ [TubeTypes.TYPE_1809_370, "1809-370"],
94
+ [TubeTypes.TYPE_1809_126, "1809-126"],
95
+ [TubeTypes.TYPE_1340_38, "1340-38"],
96
+ [TubeTypes.TYPE_3811302, "3811302"],
97
+ [TubeTypes.TYPE_1755_037, "1755-037"],
98
+ [TubeTypes.TYPE_1517_038, "1517-038"],
99
+ ]);
100
+
101
+ export const tubeTypeStringToIdMap = new Map<string, number>(Array.from(tubeTypeIdToStringMap.entries()).map(([id, str]) => [str, id]));
102
+
62
103
  export function getTubeTypeString(tubeType: TubeTypes): string {
63
104
  switch (tubeType) {
64
105
  case TubeTypes.TYPE_11726650:
@@ -96,51 +137,92 @@ export enum ApplicatorTools {
96
137
  }
97
138
 
98
139
 
140
+
141
+ export const applicatorToolIdToStringMap = new Map<ApplicatorTools, string>([
142
+ [ApplicatorTools.NONE, "None"],
143
+ [ApplicatorTools.RED_37_INCH, "Red 3/7 Inch"],
144
+ [ApplicatorTools.BLUE_F16, "Blue F16"],
145
+ [ApplicatorTools.GREEN_SMALL, "Green Small"],
146
+ [ApplicatorTools.ORANGE_LARGE, "Orange Large"],
147
+ [ApplicatorTools.YELLOW_MEDIUM, "Yellow Medium"],
148
+ ]);
149
+
150
+ export const applicatorToolStringToIdMap = new Map<string, ApplicatorTools>(Array.from(applicatorToolIdToStringMap.entries()).map(([id, str]) => [str, id]));
151
+
152
+ export enum Cleaners {
153
+ NONE = 0,
154
+ SMALL = 1,
155
+ MEDIUM = 2,
156
+ LARGE = 3
157
+ }
158
+
159
+ export const cleanerIdToStringMap = new Map<Cleaners, string>([
160
+ [Cleaners.NONE, "None"],
161
+ [Cleaners.SMALL, "Small"],
162
+ [Cleaners.MEDIUM, "Medium"],
163
+ [Cleaners.LARGE, "Large"],
164
+ ]);
165
+
166
+ export const cleanerStringToIdMap = new Map<string, Cleaners>(Array.from(cleanerIdToStringMap.entries()).map(([id, str]) => [str, id]));
167
+
99
168
  export enum WeighingFingers {
100
169
  NONE = 0,
101
- RED_MEDIUM = 1,
102
- ORANGE_LARGE = 2,
103
- ORANGE_LARGE_2 = 3,
104
- BLUE_SMALL = 4,
105
- BLUE_SMALL_2 = 5,
106
- BLUE_SMALL_3 = 6,
107
- BLUE_SMALL_4 = 7
170
+ BLUE_SMALL = 1,
171
+ RED_MEDIUM = 2,
172
+ ORANGE_LARGE = 3,
108
173
  }
109
174
 
175
+ export const weighingFingerIdToStringMap = new Map<WeighingFingers, string>([
176
+ [WeighingFingers.NONE, "None"],
177
+ [WeighingFingers.RED_MEDIUM, "Red Medium"],
178
+ [WeighingFingers.ORANGE_LARGE, "Orange Large"],
179
+ [WeighingFingers.BLUE_SMALL, "Blue Small"],
180
+ ]);
181
+
182
+ export const weighingFingerStringToIdMap = new Map(
183
+ Array.from(weighingFingerIdToStringMap.entries()).map(([id, str]) => [str, id])
184
+ );
185
+
110
186
 
111
187
  export const exampleRecipe: RecipeData = {
112
188
  linerType: "CKU",
189
+ linerPotPressure: 50,
190
+ index: 1,
191
+ tubeTypeId: TubeTypes.TYPE_1340_38,
192
+ tubeTypeString: "1340-38",
113
193
  tubeOuterDiameterMax: 38.1,
114
- tubePartNumber: "11726650",
115
- setpointSpeeds: [100, 150, 200],
116
- setpointDiameters: [30.0, 28.5, 27.0],
117
- setpointDistances: [100.0, 200.0, 300.0],
118
- applicatorToolColorId: ApplicatorTools.RED_37_INCH,
119
- applicatorToolColorString: "Red 3/7 Inch",
194
+ falseBottomStaysOpen: false,
195
+
196
+ applicatorSetpoints: exampleApplicatorSetpoints,
197
+ applicatorToolId: ApplicatorTools.RED_37_INCH,
198
+ applicatorToolString: "Red 3/7 Inch",
199
+ cleanerId: Cleaners.MEDIUM,
200
+ cleanerString: "Medium",
120
201
  weighingFingerId: WeighingFingers.RED_MEDIUM,
121
202
  weighingFingerString: "Red Medium",
122
203
  numCameras: 2,
123
204
  cameraIds: [CameraIds.CAMERA_1, CameraIds.CAMERA_2],
124
- falseBottomStaysOpen: false,
205
+ cameraSpeeds: [50, 75],
206
+
125
207
  };
126
208
 
127
- const MAX_APPLICATOR_SETPOINTS = 10;
128
- const MAX_CAMERAS = 3;
129
- const MAX_NUM_RECIPES = 20;
130
-
131
209
  export const initialRecipe: RecipeData = {
210
+ index: 0,
132
211
  linerType: "",
133
212
  tubeOuterDiameterMax: 0.0,
134
- tubePartNumber: "",
135
- setpointSpeeds: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
136
- setpointDiameters: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
137
- setpointDistances: Array(MAX_APPLICATOR_SETPOINTS).fill(0),
138
- applicatorToolColorId: ApplicatorTools.NONE,
139
- applicatorToolColorString: "",
213
+ tubeTypeId: TubeTypes.NONE,
214
+ tubeTypeString: "",
215
+ linerPotPressure: 0,
216
+ applicatorSetpoints: initialApplicatorSetpoints,
217
+ applicatorToolId: ApplicatorTools.NONE,
218
+ applicatorToolString: "",
219
+ cleanerId: Cleaners.NONE,
220
+ cleanerString: "",
140
221
  weighingFingerId: WeighingFingers.NONE,
141
222
  weighingFingerString: "",
142
223
  numCameras: 0,
143
- cameraIds: Array(MAX_CAMERAS).fill(CameraIds.NONE),
224
+ cameraIds: Array(GCs.MAX_NUM_CAMERAS).fill(CameraIds.NONE),
225
+ cameraSpeeds: Array(GCs.MAX_NUM_CAMERAS).fill(0),
144
226
  falseBottomStaysOpen: false,
145
227
  };
146
228
 
@@ -151,5 +233,5 @@ export interface RecipeStore {
151
233
 
152
234
  export const initialRecipeStore: RecipeStore = {
153
235
  numRecipes: 2,
154
- recipes: Array(MAX_NUM_RECIPES).fill(exampleRecipe),
236
+ recipes: Array(GCs.MAX_NUM_RECIPES).fill(exampleRecipe),
155
237
  };