Farmbot-Web-App/frontend/farmware/weed_detector/constants.ts

44 lines
1.2 KiB
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
import { DropDownItem } from "../../ui/index";
import { SPECIAL_VALUES } from "./remote_env/constants";
2019-04-02 13:59:37 -06:00
import { t } from "../../i18next_wrapper";
2017-06-29 12:54:02 -06:00
/** Mapping of SPECIAL_VALUE numeric codes into corresponding drop down items. */
export const SPECIAL_VALUE_DDI: { [index: number]: DropDownItem } = {
2017-06-29 12:54:02 -06:00
[SPECIAL_VALUES.X]: {
label: "X",
value: SPECIAL_VALUES.X
},
[SPECIAL_VALUES.Y]: {
label: "Y",
value: SPECIAL_VALUES.Y
},
[SPECIAL_VALUES.TOP_LEFT]: {
2018-02-27 10:49:37 -07:00
label: t("Top Left"),
2017-06-29 12:54:02 -06:00
value: SPECIAL_VALUES.TOP_LEFT
},
[SPECIAL_VALUES.TOP_RIGHT]: {
2018-02-27 10:49:37 -07:00
label: t("Top Right"),
2017-06-29 12:54:02 -06:00
value: SPECIAL_VALUES.TOP_RIGHT
},
[SPECIAL_VALUES.BOTTOM_LEFT]: {
2018-02-27 10:49:37 -07:00
label: t("Bottom Left"),
2017-06-29 12:54:02 -06:00
value: SPECIAL_VALUES.BOTTOM_LEFT
},
[SPECIAL_VALUES.BOTTOM_RIGHT]: {
2018-02-27 10:49:37 -07:00
label: t("Bottom Right"),
2017-06-29 12:54:02 -06:00
value: SPECIAL_VALUES.BOTTOM_RIGHT
},
2017-08-23 16:26:09 -06:00
};
2017-06-29 12:54:02 -06:00
export const CALIBRATION_DROPDOWNS: DropDownItem[] = [
SPECIAL_VALUE_DDI[SPECIAL_VALUES.X],
SPECIAL_VALUE_DDI[SPECIAL_VALUES.Y]
];
export const ORIGIN_DROPDOWNS: DropDownItem[] = [
SPECIAL_VALUE_DDI[SPECIAL_VALUES.TOP_LEFT],
SPECIAL_VALUE_DDI[SPECIAL_VALUES.TOP_RIGHT],
SPECIAL_VALUE_DDI[SPECIAL_VALUES.BOTTOM_LEFT],
SPECIAL_VALUE_DDI[SPECIAL_VALUES.BOTTOM_RIGHT],
];