diff --git a/Gemfile.lock b/Gemfile.lock index 1be0396403..e0e25bfa2a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -93,7 +93,7 @@ GEM activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.3.3) + date (3.3.4) declarative (0.0.20) delayed_job (4.1.11) activesupport (>= 3.0, < 8.0) @@ -159,19 +159,19 @@ GEM webrick google-apis-iamcredentials_v1 (0.17.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) + google-apis-storage_v1 (0.29.0) + google-apis-core (>= 0.11.0, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.3.1) - google-cloud-storage (1.44.0) + google-cloud-storage (1.45.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-storage_v1 (~> 0.29.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) @@ -205,7 +205,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.21.4) + loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -221,16 +221,16 @@ GEM multipart-post (2.3.0) mutations (0.9.1) activesupport - net-imap (0.4.4) + net-imap (0.4.5) date net-protocol net-pop (0.1.2) net-protocol - net-protocol (0.2.1) + net-protocol (0.2.2) timeout net-smtp (0.4.0) net-protocol - nio4r (2.5.9) + nio4r (2.6.0) nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) orm_adapter (0.5.0) @@ -251,7 +251,7 @@ GEM faraday_middleware (~> 1.2) hashie (~> 4.1) multi_json (~> 1.15) - racc (1.7.2) + racc (1.7.3) rack (2.2.8) rack-attack (6.7.0) rack (>= 1.0, < 4) @@ -363,7 +363,7 @@ GEM thor (1.3.0) thwait (0.2.0) e2mmap - timeout (0.4.0) + timeout (0.4.1) trailblazer-option (0.1.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) diff --git a/frontend/controls/peripherals/index.tsx b/frontend/controls/peripherals/index.tsx index 69f93173e1..ab76f0412f 100644 --- a/frontend/controls/peripherals/index.tsx +++ b/frontend/controls/peripherals/index.tsx @@ -133,7 +133,7 @@ export class Peripherals
diff --git a/frontend/sequences/step_button_cluster.tsx b/frontend/sequences/step_button_cluster.tsx index 8a60205fb6..16da4a4ed3 100644 --- a/frontend/sequences/step_button_cluster.tsx +++ b/frontend/sequences/step_button_cluster.tsx @@ -2,7 +2,7 @@ import React from "react"; import { t } from "../i18next_wrapper"; import { StepButton, stepClick } from "./step_buttons"; import { equals, scrollToBottom } from "../util"; -import { Col, Row } from "../ui"; +import { Col } from "../ui"; import { Color, SequenceBodyItem, TaggedSequence } from "farmbot"; import { FarmwareData, MessageType } from "./interfaces"; import { FarmwareName } from "./step_tiles/tile_execute_script"; @@ -239,53 +239,54 @@ export class StepButtonCluster args: { sequence_id: sequences[0].body.id }, body: variableList(resources.sequenceMetas[sequences[0].uuid]) }); - const Cluster = () =>
- } - autoFocus={true} - onEnter={() => { - if (first) { - click(); - stepClick(dispatch, first, current, stepIndex)(); - } - }} - onChange={this.setSearchTerm} /> -
- {commands.map((stepButton, inx) => -
- -
)} - {!Path.inDesigner() && sequences.length > 0 && - } -
- {sequences.map((s, inx) => s.body.id && + return
+
+ } + autoFocus={Path.inDesigner()} + onEnter={() => { + if (first) { + click(); + stepClick(dispatch, first, current, stepIndex)(); + } + }} + onChange={this.setSearchTerm} /> +
+ {commands.map((stepButton, inx) =>
+ inx == 0 ? "highlight" : "", + ].join(" ")} key={inx} onClick={click}> + step={stepButton.step} + label={stepButton.title} + color={stepButton.color} />
)} + {!Path.inDesigner() && sequences.length > 0 && + } +
+ {sequences.map((s, inx) => s.body.id && +
+ +
)} +
; - return Path.inDesigner() ? : ; } } diff --git a/frontend/sequences/step_tiles/tile_lua_support.tsx b/frontend/sequences/step_tiles/tile_lua_support.tsx index b67c08724f..46dfe014cc 100644 --- a/frontend/sequences/step_tiles/tile_lua_support.tsx +++ b/frontend/sequences/step_tiles/tile_lua_support.tsx @@ -39,7 +39,7 @@ export class LuaTextArea onChange = (value: string) => { this.setState({ controlled: true }); this.setLua(value || ""); - this.updateStep(this.lua); + this.updateStep(value || ""); }; get luaCodeBuffer() { diff --git a/frontend/sequences/test_button.tsx b/frontend/sequences/test_button.tsx index ea6f6fa050..a5bf0f10cd 100644 --- a/frontend/sequences/test_button.tsx +++ b/frontend/sequences/test_button.tsx @@ -96,7 +96,7 @@ const Test = (props: TestProps) => { ? t("Close") : t("Run"); return
; }; diff --git a/frontend/wizard/data.ts b/frontend/wizard/data.ts index 7396aff850..642359ebbc 100644 --- a/frontend/wizard/data.ts +++ b/frontend/wizard/data.ts @@ -50,6 +50,15 @@ import { } from "../settings/firmware/firmware_hardware_support"; import { BooleanSetting } from "../session_keys"; import { ExternalUrl } from "../external_urls"; +import { + motorCurrentMaToPercent, motorCurrentPercentToMa, +} from "../settings/hardware_settings"; + +const motorCurrentProps = ({ + inputMax: 100, + toInput: motorCurrentMaToPercent, + fromInput: motorCurrentPercentToMa, +}); export const setupProgressString = ( results: TaggedWizardStepResult[], @@ -824,7 +833,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_STALLS, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_x", label: t("x-axis motor current") + key: "movement_motor_current_x", + label: t("x-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -833,7 +844,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_ALL_X, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_x", label: t("x-axis motor current") + key: "movement_motor_current_x", + label: t("x-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -842,10 +855,26 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_SETTINGS, video: ExternalUrl.Video.motorTuning, firmwareNumberSettings: [ - { key: "movement_min_spd_x", label: t("x-axis minimum speed") }, - { key: "movement_max_spd_x", label: t("x-axis maximum speed") }, - { key: "movement_steps_acc_dec_x", label: t("x-axis acceleration") }, - { key: "movement_motor_current_x", label: t("x-axis motor current") }, + { + key: "movement_min_spd_x", + label: t("x-axis minimum speed (mm/s)"), + scale: "x", + }, + { + key: "movement_max_spd_x", + label: t("x-axis maximum speed (mm/s)"), + scale: "x", + }, + { + key: "movement_steps_acc_dec_x", + label: t("x-axis acceleration (mm)"), + scale: "x", + }, + { + key: "movement_motor_current_x", + label: t("x-axis motor current (%)"), + ...motorCurrentProps, + }, ], }, ], @@ -864,7 +893,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_STALLS, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_y", label: t("y-axis motor current") + key: "movement_motor_current_y", + label: t("y-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -873,7 +904,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_ALL_Y_AND_Z, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_y", label: t("y-axis motor current") + key: "movement_motor_current_y", + label: t("y-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -882,10 +915,26 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_SETTINGS, video: ExternalUrl.Video.motorTuning, firmwareNumberSettings: [ - { key: "movement_min_spd_y", label: t("y-axis minimum speed") }, - { key: "movement_max_spd_y", label: t("y-axis maximum speed") }, - { key: "movement_steps_acc_dec_y", label: t("y-axis acceleration") }, - { key: "movement_motor_current_y", label: t("y-axis motor current") }, + { + key: "movement_min_spd_y", + label: t("y-axis minimum speed (mm/s)"), + scale: "y", + }, + { + key: "movement_max_spd_y", + label: t("y-axis maximum speed (mm/s)"), + scale: "y", + }, + { + key: "movement_steps_acc_dec_y", + label: t("y-axis acceleration (mm)"), + scale: "y", + }, + { + key: "movement_motor_current_y", + label: t("y-axis motor current (%)"), + ...motorCurrentProps, + }, ], }, ], @@ -904,7 +953,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_STALLS, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_z", label: t("z-axis motor current") + key: "movement_motor_current_z", + label: t("z-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -913,7 +964,9 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_ALL_Y_AND_Z, component: MotorCurrentContent, firmwareNumberSettings: [{ - key: "movement_motor_current_z", label: t("z-axis motor current") + key: "movement_motor_current_z", + label: t("z-axis motor current (%)"), + ...motorCurrentProps, }], }, { @@ -922,10 +975,26 @@ export const WIZARD_STEPS = (props: WizardStepDataProps): WizardSteps => { tips: SetupWizardContent.MOVEMENT_SETTINGS, video: ExternalUrl.Video.motorTuning, firmwareNumberSettings: [ - { key: "movement_min_spd_z", label: t("z-axis minimum speed") }, - { key: "movement_max_spd_z", label: t("z-axis maximum speed") }, - { key: "movement_steps_acc_dec_z", label: t("z-axis acceleration") }, - { key: "movement_motor_current_z", label: t("z-axis motor current") }, + { + key: "movement_min_spd_z", + label: t("z-axis minimum speed (mm/s)"), + scale: "z", + }, + { + key: "movement_max_spd_z", + label: t("z-axis maximum speed (mm/s)"), + scale: "z", + }, + { + key: "movement_steps_acc_dec_z", + label: t("z-axis acceleration (mm)"), + scale: "z", + }, + { + key: "movement_motor_current_z", + label: t("z-axis motor current (%)"), + ...motorCurrentProps, + }, ], }, ], diff --git a/frontend/wizard/interfaces.ts b/frontend/wizard/interfaces.ts index c9a4d6fcc8..a6e13aebb6 100644 --- a/frontend/wizard/interfaces.ts +++ b/frontend/wizard/interfaces.ts @@ -164,6 +164,9 @@ interface FirmwareSettingInputProps { label: string; scale?: Xyz; intSize?: "long"; + inputMax?: number; + toInput?: (input: number) => number; + fromInput?: (input: number) => number; } export interface FirmwareNumberSettingsProps { diff --git a/frontend/wizard/step_components.tsx b/frontend/wizard/step_components.tsx index 737773da2d..673d47a1f7 100644 --- a/frontend/wizard/step_components.tsx +++ b/frontend/wizard/step_components.tsx @@ -38,6 +38,9 @@ export const FirmwareNumberSettings = (props: FirmwareNumberSettingsProps) => { ? calculateScale(sourceFwConfig)[setting.scale] : undefined} intSize={setting.intSize} + inputMax={setting.inputMax} + toInput={setting.toInput} + fromInput={setting.fromInput} setting={setting.key} /> )} diff --git a/package.json b/package.json index d13c9b5dda..f7c2f123fb 100644 --- a/package.json +++ b/package.json @@ -34,30 +34,30 @@ "@blueprintjs/core": "5.6.0", "@blueprintjs/select": "5.0.17", "@monaco-editor/react": "4.6.0", - "@parcel/transformer-sass": "2.10.2", - "@parcel/transformer-typescript-tsc": "2.10.2", - "@types/lodash": "4.14.200", - "@types/markdown-it": "13.0.5", - "@types/node": "20.8.10", - "@types/promise-timeout": "1.3.2", - "@types/react": "18.2.34", - "@types/react-color": "3.0.9", - "@types/react-dom": "18.2.14", - "@types/ws": "8.5.8", - "axios": "1.6.0", + "@parcel/transformer-sass": "2.10.3", + "@parcel/transformer-typescript-tsc": "2.10.3", + "@types/lodash": "4.14.201", + "@types/markdown-it": "13.0.6", + "@types/node": "20.9.0", + "@types/promise-timeout": "1.3.3", + "@types/react": "18.2.37", + "@types/react-color": "3.0.10", + "@types/react-dom": "18.2.15", + "@types/ws": "8.5.9", + "axios": "1.6.2", "bowser": "2.11.0", "browser-speech": "1.1.1", "events": "3.3.0", "farmbot": "15.8.5", - "i18next": "23.6.0", + "i18next": "23.7.6", "lodash": "4.17.21", "markdown-it": "13.0.2", "markdown-it-emoji": "2.0.2", "moment": "2.29.4", "monaco-editor": "0.44.0", "mqtt": "5.1.4", - "npm": "10.2.3", - "parcel": "2.10.2", + "npm": "10.2.4", + "parcel": "2.10.3", "process": "0.11.10", "promise-timeout": "1.3.0", "punycode": "2.3.1", @@ -76,10 +76,10 @@ }, "devDependencies": { "@types/enzyme": "3.10.12", - "@types/jest": "29.5.7", - "@types/readable-stream": "4.0.4", - "@typescript-eslint/eslint-plugin": "6.9.1", - "@typescript-eslint/parser": "6.9.1", + "@types/jest": "29.5.8", + "@types/readable-stream": "4.0.5", + "@typescript-eslint/eslint-plugin": "6.11.0", + "@typescript-eslint/parser": "6.11.0", "@wojtekmaj/enzyme-adapter-react-17": "0.8.0", "coveralls": "3.1.1", "enzyme": "3.11.0", diff --git a/public/app-resources/img/setup_wizard/rpi_imager.png b/public/app-resources/img/setup_wizard/rpi_imager.png index 034a6e745b..2d320dfc70 100644 Binary files a/public/app-resources/img/setup_wizard/rpi_imager.png and b/public/app-resources/img/setup_wizard/rpi_imager.png differ