import * as React from "react"; import { DirectionButton } from "./direction_button"; import { homeAll, findHome } from "../../devices/actions"; import { JogMovementControlsProps } from "./interfaces"; import { getDevice } from "../../device"; import { buildDirectionProps } from "./direction_axes_props"; import { t } from "../../i18next_wrapper"; import { cameraBtnProps, } from "../../devices/components/fbos_settings/camera_selection"; const DEFAULT_STEP_SIZE = 100; /* * photo | ^ | ^ * home | < v > | v */ export function JogButtons(props: JogMovementControlsProps) { const { stepSize, xySwap, arduinoBusy, doFindHome } = props; const homeBtnAction = doFindHome ? () => findHome("all") : () => homeAll(100); const directionAxesProps = buildDirectionProps(props); const rightLeft = xySwap ? "y" : "x"; const upDown = xySwap ? "x" : "y"; const commonProps = { steps: stepSize || DEFAULT_STEP_SIZE, disabled: arduinoBusy }; const camDisabled = cameraBtnProps(props.env); return
; }