import * as React from "react"; import { BooleanMCUInputGroup } from "../boolean_mcu_input_group"; import { ToolTips } from "../../../constants"; import { NumericMCUInputGroup } from "../numeric_mcu_input_group"; import { HomingRow } from "./homing_row"; import { CalibrationRow } from "./calibration_row"; import { ZeroRow } from "./zero_row"; import { disabledAxisMap } from "../axis_tracking_status"; import { HomingAndCalibrationProps } from "../interfaces"; import { Header } from "./header"; import { Collapse } from "@blueprintjs/core"; import { minFwVersionCheck } from "../../../util"; import { t } from "../../../i18next_wrapper"; export function HomingAndCalibration(props: HomingAndCalibrationProps) { const { dispatch, bot, sourceFwConfig, firmwareConfig, botDisconnected } = props; const hardware = firmwareConfig ? firmwareConfig : bot.hardware.mcu_params; const { firmware_version } = bot.hardware.informational_settings; const { homing_and_calibration } = props.bot.controlPanelState; const axisLengthIntSize = minFwVersionCheck(firmware_version, "6.0.0") ? "long" : "short"; /** * Tells us if X/Y/Z have a means of checking their position. * FARMBOT WILL CRASH INTO WALLS IF THIS IS WRONG! BE CAREFUL. */ const disabled = disabledAxisMap(hardware); return
; }