-
Notifications
You must be signed in to change notification settings - Fork 55
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
New driver for "Ruida" class lasercutters, like ThunderLaser #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this will work, and it's pretty much by definition better than nothing but stronger testing with actual hardware may be called for, and the specific versions of ruida this works for (namely those with magic number 0x88 should be more closely specified, unless that limitation is lifted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well readable, I really enjoyed the ByteStream that hides the low-level stuff. There are some minor issues that you should check, and then I am happy to merge:
-
Please implement saveJob() so that the automatic regression test of LibLaserCut (test-output/) and the "Export Laser Code to file" menu entry in VisiCut work.
-
Regarding the upcoming integration in VisiCut, you should check whether the serialized XML files for device settings and power settings look nice (no junk variables, etc.). If adjustments are needed (marking fields as transient, etc.), it is best to do these now to not break compatibility with saved settings later.
At least for an earlier version of the driver, the config file
https://github.com/fablabnbg/visicut-settings/blob/master/devices/Nova_32_35_32_fablabnbg.xml
has some irrelevant variables (ruida boundingWidth, ...) that should be marked as "transient" to remove them from serialization.
- If the network part doesn't work yet, please check that some warning is shown to the user to make it clear that network is not yet implemented.
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Outdated
Show resolved
Hide resolved
src/main/java/de/thomas_oster/liblasercut/FloatPowerSpeedFrequencyProperty.java
Show resolved
Hide resolved
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Outdated
Show resolved
Hide resolved
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Show resolved
Hide resolved
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Outdated
Show resolved
Hide resolved
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Show resolved
Hide resolved
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
@kkaempf Then simply use that object that converts commands to laser-controller commands and sends it, to deal with the driver hooks needed for this driver. Though for pure functionality converting straight into code you generally think works is pretty good.
Currently my ruida offerings is an interpreter for all ruida code where it translates code from lightburn or rdworks and has it control an M2 Nano. |
So many good ideas, so little time. I'm basically a Java illiterate and it required years (mostly due to Covid making the lasercutter inaccessible for me) and several attempts to bring the Ruida driver to an acceptable state. I will finish it to the point where it gets merged into LibLaserCut. I will continue to fix bugs. But any larger improvements/rewrites need to be done by someone else. 😞 |
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done! Good :-) Please see my comments for some minor improvements.
If the network driver is not usable, then it would be better to somehow disable it (at least stop with an error message if someone tries to use it, or similar). Doesn't make sense to ship half-broken stuff.
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Network is fixed now 🎉 |
src/main/java/de/thomas_oster/liblasercut/FloatMinMaxPowerSpeedFrequencyProperty.java
Show resolved
Hide resolved
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
also remove dead code Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one network issue, and some very minor things. Close to the target :-)
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
When it gets down to testing. Do note that MeerK40t has a built in RuidaEmulator you run "ruidacontrol" or "ruidadesign -v" and send it data and it'll tell you exactly what all the commands are and what they do and draw whatever you sent it (if using ruidadesign). At least for 0.7.x versions. The protocol is pretty expansive but I reverse engineered the whole thing so I know what everything does, and the emulator pretends to be a Ruida device (networked) on the 50200 and 50207 ports (the -07 port is because there's an android app that works as a remote control). Ruidacontrol lets me you control your K40 or other device with RDWorks or Lightburn, and when this driver works Visicut too. |
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
Signed-off-by: Klaus Kämpf <kkaempf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, will merge in a few days
You can now cheerfully update the https://github.com/t-oster/VisiCut/wiki/Supported-Hardware page and then throw a large celebration party. 🎉 🎈 🎈 🎈 🎈 |
Initial PR
Known bugs
Fixes #105