Add 72x40 display#5546
Conversation
|
I assume you did test it yourself on your board after these last changes? |
| F("64x48"), | ||
| F("72x40") }; | ||
| FormSelectorOptions selector(NR_ELEMENTS(options3), options3, values); |
There was a problem hiding this comment.
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)).
There was a problem hiding this comment.
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 😉
There was a problem hiding this comment.
I finally took some time to try this on actual hardware, and the above suggestion (of course) won't work as C/C++ doesn't allow for a dynamic array as a method argument 🫣 so I introduced an extra argument for the size of the selector-array, that defaults to 3.
Then it does work as intended, without breaking P023, that uses the same size selector function.
There was a problem hiding this comment.
Here's the diff for the changes that I made. You can place the attached file in the base directory of your repo, and from the VSCode terminal use this command:
git apply PR5546-OLedFormSizes.txt
PR5546-OLedFormSizes.txt
(Github doesn't allow a .diff file, but the content is in the default git diff format)
There was a problem hiding this comment.
Thank you.
Unfortunately, my environment no longer allows me to properly compile firmware for my hardware (even in the main branch) after I updated to the latest version. This appears to be due to compatibility issues with the ExpressIf platform. I've wasted some time and tokens trying to resolve the issue, but I'm still only halfway there.
But I digress.
Anyway, I applied your changes.
I hope all is well.
By(t)e
There was a problem hiding this comment.
NB: The 00.138 : (256100) Error | FS : Error while reading/writing devsecurity.dat in 2138 in your log is because the devsecurity.dat file doesn't exist yet on your unit, I also don't have it on my test-unit, and see the same message. This is not causing any issues.
There was a problem hiding this comment.
- I installed previous version of ESPEasy. Anyway, if I install stable version with web-flasher, it works. I can connect to default AP and flash you .bin file. The upgrade completed successfully, but in the serial log i find the same error.
- I erased all flash in ESPConnect tool (thank you, I didn't know that), then I flashed factory.bin file. No lucky.
There was a problem hiding this comment.
Well, it is possible that it's hardware-related.
Do you have another board, preferably from a different manufacturer, or with a different ESP32 chip, to test this build on? I can create that build for you, of course.
NB: The board I've used for testing is this one: https://aliexpress.com/item/1005010315154730.html
NB2: Have you also tried using the latest beta build (without support for this display, of course)?
Available from https://TD-er.nl/ESPEasy/latest/
There was a problem hiding this comment.
I have two boards, both like the one you have. One looks identical, the other has some SMD components (I'm not sure if they're resistors or something) arranged slightly differently.
I tried installing the beta Display-A version on both.
Neither works.
[11:03:58] INIT : Booting version: ESP_Easy_mega_20260520_display_A_ESP32c3_4M316k, (GitHub Actions) HEAD_4978f02 (ESP32 SDK 5.5.4.260518)
[11:03:58] 00.061 : (258864) Info | INIT : Free RAM:258940
[11:03:58] 00.063 : (258780) Info | INIT : Manual Reboot #13 - Restart Reason: CPU0: usb uart reset digital core
[11:03:58] 00.073 : >
[11:03:58] Build changed!
[11:03:58] 00.129 : (256424) Info | ESPEasy console using ESPEasySerial
[11:03:58] 00.151 : (256404) Info | ESPEasy console fallback enabled
[11:03:58] 00.154 : (256236) Error | FS : Error while reading/writing security.dat in 2138
[11:03:58] 00.156 : (255960) Error | FS : Error while reading/writing security.dat in 2138
[11:03:58] 00.159 : (255932) Error | FS : Error while reading/writing devsecurity.dat in 2138
[11:03:58] 00.161 : (256088) Info | INIT : Check for Priority tasks
[11:03:59] 00.162 : (256088) Info | INIT : SPI not enabled
[11:03:59] 00.164 : >
[11:03:59] PID:0
[11:04:00] 00.164 : > Version:0
[11:04:00] 00.164 : > INIT : Incorrect PID or version!
[11:04:00] 01.165 : > RESET: Resetting factory defaults... using default settings
[11:04:00] 02.166 : > RESET: Warm boot, reset count: 3
[11:04:00] 02.167 : > RESET: Too many resets, protecting your flash memory (powercycle to solve this)
[11:04:00] 02.178 : (255896) Info | ESPEasy console using ESPEasySerial
[11:04:00] 02.200 : (255896) Info | ESPEasy console fallback enabled
[11:04:00] 02.213 : (255896) Info | ESPEasy console using ESPEasySerial
[11:04:00] 02.235 : (255896) Info | ESPEasy console fallback enabled
[11:04:01] 03.202 : (255512) Info | WiFi : Set state from: Disabled to: STA_Scanning timeout: 10000
[11:04:01] 03.304 : (255596) Info | WiFi: Disconnected. Connected for: 00.000 sec
[11:04:01] 03.303 : (255596) Info | WIFI : Set WiFi to STA
[11:04:01] 03.312 : (216100) Info | WIFI_READY
[11:04:03] 03.569 : (213216) Info | WD : Uptime 0 FreeMem 213336
[11:04:03] 05.152 : (211348) Info | SCAN_DONE
[11:04:03] 05.165 : (211952) Info | WiFi : Set state from: STA_Scanning to: AP_Fallback timeout: 60000
[11:04:03] 05.180 : (208372) Info | WIFI : AP Mode enabled. SSID: ESPEasy- IP: 0.0.0.0 ch: 1dhcps_start(): could not obtain pcb
[11:04:03] 05.182 : (208000) Error | WIFI : Failed to enable AP Captive Portal
[11:04:03] 05.184 : (203300) Info | AP: Disconnected. Connected for: 00.000 sec
[11:04:03] 05.190 : (197496) Info | Webserver: start
There was a problem hiding this comment.
I have two boards, both like the one you have. One looks identical, the other has some SMD components (I'm not sure if they're resistors or something) arranged slightly differently.
I tried installing the beta Display-A version on both.
Neither works.
[11:03:58] INIT : Booting version: ESP_Easy_mega_20260520_display_A_ESP32c3_4M316k, (GitHub Actions) HEAD_4978f02 (ESP32 SDK 5.5.4.260518)
[11:03:58] 00.061 : (258864) Info | INIT : Free RAM:258940
[11:03:58] 00.063 : (258780) Info | INIT : Manual Reboot #13 - Restart Reason: CPU0: usb uart reset digital core
[11:03:58] 00.073 : >
[11:03:58] Build changed!
[11:03:58] 00.129 : (256424) Info | ESPEasy console using ESPEasySerial
[11:03:58] 00.151 : (256404) Info | ESPEasy console fallback enabled
[11:03:58] 00.154 : (256236) Error | FS : Error while reading/writing security.dat in 2138
[11:03:58] 00.156 : (255960) Error | FS : Error while reading/writing security.dat in 2138
[11:03:58] 00.159 : (255932) Error | FS : Error while reading/writing devsecurity.dat in 2138
[11:03:58] 00.161 : (256088) Info | INIT : Check for Priority tasks
[11:03:59] 00.162 : (256088) Info | INIT : SPI not enabled
[11:03:59] 00.164 : >
[11:03:59] PID:0
[11:04:00] 00.164 : > Version:0
[11:04:00] 00.164 : > INIT : Incorrect PID or version!
[11:04:00] 01.165 : > RESET: Resetting factory defaults... using default settings
[11:04:00] 02.166 : > RESET: Warm boot, reset count: 3
[11:04:00] 02.167 : > RESET: Too many resets, protecting your flash memory (powercycle to solve this)
[11:04:00] 02.178 : (255896) Info | ESPEasy console using ESPEasySerial
[11:04:00] 02.200 : (255896) Info | ESPEasy console fallback enabled
[11:04:00] 02.213 : (255896) Info | ESPEasy console using ESPEasySerial
[11:04:00] 02.235 : (255896) Info | ESPEasy console fallback enabled
[11:04:01] 03.202 : (255512) Info | WiFi : Set state from: Disabled to: STA_Scanning timeout: 10000
[11:04:01] 03.304 : (255596) Info | WiFi: Disconnected. Connected for: 00.000 sec
[11:04:01] 03.303 : (255596) Info | WIFI : Set WiFi to STA
[11:04:01] 03.312 : (216100) Info | WIFI_READY
[11:04:03] 03.569 : (213216) Info | WD : Uptime 0 FreeMem 213336
[11:04:03] 05.152 : (211348) Info | SCAN_DONE
[11:04:03] 05.165 : (211952) Info | WiFi : Set state from: STA_Scanning to: AP_Fallback timeout: 60000
[11:04:03] 05.180 : (208372) Info | WIFI : AP Mode enabled. SSID: ESPEasy- IP: 0.0.0.0 ch: 1dhcps_start(): could not obtain pcb
[11:04:03] 05.182 : (208000) Error | WIFI : Failed to enable AP Captive Portal
[11:04:03] 05.184 : (203300) Info | AP: Disconnected. Connected for: 00.000 sec
[11:04:03] 05.190 : (197496) Info | Webserver: start
|
There are 2 tasks left to complete this PR:
|
I added the 72x40 display for ESP32-C3 dev board like this:
https://emalliab.wordpress.com/2025/02/12/esp32-c3-0-42-oled/