Go Down

Topic: MENWIZ: yet another character lcd menu wizard library (Read 78 times) previous topic - next topic

tack

The other thing I meant to say; from a memory management point of.view, the smallest data in MENWIZ is an int. this is two bytes. Many of my variable values. An be contained in a uint8_t, which is half the size, but MENWIz will use an int for these values.

That's maybe a potential place you could save on some memory by allowing a smaller variable to be used. It could potentially save quite some space for some menus.

brunialti

The smallest variables in menwiz are MW_BOOLEAN  e MW_AUTO_BYTE. each one allocates dinamically 1 byte for  any required internal structure member:

typedef struct{

  MW_TYPE  type;
  void*    val;  //pointer to use variable
  void*    old; //old value
  void*    lower;  //lower limit
  void*    upper; //upper limit
  void*    incr;   //increment step

}_var;

brunialti

about default values: define default values as you declare your variables. As menwiz point to the user variable (and do not change its value at addVar time), you'll find your default values untouched. You do not need a default assignation function;
The eeprom check and mark management will be in next version of menwiz.

Silverdog63

Something strange happened:
when I try to compile the same sketch I always used I got this errors.
If I change computer, the sketch work flawlessly. I reinstalled the libraries needed on the first pc but nothing (two days ago the same file on same pc had no problems).
Any ideas ?
In file included from sketch_jan21a.ino:7:
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:134: error: 'Button' does not name a type
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:135: error: 'Button' does not name a type
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:136: error: 'Button' does not name a type
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:137: error: 'Button' does not name a type
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:138: error: 'Button' does not name a type
C:\Programmi\arduino-1.0.3\libraries\MenwizB/MENWIZ.h:139: error: 'Button' does not name a type

brunialti

#339
Jan 21, 2013, 07:01 pm Last Edit: Jan 21, 2013, 07:03 pm by brunialti Reason: 1
the ide does'nt find buttons.h library include.

That is:
- or your sketch does not include the file
- or the library is unreachable by the ide

in MENWIZ.h, if it is defined BUTTON_SUPPORT, there are instances of type Button in the referenced lines.

Go Up