April 11, 2023 Software and Documentation Update
Today we released a new version of FarmBot OS, the web app, several of our featured sequences, and published updates to our developer documentation. Here’s what’s new:
We’ve added a new high-level
water(plant) Lua helper that moves FarmBot to above a plant and waters it based on its age and assigned watering curve. Note that plants must have a status of “Planted”, and if you’re using this with FarmBot Genesis devices you’ll need to first mount the watering nozzle tool.
Powering the new
water(plant) helper is a
dispense(mL) helper that generalizes the dispensing of liquids in milliliters by using the FLOW RATE (mL/s) field of a tool. By default, this new function uses the tool named “Watering Nozzle” operated by Pin 8, though you can customize this to use tools of different names and/or pins. Learn more in the docs and give it a try with the updated Dispense Water featured sequence.
Code from our Grid featured sequence has been converted into a general purpose Lua helper that calculates a grid of coordinates based on the provided parameters:
start , and
offset , where each parameter is a table with
y , and
z attributes. See the updated Grid featured sequence for an example, or check out the documentation.
This helper is also now used under-the-hood in the
We’ve improved upon the previous
get_job_progress() helpers with new
complete_job() Lua helpers that make job management much easier and use far fewer characters. Notably:
- You no longer need to worry about setting the
timeeach time you create or update a job - the
set_job()helper will handle this for you.
- You can now patch update jobs with a new status or percent without needing to explicitly provide all fields.
complete_job()is a handy shortcut for setting the percent to 100 and status to “Complete”.
See the updated documentation for more details!
- Added Korean translation to the app. Thank you @zaxrok on GitHub for the contribution!
- Fixed an issue with the
photo_grid()Lua helper which was miscalculating the grid and in some circumstances caused the grid to have no grid points. Note that photo grids taken with the latest version of FarmBot OS (v15.4.1) will have slightly different spacing and alignment than grids taken with earlier versions of FarmBot OS.
wait()Lua helper now automatically creates a job to track the progress of the waiting whenever the wait time is over 1000ms. See the updated developer documentation for additional details about advanced usage.
- Improved Lua developer documentation for all helper functions by adding more code examples.