Skip to content

Commit 0bcd5ae

Browse files
Juliana MashonJuliana Mashon
Juliana Mashon
authored and
Juliana Mashon
committed
Updated water()
1 parent 69df457 commit 0bcd5ae

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

broker_functions.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -513,17 +513,14 @@ def dismount_tool(self):
513513

514514
self.lua(lua_code)
515515

516-
def water(self, x_val, y_val, z_val):
516+
def water(self, point_id):
517517
# Dispense water at all or single xyz coords
518518
# No inherent return value
519-
lua_code = f"""
520-
local x_coord = {x_val}
521-
local y_coord = {y_val}
522-
local z_coord = {z_val}
523-
524-
plant = {{x = x_coord, y = y_coord, z = z_coord}}
519+
plants = self.api.get_info("points", point_id)
520+
plant_name = plants["name"]
525521

526-
water(plant)
522+
lua_code = f"""
523+
water({plant_name})
527524
"""
528525

529526
self.lua(lua_code)

0 commit comments

Comments
 (0)