Open Bigmaxmafia opened 4 weeks ago
Clone the repo again. I fixed that problem yesterday I think. might have been the day before.
also depending on the display you are using you might need to pass a numerical type to the init
method. This is what tells the driver what initialization sequence to use. What I did was I put the different sequences into their own modules and the modules get loaded dynamically and once the initialization has finished the module is then deleted so the memory get freed up. I didn't want a huge amount of code that would go unused in most cases or used only a single time when the program starts to take up space in RAM.
the display you are using has 2 types. so you need to pass a 1 or a 2 to the init
method when calling it. use 1
first and if it doesn't work properly then use 2
I updated to 0ee7f2c, but the error remained. I deleted the line with the error, now it gives a different error
File "boot.py", line 9, in
don't update. You need to clone the repo again. That is the only way the fix is going to get populated. The issue was with the LVGL submodule pointing to the wrong commit in LVGL. This only gets corrected by cloning the repo again.
don't update. You need to clone the repo again. That is the only way the fix is going to get populated. The issue was with the LVGL submodule pointing to the wrong commit in LVGL. This only gets corrected by cloning the repo again.
The image started to work, but when I try to calibrate the touchscreen, the screen just turns white and nothing happens console
Creating touch bus
creating touch SPI Device
importing xpt2046
Instantiating touch Indev
@kdschlosser Thanks for the help with the initialization, but it looks like I need a little more help. After touch_indev.calibrate() is used nothing happens on the screen, the screen itself is white with very thin stripes. If I remove the calibration, the touchscreen and screen work, but I still need calibration, any ideas? I noticed that when stopping the program via ctrl-c, the output always occurs on line 70 pointer_framework.py
what is the exact code you are using?
OH I just noticed something...
you need to have these lines of code..
import task_handler
th = task_handler.TaskHandler()
placed before the calibration code but after the display has been initialized.
OH I just noticed something...
you need to have these lines of code..
import task_handler th = task_handler.TaskHandler()
placed before the calibration code but after the display has been initialized.
@kdschlosser This helped, now the calibration is enabled, but a new problem has been added. When we click on the second calibration point we have it in the console
Calibration
1: Tpcal_point(touch_x=31, touch_y=201, screen_x=24, screen_y=24)
2: Tpcal_point(touch_x=31, touch_y=201, screen_x=24, screen_y=296)
3: Tpcal_point(touch_x=158, touch_y=198, screen_x=216, screen_y=24)
Traceback (most recent call last):
File "task_handler.py", line 132, in _task_handler
File "touch_calibrate.py", line 498, in on_press
ZeroDivisionError: divide by zero
I noticed that I held the first point for a long time. When you quickly click on the first point, the second point is actually not on the screen, and on the side you can see a scroll bar of the screen.
I made some updates to the touch driver. If you want to test the changes and see if they work properly you can do that by cloning the repo using this command...
git clone -b touch-calibration https://github.com/lvgl-micropython/lvgl_micropython
I made some updates to the touch driver. If you want to test the changes and see if they work properly you can do that by cloning the repo using this command...
git clone -b touch-calibration https://github.com/lvgl-micropython/lvgl_micropython
@kdschlosser with calibration branch this
Traceback (most recent call last):
File "boot.py", line 80, in <module>
File "pointer_framework.py", line 64, in calibrate
TypeError: function takes 4 positional arguments but 3 were given
ok give it a try again. I fixed that error.
ok give it a try again. I fixed that error.
@kdschlosser Now a new calibration interface is opening, but now the touchscreen does not respond to my touches. There are no errors. Here is the key interrupt log, I looked at it several times, we come out on the same line.
Calibration
Traceback (most recent call last):
File "task_handler.py", line 132, in _task_handler
File "touch_calibrate.py", line 438, in on_touch
KeyboardInterrupt:
have you tried pressing the target. there should be a counter. press the target 10 times. The target should also animate when it is pressed.
have you tried pressing the target. there should be a counter. press the target 10 times. The target should also animate when it is pressed.
@kdschlosser Yes, I tried to press more, but there was no result. The counter is always 0 and there is no animation either. I tested the touchscreen without calibration and it works.
OK, I am not going to be able to check it out until later on today. I am tied up with having to deal with my vehicle that got damaged when it was at the dealership for service. Have to get photos and videos sent over to them with descriptions of what is going on. It's going to take me a while to finish doing that.
@kdschlosser What's up?
Oh man, we ended up getting over 3' of snow and I have been shoveling that crap from my 125' long driveway for the past few days, snowblower is inop. I have been spent and my back has been sore (back surgery earlier this year) so I haven't spent a whole heck of a lot of time at the keyboard.
I promise I will look at it this evening and get it all sorted out.
Oh man, we ended up getting over 3' of snow and I have been shoveling that crap from my 125' long driveway for the past few days, snowblower is inop. I have been spent and my back has been sore (back surgery earlier this year) so I haven't spent a whole heck of a lot of time at the keyboard.
I promise I will look at it this evening and get it all sorted out.
No problem! Just wanted to make sure I didn't miss anything.
no you didn't miss anything at all. Life got in the way.. got stuff that I have to take care of at the homestead ya know?
esp32 s3
A lot has changed, I was using a very old build. I compiled a fresh one and took the working code from the discussions, but I get an error
Traceback (most recent call last): File "boot.py", line 27, in
File "display_driver_framework.py", line 215, in init
File "display_driver_framework.py", line 280, in _init_bus
SyntaxError: Cannot convert 'bound_method' to pointer!
LVGL MicroPython 1.23.0 on 2024-10-29; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3