Skip to content

Commit 8657ea9

Browse files
committed
Finish substituting all buttons for plan running
1 parent ff842e5 commit 8657ea9

File tree

1 file changed

+54
-89
lines changed

1 file changed

+54
-89
lines changed

src/screens/OavMover.tsx

Lines changed: 54 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -273,116 +273,81 @@ export function CoordinateSystem() {
273273
return (
274274
<>
275275
<Box>
276-
<Grid2 container rowSpacing={0} spacing={1}>
276+
<Grid2 container alignItems={"center"} rowSpacing={1} spacing={0.5}>
277277
<Grid2 size={10}>
278278
<b>Co-ordinate System Setup</b>
279279
</Grid2>
280280
<Grid2>
281281
<Help onClick={handleClickOpen} />
282282
</Grid2>
283283
<Grid2 size={4}>
284-
<Button
285-
style={buttonStyle}
286-
onClick={() =>
287-
submitAndRunPlanImmediately({
288-
planName: "moveto",
289-
planParams: {
290-
place: "zero",
291-
},
292-
})
293-
}
294-
>
295-
Go to Origin
296-
</Button>
284+
<RunPlanButton
285+
btnLabel="Go to origin"
286+
planName="moveto"
287+
planParams={{ place: "zero" }}
288+
title="Go to Fiducial 0"
289+
btnVariant="contained"
290+
/>
297291
</Grid2>
298292
<Grid2 size={4}>
299-
<Button
300-
style={buttonStyle}
301-
onClick={() =>
302-
submitAndRunPlanImmediately({
303-
planName: "moveto",
304-
planParams: {
305-
place: "f1",
306-
},
307-
})
308-
}
309-
>
310-
Go to Fiducial 1
311-
</Button>
293+
<RunPlanButton
294+
btnLabel="Go to Fiducial1"
295+
planName="moveto"
296+
planParams={{ place: "f1" }}
297+
title="Go to Fiducial 1"
298+
btnVariant="contained"
299+
/>
312300
</Grid2>
313301
<Grid2 size={4}>
314-
<Button
315-
style={buttonStyle}
316-
onClick={() =>
317-
submitAndRunPlanImmediately({
318-
planName: "moveto",
319-
planParams: {
320-
place: "f2",
321-
},
322-
})
323-
}
324-
>
325-
Go to Fiducial 2
326-
</Button>
302+
<RunPlanButton
303+
btnLabel="Go to Fiducial2"
304+
planName="moveto"
305+
planParams={{ place: "f2" }}
306+
title="Go to Fiducial 2"
307+
btnVariant="contained"
308+
/>
327309
</Grid2>
328310
<Grid2 size={4}>
329-
<Button style={buttonStyle}>Set Fiducial 0</Button>
311+
<RunPlanButton
312+
btnLabel="Set Fiducial0"
313+
planName="gui_set_fiducial_0"
314+
title="Set Fiducial 0"
315+
btnVariant="contained"
316+
/>
330317
</Grid2>
331318
<Grid2 size={4}>
332-
<Button
333-
style={buttonStyle}
334-
onClick={() =>
335-
submitAndRunPlanImmediately({
336-
planName: "fiducial",
337-
planParams: {
338-
point: "1",
339-
},
340-
})
341-
}
342-
>
343-
Set Fiducial 1
344-
</Button>
319+
<RunPlanButton
320+
btnLabel="Set Fiducial1"
321+
planName="fiducial"
322+
planParams={{ point: "1" }}
323+
title="Set Fiducial 1"
324+
btnVariant="contained"
325+
/>
345326
</Grid2>
346327
<Grid2 size={4}>
347-
<Button
348-
style={buttonStyle}
349-
onClick={() =>
350-
submitAndRunPlanImmediately({
351-
planName: "fiducial",
352-
planParams: {
353-
point: "2",
354-
},
355-
})
356-
}
357-
>
358-
Set Fiducial 2
359-
</Button>
328+
<RunPlanButton
329+
btnLabel="Set Fiducial2"
330+
planName="fiducial"
331+
planParams={{ point: "2" }}
332+
title="Set Fiducial 2"
333+
btnVariant="contained"
334+
/>
360335
</Grid2>
361336
<Grid2 size={6}>
362-
<Button
363-
style={buttonStyle}
364-
onClick={() =>
365-
submitAndRunPlanImmediately({
366-
planName: "cs_maker",
367-
planParams: {},
368-
})
369-
}
370-
>
371-
Make Coordinate System
372-
</Button>
337+
<RunPlanButton
338+
btnLabel="Make Coord System"
339+
planName="cs_maker"
340+
title="Create the coordinate system on the pmac."
341+
btnVariant="contained"
342+
/>
373343
</Grid2>
374344
<Grid2 size={6}>
375-
<Button
376-
style={buttonStyle}
377-
onClick={() =>
378-
submitAndRunPlanImmediately({
379-
planName: "block_check",
380-
planParams: {},
381-
})
382-
}
383-
>
384-
Block Check
385-
</Button>
345+
<RunPlanButton
346+
btnLabel="Run block check"
347+
planName="block_check"
348+
title="Check the coordinate system was set up correctly."
349+
btnVariant="contained"
350+
/>
386351
</Grid2>
387352
</Grid2>
388353
</Box>

0 commit comments

Comments
 (0)