Skip to content

Add 72x40 display#5546

Open
andbad wants to merge 11 commits into
letscontrolit:megafrom
andbad:andbad-72x40
Open

Add 72x40 display#5546
andbad wants to merge 11 commits into
letscontrolit:megafrom
andbad:andbad-72x40

Conversation

@andbad
Copy link
Copy Markdown

@andbad andbad commented May 12, 2026

I added the 72x40 display for ESP32-C3 dev board like this:
https://emalliab.wordpress.com/2025/02/12/esp32-c3-0-42-oled/

Comment thread src/src/PluginStructs/P036_data_struct.h
@andbad andbad closed this May 12, 2026
@andbad andbad reopened this May 12, 2026
Comment thread src/src/PluginStructs/P036_data_struct.cpp Outdated
@TD-er
Copy link
Copy Markdown
Member

TD-er commented May 12, 2026

I assume you did test it yourself on your board after these last changes?

Comment on lines +73 to 75
F("64x48"),
F("72x40") };
FormSelectorOptions selector(NR_ELEMENTS(options3), options3, values);
Copy link
Copy Markdown
Contributor

@tonhuisman tonhuisman May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the way this is constructed, this will crash when configuring the display configuration in P023, as that plugin won't provide the 4th option value.
I think the number of items to display in the selector will have to be added as a new argument to the function, can default to 3, for 'other plugins using this function', and from P036 a value of 4 should be provided (or the length of the values array, like NR_ELEMENTS(optionValues)).

Copy link
Copy Markdown
Contributor

@tonhuisman tonhuisman May 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you can change the signature for the function, having const int values[] (also in the .h file), and take the NR_ELEMENTS(values) instead of NR_ELEMENTS(options3), that would be an easier change 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants