How would a dynamic array work?
I'll have a list of parameters 'available', and from this I want to be able to allow the selection of .. 8 .. parameters, the parameters can change at run time if the user chooses using the LCD and some push buttons.
So I can find the button push (catch interrupt), I can decide what options they are to look at by having a list and simply displaying some strings, I can display the options ( with a X next to them), what I need is some way to determine which are active - a dynamic array!. If they deselect an option, the option needs to go from the array, and the array needs to reposition contents to suit.
If they add an option to the array, it needs to get appended to the end!
Any thoughts on how that's best done?
byte[8] active_Options;
#define OPTION_1 0x01
#define OPTION_2 0x02
... and so forth to 20.
active_Options = { OPTION_1, OPTION_2, OPTION_3, OPTION_7 };