You need to add S2 parameter to lines where Z axis are moved. That should fix the problem
[[language]]
G1 Z5 F6000 S2 ; lift Z relative to current position
```and
[[language]]
G1 Z-5 F6000 S2 ; lower Z again
You need to add S2 parameter to lines where Z axis are moved. That should fix the problem
[[language]]
G1 Z5 F6000 S2 ; lift Z relative to current position
```and
[[language]]
G1 Z-5 F6000 S2 ; lower Z again
Does you'r homing script 1st lower/raise bed before it homes X and Y ? If so you need to add S2 parameter to you'r Z axis movement and then X and Y can be homed and Z axis after that
All sorted now, got the touchscreen working correctly.
All I did is swapped order witch X and Y coordinates from touchscreen is read in UTouch.cpp
[[language]]
// If the panel is touched, return the coordinates in x and y and return true; else return false
bool UTouch::read(uint16_t &px, uint16_t &py, uint16_t * null rawX, uint16_t * null rawY)
{
bool ret = false;
if (!portIRQ.read()) // if screen is touched
{
portCS.setLow();
delay_us(100); // allow the screen to settle
uint16_t ty; // <- was tx
if (getTouchData(false, ty)) // <- was tx
{
uint16_t tx; // <- was ty
if (getTouchData(true, tx)) // <- was ty
Thank you David for nice add on to DuetWifi
Mark
To get the elf file to convert to the bin file, the Post Build Steps under Project Properties -> C/C++ Build -> Settings Post Build Steps was updated to
arm-none-eabi-objcopy -O binary ${workspace_loc:/${ProjName}/${ConfigName}}/PanelDue-7.0.elf ${workspace_loc:/${ProjName}/${ConfigName}}/PanelDue-7.0.bin
The original used ${ProjName}-7.0.elf for the filename which was evaluating to PanelDueFirmware-7.0.elf but the output from the compile generated PanelDue-7.0.elf
Thank you for the tip, that did do the job.
Mark
Where do you get your 7" TFT panel from? Are you definitely using the code for the 7" panel?
The Eclipse project has a post-build step configured to convert the .elf file into a .bin file.
Panel I'm using is from Aliexpress, friend of my bought it while back for some Arduino project, but it was never used.
So I ended to have it.
I have tried all BIN files from github repo for 7 inch panel and all of the seems to have same 'problem' with touchscreen rotation.
Need to look my Eclipse settings and get BIN file conversion working.
Any tips what part of PanelDue code could rotate touchscreen coordinations ?
Mark
Hello David,
Sorry if this is on wrong place. I have tried to search on forum, but not come across this problem.
I have little problem with my 7 inch screen and PanelDue.
Touch screen seems to be thinking thats it on portrait mode,
so….
When 1st cal point comes to screen to press, i need to press point where 2nd one comes (does not care if i try press in right point over the black spot) and when 2nd cal point comes, i need to press where 3rd point comes....
Touch screen is rotated 90 degrees. End of this calibration process i get all coordinates wrong
I seems to be thinking that in original touch screen code to Arduino, there in some sort on way to turn this right ?
What needs to be done to your code to correct touch screen rotation ?
Is it possible to get BIN file with this already corrected ?
I have tried to get my Eclipse installation working, i get ELF file end of compiling. BIN file goes 'missing', even it's on Post-build steps settings.
Thanks
Mark