How to use the farmbot/dist/config.CONFIG_DEFAULTS.speed function in farmbot

To help you get started, we’ve selected a few farmbot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github FarmBot / Farmbot-Web-App / webpack / sequences / step_button_cluster.tsx View on Github external
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")}
    ,
github FarmBot / Farmbot-Web-App / webpack / devices / components / hardware_settings / homing_row.tsx View on Github external
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) =&gt; {
github FarmBot / Farmbot-Web-App / frontend / devices / actions.ts View on Github external
export function findHome(axis: Axis, speed = CONFIG_DEFAULTS.speed) {
  const noun = t("'Find Home' command");
  getDevice()
    .findHome({ axis, speed })
    .catch(commandErr(noun));
}
github FarmBot / Farmbot-Web-App / frontend / sequences / step_button_cluster.tsx View on Github external
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")}
    ,
github FarmBot / Farmbot-Web-App / webpack / sequences / step_button_cluster.tsx View on Github external
x: 0,
              y: 0,
              z: 0
            },
          },
          speed: CONFIG_DEFAULTS.speed
        }
      }}
      color="blue"&gt;
      {t("MOVE ABSOLUTE")}
    ,
    
      {t("MOVE RELATIVE")}
    ,
    
      {t("WRITE PIN")}
    ,
github FarmBot / Farmbot-Web-App / frontend / devices / components / hardware_settings / homing_row.tsx View on Github external
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) =&gt; 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) =&gt; {
github FarmBot / Farmbot-Web-App / frontend / sequences / step_button_cluster.tsx View on Github external
{t("MOVE TO")}
    ,
    
      {t("MOVE RELATIVE")}
    ,
    
      {t("CONTROL PERIPHERAL")}
    ,
github FarmBot / Farmbot-Web-App / frontend / controls / move / direction_button.tsx View on Github external
sendCommand = () => {
    const payload: Payl = { speed: CONFIG_DEFAULTS.speed, x: 0, y: 0, z: 0 };
    payload[this.props.axis] = calculateDistance(this.props);
    moveRelative(payload);
  }