Open Martinson50 opened 5 months ago
Looked at the changes, and tried compiling it here (failing with a whole stack of errors). Compile time failures aside, some comments in no particular order:
sdcardsetup() will kinda work, but attempts to access the card later on will fail (on my board, and probably others). There is a conflict between TFT and SD using the same SPI pins during setup. The answer is to defer sdcardsetup() until after TFT setup is complete. It is a bad idea to hard bake SPI clock speed in to the code, and doubly bad to limit it to just 1MHz. The ESP32 can go to 40MHz when using the GPIO matrix pins. But due to PCB design/layout, this may not always be possible. A side note: defines for SPI pins should be encased in an ifndef/endif pair. You then avoid compile time warnings about SPI_MOSI & friends being redefined. listdir_SD is just a rehash of filesystemList() but using the function prototype of filesystem_list() without returning the data of the latter. filesystemList() is only called once during set up, and just lists files found to LOG_VERBOSE. Beyond that, it doesn't really serve much purpose that I can see. special_attribute_src() duplicates a sizable chunk of code from further on in the same function that is used to process HTTP requests. You should be treating file access the same as drive L (or littleFS).
Since @Martinson50 is new to PRs on GitHub, I am not set to merge this code as is. But it can be used to see how he solved the problem for his device.
We'll need to focus on adding devices one-by-one in an easy configurable way, without breaking existing stuff.
Sure, I completely agree with you, I see my job close to contribute in other way, anyway Iḿ going to work to do a succesful compilation for 'all' proposed devices besides some impovements. not in direct PR. Maybe I can collaborate with FreeBear-nc with extra commands and with his specific plate environment
El vie, 24 may 2024 a las 3:25, fvanroie @.***>) escribió:
Since @Martinson50 https://github.com/Martinson50 is new to PRs on GitHub, I am not set to merge this code as it. But it can be used to see how he solved the problem for his device.
We'll need to focus on adding devices one-by-one in an easy configurable way, without breaking existing stuff.
— Reply to this email directly, view it on GitHub https://github.com/HASwitchPlate/openHASP/pull/742#issuecomment-2128314789, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASCXKO5ZP256ZDO3H6SC5N3ZD2JITAVCNFSM6AAAAABIF7OMWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRYGMYTINZYHE . You are receiving this because you were mentioned.Message ID: @.***>
special_attribute_src() duplicates a sizable chunk of code from further on in the same function that is used to process HTTP requests. You should be treating file access the same as drive L (or littleFS).
You mean to use a simple 'lv_img_set_src' instead of a duplicate code for http? But I wanted to have at the same time SDCard and spiff filesystem and with lv_img_set_src you should register several systems. lv_fs_drv_register(&spifffs); lv_fs_drv_register(&sdfs);
I'm updating the LVFS driver so that both /littlefs
and /sdcard
drive letters can be used simultaneously. LVGL integration is actually the easy part. You don't need to check for L:
or Z:
prefix, LVGL will handle it automatically.
OMG.
Bedankt.
El vie, 24 may 2024 a las 22:14, fvanroie @.***>) escribió:
I'm updating the LVFS driver so that both /littlefs and /sdcard drive letters can be use simultaneously. LVGL integration is actually the easy part. You don't need to check for L: or Z: prefix, LVGL will handle it automatically.
— Reply to this email directly, view it on GitHub https://github.com/HASwitchPlate/openHASP/pull/742#issuecomment-2130291180, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASCXKOZWJM22RVSOKTMECQDZD6NTRAVCNFSM6AAAAABIF7OMWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZQGI4TCMJYGA . You are receiving this because you were mentioned.Message ID: @.***>
Hi everybody again. I finaly learn how to use github in a proper way (I hope so) so I decided to start again and add some code to make an SDCard when avalaible, as in Sunton plates, and put an imaginary Z: unit as a source in images an json files.
I only tested on my Sunton-4827s043c_16MB and it works with a 16Gb Cat.4 card example in pages.jsonl
{"page":1,"id":4,"obj":"img","x":0,"y":65,"src":"Z:/cycle.png","auto_size":false,"w":128,"h":128}
you can of course send from HA custom component in configuration yaml as: plate: objects: