Timeline for Customizing system settings with defines?
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 27, 2021 at 6:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 30, 2021 at 14:38 | comment | added | user47164 | The .h is included in two source files for this project IIRC - the .ino and the library's .cpp. The array is a member of a class which is declared in the .h and populated by a member function that's defined in the .cpp. I believe the class itself is defined in the .cpp using extern. | |
May 29, 2021 at 8:14 | comment | added | Edgar Bonet | Could you add more details about how the array is declared and defined? From your description, it sound like it is defined in the .h file. From the build output, it looks like it was declared in the .h and defined in a .cpp. Or maybe the .h was included in more than one source file. | |
May 29, 2021 at 3:08 | comment | added | user47164 | I was under the impression that the #define in the .ino file would override the .h file's default define entry for all items that included it, since it was the first use of it or something. That doesn't work? | |
May 28, 2021 at 5:12 | comment | added | Juraj♦ | the #define in ino will apply only for .h included in ino, not for the same .h included in other file. the #include directive makes the whole content of .h to be copied into the file with the directive | |
S May 28, 2021 at 5:10 | history | suggested | hcheung | CC BY-SA 4.0 |
make code formatting easier to read
|
May 28, 2021 at 2:30 | review | Suggested edits | |||
S May 28, 2021 at 5:10 | |||||
May 28, 2021 at 2:14 | comment | added | user47164 | I've added information. "Fails to work" means that it won't customize the array size. I misremembered the warning/error. Some sort of array mismatch complaint, but there isn't actually anything remotely array-related on that line... | |
May 28, 2021 at 2:13 | history | edited | user47164 | CC BY-SA 4.0 |
Add more details
|
May 28, 2021 at 2:00 | comment | added | user47164 | That was the goal. I'd want the earlier one (from the .ino) to override the one in the file. | |
May 27, 2021 at 3:41 | answer | added | hcheung | timeline score: 1 | |
May 26, 2021 at 22:54 | comment | added | Dave Newton |
Define "failed to work". If the preprocessor sees a #define LISTSIZE before your file is included it would skip over your #define because it's been defined.
|
|
May 26, 2021 at 22:46 | history | asked | user47164 | CC BY-SA 4.0 |