Adding pressure control has ended up being a bigger project than expected. Below are the improvements so far.
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".
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.
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.
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.
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.
Adding pressure control has ended up being a bigger project than expected. Below are the improvements so far.
Overall, these changes make the firmware more flexible, both for future extensions and operations.