@wandelbots/wandelbots-js-react-components 1.13.3 → 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +1 -1
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingCartesianTab.tsx +4 -4
- package/src/components/jogging/JoggingOptions.tsx +10 -8
- package/src/components/jogging/JoggingPanel.tsx +3 -3
- package/src/components/jogging/JoggingStore.tsx +4 -4
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@ export const JoggingCartesianTab = observer(
|
|
|
63
63
|
|
|
64
64
|
async function connectJogger() {
|
|
65
65
|
store.jogger.setJoggingMode(
|
|
66
|
-
store.
|
|
66
|
+
store.activeDiscreteIncrement ? "increment" : "cartesian",
|
|
67
67
|
{
|
|
68
68
|
tcpId: store.selectedTcpId,
|
|
69
69
|
coordSystemId: store.activeCoordSystemId,
|
|
@@ -113,8 +113,8 @@ export const JoggingCartesianTab = observer(
|
|
|
113
113
|
|
|
114
114
|
connectJogger()
|
|
115
115
|
|
|
116
|
-
if (store.
|
|
117
|
-
return runIncrementalCartesianJog(opts, store.
|
|
116
|
+
if (store.activeDiscreteIncrement) {
|
|
117
|
+
return runIncrementalCartesianJog(opts, store.activeDiscreteIncrement)
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
if (opts.motionType === "translate") {
|
|
@@ -135,7 +135,7 @@ export const JoggingCartesianTab = observer(
|
|
|
135
135
|
async function stopJogging() {
|
|
136
136
|
if (store.isLocked) return
|
|
137
137
|
|
|
138
|
-
if (store.
|
|
138
|
+
if (store.activeDiscreteIncrement) {
|
|
139
139
|
return
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -117,7 +117,7 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
117
117
|
<InputLabel id="jogging-increment-select">{"Increment"}</InputLabel>
|
|
118
118
|
<Select
|
|
119
119
|
labelId="jogging-increment-select"
|
|
120
|
-
value={store.
|
|
120
|
+
value={store.activeDiscreteIncrement?.id || "continuous"}
|
|
121
121
|
onChange={(event) => {
|
|
122
122
|
store.setSelectedIncrementId(
|
|
123
123
|
event.target.value as IncrementOptionId,
|
|
@@ -129,13 +129,15 @@ export const JoggingOptions = observer(({ store }: { store: JoggingStore }) => {
|
|
|
129
129
|
{t("Jogging.Increment.Continuous.dd")}
|
|
130
130
|
</MenuItem>
|
|
131
131
|
|
|
132
|
-
{store.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
{store.selectedOrientation === "tool"
|
|
133
|
+
? null
|
|
134
|
+
: store.discreteIncrementOptions.map((inc) => (
|
|
135
|
+
<MenuItem key={inc.id} value={inc.id}>
|
|
136
|
+
{store.currentMotionType === "translate"
|
|
137
|
+
? `${inc.mm}mm`
|
|
138
|
+
: `${inc.degrees}°`}
|
|
139
|
+
</MenuItem>
|
|
140
|
+
))}
|
|
139
141
|
</Select>
|
|
140
142
|
</Stack>
|
|
141
143
|
</Stack>
|
|
@@ -70,7 +70,7 @@ export const JoggingPanel = externalizeComponent(
|
|
|
70
70
|
currentTab,
|
|
71
71
|
selectedTcpId,
|
|
72
72
|
activeCoordSystemId,
|
|
73
|
-
|
|
73
|
+
activeDiscreteIncrement,
|
|
74
74
|
} = state.joggingStore
|
|
75
75
|
|
|
76
76
|
if (currentTab.id !== "cartesian" && currentTab.id !== "joint") return
|
|
@@ -80,7 +80,7 @@ export const JoggingPanel = externalizeComponent(
|
|
|
80
80
|
coordSystemId: activeCoordSystemId,
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
if (
|
|
83
|
+
if (activeDiscreteIncrement && currentTab.id === "cartesian") {
|
|
84
84
|
state.joggingStore.jogger.setJoggingMode(
|
|
85
85
|
"increment",
|
|
86
86
|
cartesianJoggingOpts,
|
|
@@ -95,7 +95,7 @@ export const JoggingPanel = externalizeComponent(
|
|
|
95
95
|
state.joggingStore?.currentTab,
|
|
96
96
|
state.joggingStore?.selectedTcpId,
|
|
97
97
|
state.joggingStore?.activeCoordSystemId,
|
|
98
|
-
state.joggingStore?.
|
|
98
|
+
state.joggingStore?.activeDiscreteIncrement,
|
|
99
99
|
])
|
|
100
100
|
|
|
101
101
|
if (!state.joggingStore || state.loadingError) {
|
|
@@ -251,10 +251,10 @@ export class JoggingStore {
|
|
|
251
251
|
return keyBy(this.tcps, (tcp) => tcp.id)
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
get
|
|
255
|
-
return
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
get activeDiscreteIncrement() {
|
|
255
|
+
return this.selectedOrientation === "tool"
|
|
256
|
+
? undefined
|
|
257
|
+
: discreteIncrementOptions.find((d) => d.id === this.selectedIncrementId)
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
/** The selected rotation velocity converted to radians per second */
|