Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
step={{
kind: "move_absolute",
args: {
location: {
kind: "coordinate",
args: { x: 0, y: 0, z: 0 }
},
offset: {
kind: "coordinate",
args: {
x: 0,
y: 0,
z: 0
},
},
speed: CONFIG_DEFAULTS.speed
}
}}
color="blue">
{t("MOVE ABSOLUTE")}
,
{t("MOVE RELATIVE")}
,
import * as React from "react";
import { t } from "i18next";
import { HomingRowProps } from "../interfaces";
import { LockableButton } from "../lockable_button";
import { axisTrackingStatus } from "../axis_tracking_status";
import { ToolTips } from "../../../constants";
import { SpacePanelToolTip } from "../space_panel_tool_tip";
import { Row, Col } from "../../../ui/index";
import { CONFIG_DEFAULTS } from "farmbot/dist/config";
import { commandErr } from "../../actions";
import { Axis } from "../../interfaces";
import { getDevice } from "../../../device";
const speed = CONFIG_DEFAULTS.speed;
const findHome = (axis: Axis) => getDevice()
.findHome({ speed, axis })
.catch(commandErr("'Find Home' request"));
export function HomingRow(props: HomingRowProps) {
const { hardware, botDisconnected } = props;
return
<label>
{t("HOMING")}
</label>
{axisTrackingStatus(hardware)
.map((row) => {
export function findHome(axis: Axis, speed = CONFIG_DEFAULTS.speed) {
const noun = t("'Find Home' command");
getDevice()
.findHome({ axis, speed })
.catch(commandErr(noun));
}
export function StepButtonCluster(props: StepButtonProps) {
const { dispatch, current, shouldDisplay, stepIndex } = props;
const commonStepProps = { dispatch, current, index: stepIndex };
const ALL_THE_BUTTONS = [
{t("MOVE TO")}
,
{t("MOVE RELATIVE")}
,
x: 0,
y: 0,
z: 0
},
},
speed: CONFIG_DEFAULTS.speed
}
}}
color="blue">
{t("MOVE ABSOLUTE")}
,
{t("MOVE RELATIVE")}
,
{t("WRITE PIN")}
,
import * as React from "react";
import { HomingRowProps } from "../interfaces";
import { LockableButton } from "../lockable_button";
import { axisTrackingStatus } from "../axis_tracking_status";
import { ToolTips } from "../../../constants";
import { Row, Col, Help } from "../../../ui/index";
import { CONFIG_DEFAULTS } from "farmbot/dist/config";
import { commandErr } from "../../actions";
import { Axis } from "../../interfaces";
import { getDevice } from "../../../device";
import { t } from "../../../i18next_wrapper";
import { Position } from "@blueprintjs/core";
const speed = CONFIG_DEFAULTS.speed;
const findHome = (axis: Axis) => getDevice()
.findHome({ speed, axis })
.catch(commandErr("'Find Home' request"));
export function HomingRow(props: HomingRowProps) {
const { hardware, botDisconnected } = props;
return
<label>
{t("HOMING")}
</label>
{axisTrackingStatus(hardware)
.map((row) => {
{t("MOVE TO")}
,
{t("MOVE RELATIVE")}
,
{t("CONTROL PERIPHERAL")}
,
sendCommand = () => {
const payload: Payl = { speed: CONFIG_DEFAULTS.speed, x: 0, y: 0, z: 0 };
payload[this.props.axis] = calculateDistance(this.props);
moveRelative(payload);
}