hallboyone / RaspberryLatte

A full stack suite to add smarts to a single boiler espresso machine using a Raspberry Pi Pico as the brains.
MIT License
15 stars 1 forks source link

Enhancement pressure control #22

Closed hallboyone closed 1 year ago

hallboyone commented 1 year ago

Adding pressure control has ended up being a bigger project than expected. Below are the improvements so far.

  1. Overhauled auto brew library with reference styles (i.e. is the leg tracking a power settings, a flow, or a pressure?) ending triggers, and timeouts. This was merged during a previous "cleanup".
  2. Updated the local_ui library to provide action folders with a caller defined integer data field. This made it much easier to know which folder was calling the callback and, therefore, which setting to update.
  3. Overhaul of machine_setting library. Instead of an internally managed array linked to an externally visible struct, a getter function is now used to retrieve values using an enumerated list of setting ID's. I also added settings for 9 auto brew legs requiring a total of 63 new setting values.
  4. How the auto brew routine is built in espresso_machine.c has been updated to use all the new changes above. Instead of a rigid structure, it now loops through the settings for the 9 possible legs and constructs a new leg if they have a non-zero timeout. This lets the user have much greater flexibility (though, I will admit, it is a pain setting it up using the local_ui, but this will be fixed when a mobile UI is added).

Overall, these changes make the firmware more flexible, both for future extensions and operations.

hallboyone commented 1 year ago

This branch hasn't been extensively tested, but I am waiting on my grinder and have some other things I want to work on. It'll be easiest to merge this and then make new branches from development.