Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use port number passed into make and fix uploads #2

Merged
merged 4 commits into from
Aug 7, 2022

Conversation

jadatkins
Copy link
Contributor

@jadatkins jadatkins commented Aug 7, 2022

macOS does not have the setcap command so it seems it will be simpler on a Mac to use a port number like 8023 and change it in LightBurn device settings. But you're not actually using the port number passed into make – you're hardcoding it in the C source file.

Screenshot 2022-08-07 at 17 52 17

Comment on lines 131 to 132
} No newline at end of file
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The compiler on my Mac complains if there isn't a line break here:

tcp_bridge.c:132:2: error: no newline at end of file [-Werror,-Wnewline-eof]

@jadatkins jadatkins changed the title use port number passed into make instead of hardcoding 23 use port number passed into make and fix uploads Aug 7, 2022
@fritzw
Copy link
Owner

fritzw commented Aug 7, 2022

Thanks for the PR, I'll accept it.

Yes, somehow I've completely missed the option for setting the port in LightBurn, so I thought it was hardcoded to 23 (their user interface for setting IP and port in completely different places is a bit confusing, TBH). That's the only reason I wrote that tcp_bridge program at all. Just after pushing the tcp_bridge feature to github, I noticed the port setting in LB, so I'm currently in the process of refactoring and testing the python code to use sockets directly, without the bridge.

Honestly I'm unsure whether to keep the tcp_bridge at all, because there is no real reason to bind to ports below 1024 at all.

Copy link
Owner

@fritzw fritzw left a comment

Choose a reason for hiding this comment

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

Accept.

@fritzw fritzw merged commit 37d6b2d into fritzw:main Aug 7, 2022
@jadatkins
Copy link
Contributor Author

Ah, then you've also found the setting to reverse the Z axis in LightBurn, I suppose? It's in the same dialog at the top-right.

In your code comments you state that the correct Z value for a material of thickness 0 is 17, but you also say that empirically you found it to be closer to 19. What made you think it was 17? When I perform a "score" using xTool Creative Space and set the material as 3mm basswood plywood, in Wireshark I can see that it is setting a Z height of 17. This makes me think that the value for a material of thickness 0 would be 20. Is it possible you got mixed up somehow?

@jadatkins jadatkins deleted the fix-compile-port branch August 7, 2022 21:13
@fritzw
Copy link
Owner

fritzw commented Aug 7, 2022

Yes, I found the reverse Z switch, but that does not really help, does it? I've found no option in LB to set a Z offset, so we need to touch all Z coordinates in the G-code anyways, so using reverse Z makes no difference (except swapping a minus for a plus in the code).

I thought, that the G-code from the XCS software was cutting at Z=17 for a material thickness of zero, that's where I got this value from. Also, the maximum material thickness I can set in XCS is 16. However, i may have made a mistake somewhere (seems likely, since the focus was that far off for me).

@jadatkins
Copy link
Contributor Author

Here's a capture I made scoring a short line on 3mm plywood. The Z value of 17 is set at the start when all the other defaults are set, and then it doesn't get set again.

https://lightburn.fider.io/posts/2086/xtool-m1-support

@fritzw
Copy link
Owner

fritzw commented Aug 7, 2022

I've created an issue for this, let's continue the discussion there. (is there no way to lock this conversation?)

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.

None yet

2 participants