Skip to content

Commit

Permalink
Updated water()
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliana Mashon authored and Juliana Mashon committed Jul 31, 2024
1 parent 69df457 commit 0bcd5ae
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions broker_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,17 +513,14 @@ def dismount_tool(self):

self.lua(lua_code)

def water(self, x_val, y_val, z_val):
def water(self, point_id):
# Dispense water at all or single xyz coords
# No inherent return value
lua_code = f"""
local x_coord = {x_val}
local y_coord = {y_val}
local z_coord = {z_val}
plant = {{x = x_coord, y = y_coord, z = z_coord}}
plants = self.api.get_info("points", point_id)
plant_name = plants["name"]

water(plant)
lua_code = f"""
water({plant_name})
"""

self.lua(lua_code)
Expand Down

0 comments on commit 0bcd5ae

Please sign in to comment.