Hi all,
I have a question. I'm building up an UI for an LCD with ~6 submenus.
Now, at the beginning of the design I have a question:
I have two different approach:
1. I handle the buttons (up,down,ok,esc) in one function (the state machine). For example. When button down is pressed, the row is calculated and given to the correct submenu function which will prepare the data for the LCD.
2. The state machine just gives the button to the correct submenu function and in that function everything (like row change and so on) is calculated and than the data is prepared.
My thinking is, that the first approach will result in less code size, but is it really a good idea to use that approach or will it be to much calculation in the state machine?
I hope my question is understandable
:lol:
Regards,
Baldrian