Farmbot-Web-App/webpack/constants.ts

346 lines
13 KiB
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
/**
* Seems like a better idea to keep content and tooltips centralized. If we have
* the ability to keep the app safer from possible accidental breakages by
* avoiding going into components for copy changes, why not right? ¯\_()_/¯
*/
export namespace ToolTips {
// Controls
export const MOVE =
`Use these manual control buttons to move FarmBot in realtime. Press the
arrows for relative movements or type in new coordinates and press GO for an
absolute movement. Tip: Press the Home button when you are done so FarmBot
2017-07-06 20:35:25 -06:00
is ready to get back to work.`;
2017-06-29 12:54:02 -06:00
export const WEBCAM_SAVE =
2017-07-06 20:35:25 -06:00
`Press the edit button to update and save your webcam URL.`;
2017-06-29 12:54:02 -06:00
export const PERIPHERALS =
`Use these toggle switches to control FarmBot's peripherals in realtime. To
edit and create new peripherals, press the EDIT button. Make sure to turn
2017-07-06 20:35:25 -06:00
things off when you're done!`;
2017-06-29 12:54:02 -06:00
// Device
export const OS_SETTINGS =
2017-07-06 20:35:25 -06:00
`View and change device settings.`;
2017-06-29 12:54:02 -06:00
export const HW_SETTINGS =
`Change settings of your FarmBot hardware with the fields below. Caution:
Changing these settings to extreme values can cause hardware malfunction.
Make sure to test any new settings before letting your FarmBot use them
unsupervised. Tip: Recalibrate FarmBot after changing settings and test a
few sequences to verify that everything works as expected. Note: Currently
2017-07-06 20:35:25 -06:00
not all settings can be changed.`;
2017-06-29 12:54:02 -06:00
// Hardware Settings: Homing and Calibration
export const HOMING =
2017-07-06 20:35:25 -06:00
`(Alpha) If encoders or end-stops are enabled, home axis (find zero).`;
2017-06-29 12:54:02 -06:00
export const CALIBRATION =
`(Alpha) If encoders or end-stops are enabled, home axis and determine
2017-07-06 20:35:25 -06:00
maximum.`;
2017-06-29 12:54:02 -06:00
export const SET_ZERO_POSITION =
2017-07-06 20:35:25 -06:00
`Set the current location as zero.`;
2017-06-29 12:54:02 -06:00
export const FIND_HOME_ON_BOOT =
`If encoders or end-stops are enabled, find the home position when the
2017-07-06 20:35:25 -06:00
device powers on.`;
2017-06-29 12:54:02 -06:00
export const STOP_AT_HOME =
2017-07-06 20:35:25 -06:00
`Stop at the home location of the axis.`;
2017-06-29 12:54:02 -06:00
export const STOP_AT_MAX =
2017-07-06 20:35:25 -06:00
`Don't allow movement past the maximum value provided in AXIS LENGTH.`;
2017-06-29 12:54:02 -06:00
export const NEGATIVE_COORDINATES_ONLY =
`Restrict travel to negative coordinate locations. Overridden by disabling
2017-07-06 20:35:25 -06:00
STOP AT HOME.`;
2017-06-29 12:54:02 -06:00
export const LENGTH =
`Set the length of each axis to provide software limits. Used only if
2017-07-06 20:35:25 -06:00
STOP AT MAX is enabled.`;
2017-06-29 12:54:02 -06:00
export const TIMEOUT_AFTER =
2017-07-06 20:35:25 -06:00
`Amount of time to wait for a command to execute before stopping.`;
2017-06-29 12:54:02 -06:00
// Hardware Settings: Motors
export const MAX_MOVEMENT_RETRIES =
2017-07-06 20:35:25 -06:00
`Number of times to retry a movement before stopping.`;
2017-06-29 12:54:02 -06:00
2017-07-31 17:37:20 -06:00
export const E_STOP_ON_MOV_ERR =
`Emergency stop if movement is not complete after the maximum number of
retries.`;
2017-06-29 12:54:02 -06:00
export const MAX_SPEED =
2017-07-06 20:35:25 -06:00
`Maximum travel speed after acceleration in motor steps per second.`;
2017-06-29 12:54:02 -06:00
export const MIN_SPEED =
`Minimum movement speed. Also used for homing, calibration, and movements
2017-07-06 20:35:25 -06:00
across home.`;
2017-06-29 12:54:02 -06:00
export const ACCELERATE_FOR =
2017-07-06 20:35:25 -06:00
`Number of steps used for acceleration and deceleration.`;
2017-06-29 12:54:02 -06:00
export const STEPS_PER_MM =
2017-07-06 20:35:25 -06:00
`The number of motor steps required to move the axis one millimeter.`;
2017-06-29 12:54:02 -06:00
export const ALWAYS_POWER_MOTORS =
`Keep power applied to motors. Prevents slipping from gravity in certain
2017-07-06 20:35:25 -06:00
situations.`;
2017-06-29 12:54:02 -06:00
export const INVERT_MOTORS =
2017-07-06 20:35:25 -06:00
`Invert direction of motor during calibration.`;
2017-06-29 12:54:02 -06:00
export const ENABLE_X2_MOTOR =
2017-07-06 20:35:25 -06:00
`Enable use of a second x-axis motor. Connects to E0 on RAMPS.`;
2017-06-29 12:54:02 -06:00
// Hardware Settings: Encoders and Endstops
export const ENABLE_ENCODERS =
2017-07-06 20:35:25 -06:00
`(Alpha) Enable use of rotary encoders during calibration and homing.`;
2017-06-29 12:54:02 -06:00
export const ENCODER_POSITIONING =
2017-07-06 20:35:25 -06:00
`[EXPERIMENTAL] Use encoders for positioning.`;
2017-06-29 12:54:02 -06:00
export const INVERT_ENCODERS =
2017-07-06 20:35:25 -06:00
`(Alpha) Reverse the direction of encoder position reading.`;
2017-06-29 12:54:02 -06:00
export const MAX_MISSED_STEPS =
`(Alpha) Number of steps missed (determined by encoder) before motor is
2017-07-06 20:35:25 -06:00
considered to have stalled.`;
2017-06-29 12:54:02 -06:00
export const ENCODER_MISSED_STEP_DECAY =
2017-07-06 20:35:25 -06:00
`(Alpha) Reduction to missed step total for every good step.`;
2017-06-29 12:54:02 -06:00
export const ENCODER_SCALING =
`(Alpha) encoder scaling factor = 100 * (motor resolution * microsteps) /
2017-07-06 20:35:25 -06:00
(encoder resolution).`;
2017-06-29 12:54:02 -06:00
export const ENABLE_ENDSTOPS =
2017-07-06 20:35:25 -06:00
`Enable use of electronic end-stops during calibration and homing.`;
2017-06-29 12:54:02 -06:00
export const INVERT_ENDPOINTS =
2017-07-06 20:35:25 -06:00
`Swap axis end-stops during calibration.`;
2017-06-29 12:54:02 -06:00
// Farmware
export const FARMWARE =
2017-07-06 20:35:25 -06:00
`Manage Farmware (plugins).`;
2017-06-29 12:54:02 -06:00
export const PHOTOS =
2017-07-06 20:35:25 -06:00
`Take and view photos with your FarmBot's camera.`;
2017-06-29 12:54:02 -06:00
export const WEED_DETECTOR =
`Detect weeds using FarmBot's camera and display them on the Farm Designer
2017-07-06 20:35:25 -06:00
map.`;
2017-06-29 12:54:02 -06:00
export const CAMERA_CALIBRATION =
2017-07-06 20:35:25 -06:00
`Calibrate FarmBot's camera for use in the weed detection software.`;
2017-06-29 12:54:02 -06:00
// Sequences
export const SEQUENCE_COMMANDS =
`These are the most basic commands FarmBot can execute. Drag and drop them
to create sequences for watering, planting seeds, measuring soil properties,
2017-07-06 20:35:25 -06:00
and more.`;
2017-06-29 12:54:02 -06:00
export const SEQUENCE_EDITOR =
`Drag and drop commands here to create sequences for watering, planting
seeds, measuring soil properties, and more. Press the Test button to
immediately try your sequence with FarmBot. You can also edit, copy, and
delete existing sequences; assign a color; and give your commands custom
2017-07-06 20:35:25 -06:00
names.`;
2017-06-29 12:54:02 -06:00
export const SEQUENCE_LIST =
2017-07-06 20:35:25 -06:00
`Here is the list of all of your sequences. Click one to edit.`;
2017-06-29 12:54:02 -06:00
export const MOVE_ABSOLUTE =
`The Move Absolute step instructs FarmBot to move to the specified
coordinate regardless of the current position. For example, if FarmBot is
currently at X=1000, Y=1000 and it receives a Move Absolute where X=0 and
Y=3000, then FarmBot will move to X=0, Y=3000. If FarmBot must move in
multiple directions, it will move diagonally. If you require straight
movements along one axis at a time, use multiple Move Absolute steps.
Offsets allow you to more easily instruct FarmBot to move to a location,
but offset from it by the specified amount. For example moving to just
above where a peripheral is located. Using offsets lets FarmBot do the
2017-07-06 20:35:25 -06:00
math for you.`;
2017-06-29 12:54:02 -06:00
export const MOVE_RELATIVE =
`The Move Relative step instructs FarmBot to move the specified distance
from its current location. For example, if FarmBot is currently at X=1000,
Y=1000 and it receives a Move Relative where X=0 and Y=3000, then FarmBot
will move to X=1000, Y=4000. If FarmBot must move in multiple directions,
it will move diagonally. If you require straight movements along one axis
at a time, use multiple Move Relative steps. Move Relative steps should be
preceded by a Move Absolute step to ensure you are starting from a known
2017-07-06 20:35:25 -06:00
location.`;
2017-06-29 12:54:02 -06:00
export const WRITE_PIN =
`The Write Pin step instructs FarmBot to set the specified pin on the
2017-08-10 15:46:20 -06:00
Arduino to the specified mode and value. Use the digital pin mode for
on (1) and off (0) control, and analog pin mode for PWM (pulse width
modulation) (0-255).`;
2017-06-29 12:54:02 -06:00
export const READ_PIN =
`The Read Pin step instructs FarmBot to read the current value of the
2017-08-10 15:46:20 -06:00
specified pin. Pin Mode: Use digital for a 0 (LOW) or 1 (HIGH) response,
and analog for a voltage reading (0-1023 for 0-5V).`;
2017-06-29 12:54:02 -06:00
export const WAIT =
`The Wait step instructs FarmBot to wait for the specified amount of time.
Use it in combination with the Pin Write step to water for a length of
2017-07-06 20:35:25 -06:00
time.`;
2017-06-29 12:54:02 -06:00
export const SEND_MESSAGE =
`The Send Message step instructs FarmBot to send a custom message to the
logs (and toast message and/or email, if selected). This can help you with
2017-07-06 20:35:25 -06:00
debugging your sequences.`;
2017-06-29 12:54:02 -06:00
export const FIND_HOME =
`The Find Home step instructs the device to perform a homing command to
2017-07-06 20:35:25 -06:00
find and set zero for the chosen axis or axes.`;
2017-06-29 12:54:02 -06:00
export const IF =
`Execute a sequence if a condition is satisfied. If the condition is not
2017-07-06 20:35:25 -06:00
satisfied, chose to do nothing or execute a different sequence.`;
2017-06-29 12:54:02 -06:00
export const EXECUTE_SCRIPT =
`The Run Farmware step runs a Farmware package. The weed detection script
is the only script supported at the moment, but user definable script
2017-07-06 20:35:25 -06:00
support is coming soon!`;
2017-06-29 12:54:02 -06:00
export const TAKE_PHOTO =
`Snaps a photo using the device camera. Select the camera type on the
2017-07-06 20:35:25 -06:00
Device page.`;
2017-06-29 12:54:02 -06:00
// Regimens
export const BULK_SCHEDULER =
`Add sequences to your regimen by selecting a sequence from the drop down,
specifying a time, choosing which days it should run on, and then clicking
the + button. For example: a Seeding sequence might be scheduled for Day 1,
2017-07-06 20:35:25 -06:00
while a Watering sequence would be scheduled to run every other day.`;
2017-06-29 12:54:02 -06:00
export const REGIMEN_EDITOR =
`Regimens allow FarmBot to take care of a plant throughout its entire life.
A regimen consists of many sequences that are scheduled to run based on the
age of the plant. Regimens are applied to plants from the farm designer
(coming soon) and can be re-used on many plants growing at the same or
2017-07-06 20:35:25 -06:00
different times. Multiple regimens can be applied to any one plant.`;
2017-06-29 12:54:02 -06:00
export const REGIMEN_LIST =
2017-07-06 20:35:25 -06:00
`This is a list of all of your regimens. Click one to begin editing it.`;
2017-06-29 12:54:02 -06:00
// Tools
export const TOOL_LIST =
`This is a list of all your FarmBot Tools. Click the Edit button to add,
2017-07-06 20:35:25 -06:00
edit, or delete tools.`;
2017-06-29 12:54:02 -06:00
export const TOOLBAY_LIST =
`Toolbays are where you store your FarmBot Tools. Each Toolbay has Slots
that you can put your Tools in, which should be reflective of your real
2017-07-06 20:35:25 -06:00
FarmBot hardware configuration.`;
2017-06-29 12:54:02 -06:00
}
export namespace Content {
// Account
export const ACCOUNT_DELETE_WARNING =
`WARNING! Deleting your account will permanently delete all of your
Sequences , Regimens, Events, and Farm Designer data.Upon deleting your
account, FarmBot will cease to function and become inaccessible until it is
paired with another web app account. To do this, you will need to reboot
your FarmBot so that is goes back into configuration mode for pairing with
another user account. When this happens, all of the data on your FarmBot
will be overwritten with the new account's data. If the account is brand
2017-07-06 20:35:25 -06:00
new, then FarmBot will become a blank slate.`;
2017-06-29 12:54:02 -06:00
// Controls
export const FACTORY_RESET_WARNING =
`Factory resetting your FarmBot will destroy all data on the device,
revoking your FarmBot's abilily to connect to your web app account and your
home wifi. Upon factory resetting, your device will restart into
Configurator mode. Factory resetting your FarmBot will not affect any data
or settings from your web app account, allowing you to do a complete restore
2017-07-06 20:35:25 -06:00
to your device once it is back online and paired with your web app
account.`;
2017-06-29 12:54:02 -06:00
// Experimental Warning
export const EXPERIMENTAL_WARNING =
`Warning! This is an EXPERIMENTAL feature. This feature may be broken and may
break or otherwise hinder your usage of the rest of the app. This feature may
disappear or break at any time.`;
2017-08-11 14:52:16 -06:00
// Home on boot warning
export const HOME_ON_BOOT_WARNING =
`Warning! This will perform homing on all axes when the device powers on.
Encoders or endstops must be enabled. It is recommended to make sure
homing works properly before enabling this feature.`;
2017-06-29 12:54:02 -06:00
}
2017-07-06 13:50:07 -06:00
export enum Actions {
2017-06-29 12:54:02 -06:00
// Resources
2017-07-06 13:50:07 -06:00
DESTROY_RESOURCE_OK = "DESTROY_RESOURCE_OK",
INIT_RESOURCE = "INIT_RESOURCE",
SAVE_SPECIAL_RESOURCE = "SAVE_SPECIAL_RESOURCE",
SAVE_RESOURCE_OK = "SAVE_RESOURCE_OK",
UPDATE_RESOURCE_OK = "UPDATE_RESOURCE_OK",
EDIT_RESOURCE = "EDIT_RESOURCE",
OVERWRITE_RESOURCE = "OVERWRITE_RESOURCE",
SAVE_RESOURCE_START = "SAVE_RESOURCE_START",
RESOURCE_READY = "RESOURCE_READY",
_RESOURCE_NO = "*_RESOURCE_NO",
2017-06-29 12:54:02 -06:00
// Auth
2017-07-06 13:50:07 -06:00
LOGIN_OK = "LOGIN_OK",
2017-06-29 12:54:02 -06:00
// Config
2017-07-06 13:50:07 -06:00
CHANGE_API_PORT = "CHANGE_API_PORT",
CHANGE_API_HOST = "CHANGE_API_HOST",
LOGOUT = "LOGOUT",
2017-06-29 12:54:02 -06:00
// Devices
2017-07-06 13:50:07 -06:00
TOGGLE_CONTROL_PANEL_OPTION = "TOGGLE_CONTROL_PANEL_OPTION",
2017-08-08 10:34:06 -06:00
SET_MQTT_STATUS = "TOGGLE_MQTT",
2017-07-06 13:50:07 -06:00
CHANGE_STEP_SIZE = "CHANGE_STEP_SIZE",
SETTING_UPDATE_START = "SETTING_UPDATE_START",
SETTING_UPDATE_END = "SETTING_UPDATE_END",
BOT_CHANGE = "BOT_CHANGE",
FETCH_OS_UPDATE_INFO_OK = "FETCH_OS_UPDATE_INFO_OK",
FETCH_FW_UPDATE_INFO_OK = "FETCH_FW_UPDATE_INFO_OK",
SET_SYNC_STATUS = "SET_SYNC_STATUS",
INVERT_JOG_BUTTON = "INVERT_JOG_BUTTON",
2017-08-02 15:59:18 -06:00
DISPLAY_ENCODER_DATA = "DISPLAY_ENCODER_DATA",
2017-06-29 12:54:02 -06:00
// Draggable
2017-07-06 13:50:07 -06:00
PUT_DATA_XFER = "PUT_DATA_XFER",
DROP_DATA_XFER = "DROP_DATA_XFER",
2017-06-29 12:54:02 -06:00
// Designer
2017-07-06 13:50:07 -06:00
SEARCH_QUERY_CHANGE = "SEARCH_QUERY_CHANGE",
SELECT_PLANT = "SELECT_PLANT",
TOGGLE_HOVERED_PLANT = "TOGGLE_HOVERED_PLANT",
UPDATE_BOT_ORIGIN_QUADRANT = "UPDATE_BOT_ORIGIN_QUADRANT",
UPDATE_MAP_ZOOM_LEVEL = "UPDATE_MAP_ZOOM_LEVEL",
OF_SEARCH_RESULTS_OK = "OF_SEARCH_RESULTS_OK",
2017-06-29 12:54:02 -06:00
// Regimens
2017-07-06 13:50:07 -06:00
PUSH_WEEK = "PUSH_WEEK",
POP_WEEK = "POP_WEEK",
2017-07-21 13:06:16 -06:00
DESELECT_ALL_DAYS = "DESELECT_ALL_DAYS",
SELECT_ALL_DAYS = "SELECT_ALL_DAYS",
2017-07-06 13:50:07 -06:00
TOGGLE_DAY = "TOGGLE_DAY",
SELECT_REGIMEN = "SELECT_REGIMEN",
SET_SEQUENCE = "SET_SEQUENCE",
SET_TIME_OFFSET = "SET_TIME_OFFSET",
2017-06-29 12:54:02 -06:00
// Sequences
2017-07-06 13:50:07 -06:00
SELECT_SEQUENCE = "SELECT_SEQUENCE",
2017-06-29 12:54:02 -06:00
// Farmware
2017-07-06 13:50:07 -06:00
SELECT_IMAGE = "SELECT_IMAGE",
2017-06-29 12:54:02 -06:00
}