Corpus updates and type error fixes

pull/979/head
Rick Carlino 2018-08-27 13:34:22 -05:00
parent 35218a52f0
commit 4edde35ab4
5 changed files with 28 additions and 26 deletions

View File

@ -45,7 +45,7 @@ module CeleryScriptSettingsBag
read_status reboot sync take_photo)
STEPS = %w(_if execute execute_script find_home move_absolute
move_relative read_pin send_message take_photo wait
write_pin resource_update)
write_pin transaction)
BAD_ALLOWED_PIN_MODES = '"%s" is not a valid pin_mode. Allowed values: %s'
BAD_LHS = 'Can not put "%s" into a left hand side (LHS) '\
'argument. Allowed values: %s'
@ -248,7 +248,9 @@ module CeleryScriptSettingsBag
.node(:set_servo_angle, [:pin_number, :pin_value], [])
.node(:change_ownership, [], [:pair])
.node(:dump_info, [], [])
.node(:resource_update, [:resource_type, :resource_id, :label], [:pair])
.node(:resource_update, [:resource_type, :resource_id], [:pair])
.node(:resource_deletion, [:resource_type, :resource_id], [])
.node(:transaction, [:label], [:resource_update, :resource_deletion])
.node(:install_first_party_farmware, [])
ANY_ARG_NAME = Corpus.as_json[:args].pluck("name").map(&:to_s)

View File

@ -52,7 +52,7 @@
"css-loader": "1.0.0",
"enzyme": "^3.1.0",
"enzyme-adapter-react-16": "^1.1.0",
"farmbot": "https://github.com/RickCarlino/farmbot-js.git#8a5cd5b",
"farmbot": "https://github.com/RickCarlino/farmbot-js.git#b9b65d9",
"farmbot-toastr": "^1.0.3",
"fastclick": "^1.0.6",
"file-loader": "1.1.11",

View File

@ -137,11 +137,10 @@ export function StepButtonCluster({ dispatch, current }: StepButtonProps) {
dispatch={dispatch}
current={current}
step={{
kind: "resource_update",
kind: "transaction",
args: {
resource_type: "Point",
resource_id: 0,
label: "mark_as"
resource_id: 0
}
}}
color="brown">

View File

@ -1,16 +1,17 @@
import { ResourceName, TaggedPlantPointer } from "farmbot";
import { DropDownItem } from "../../../ui";
// import { ResourceName, TaggedPlantPointer } from "farmbot";
// import { DropDownItem } from "../../../ui";
const OPTIONS: Partial<Record<ResourceName, DropDownItem[]>> = {
"Tool": [],
"Plant": [],
"Point": []
};
// const OPTIONS: Partial<Record<ResourceName, DropDownItem[]>> = {
// "Tool": [],
// "Plant": [],
// "Point": []
// };
const isWeed = (plant: TaggedPlantPointer) => {
const cb = plant.body.meta["created_by"];
if (cb == "weed-detection") {
return true;
}
return false;
};
// const isWeed = (plant: TaggedPlantPointer) => {
// const cb = plant.body.meta["created_by"];
// if (cb == "weed-detection") {
// return true;
// }
// return false;
// };
// //

View File

@ -2417,18 +2417,18 @@ farmbot-toastr@^1.0.0, farmbot-toastr@^1.0.3:
farmbot-toastr "^1.0.0"
typescript "^2.3.4"
"farmbot@https://github.com/RickCarlino/farmbot-js.git#0d25cfd":
version "6.5.0-rc4"
resolved "https://github.com/RickCarlino/farmbot-js.git#0d25cfd5a90b7c5bc297b7068498014236e3a46f"
dependencies:
mqtt "2.15.0"
"farmbot@https://github.com/RickCarlino/farmbot-js.git#8a5cd5b":
version "6.5.0-rc4"
resolved "https://github.com/RickCarlino/farmbot-js.git#8a5cd5bd907d2f73bfd879776010d16750b218b9"
dependencies:
mqtt "2.15.0"
"farmbot@https://github.com/RickCarlino/farmbot-js.git#b9b65d9":
version "6.5.0-rc5"
resolved "https://github.com/RickCarlino/farmbot-js.git#b9b65d949f7fe710afc48116207627bb270398a4"
dependencies:
mqtt "2.15.0"
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"