struct F4Utft {
String name;
int x;
int y;
String formatName;
};
static struct F4Utft m01 = {"selStats", 15, 195, "BigFontS"};
static struct F4Utft m02 = {"selGraph", 215, 195, "BigFontS"};
static struct F4Utft m03 = {"line2", 15, 185, "None"};
struct F4Utft *Def_Menu[] = {&m01, &m02, &m03};
void setup() {
// For debugging messages
Serial.begin(57600);
Serial.println("--->" + Def_Menu[1]->formatName);
Serial.println("--->" + String(test(Def_Menu)));
}
void loop() {
while (true) {
}
}
String test(struct F4Utft** menu) {
return(menu[1]->formatName);
}
String name;
int x;
int y;
String formatName;
};
static struct F4Utft m01 = {"selStats", 15, 195, "BigFontS"};
static struct F4Utft m02 = {"selGraph", 215, 195, "BigFontS"};
static struct F4Utft m03 = {"line2", 15, 185, "None"};
struct F4Utft *Def_Menu[] = {&m01, &m02, &m03};
void setup() {
// For debugging messages
Serial.begin(57600);
Serial.println("--->" + Def_Menu[1]->formatName);
Serial.println("--->" + String(test(Def_Menu)));
}
void loop() {
while (true) {
}
}
String test(struct F4Utft** menu) {
return(menu[1]->formatName);
}
The initializer gave me fits and there is another format (single statement with a structure declaration before each entry) that I liked better could not get to work...but this does so I am happy and can move on!
My next challenge is to try and understand why I can not seem to put this resultant structure into PROGMEM without it killing my script.......arghhhhh!
No comments:
Post a Comment