Shouldn't you have a variable that indicates which is the active buffer and have it managed it internally by the module. That way, you wouldn't need to pass the active buffer. It would be switchDoubleBuffer()
Is there a plan to include delays (1_MS_DELAY, 10_MS_DELAY, etc.) using timers at any point in time? If so, these are usually included in the Timers.h/c files.
This module is very preliminary. I don't have any feedback from flow sensor or pump yet. States may be added, but I don't currently see a need for any more. There will be a lot more detail (possibly sub-states) needed in the "control to target" state.
I thought this might be a little faster this way, but I guess this function will always be working on small memory ranges as it's used for messages - so I'll make this change as you recommended.
where does currentLampPattern.data come from? This is very confusing. It would be ideal to create simple structures. currentLampPattern is a enum. Where does .data come from? Need to make it simple.
A compound statement body does not need an if or while or for or anything - it can stand alone. That said, I temporarily commented out the check because the FPGA protocol changed and I haven't caught up with it yet so this test was failing.