meerk40t 0.9.3001__py2.py3-none-any.whl → 0.9.7010__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meerk40t/__init__.py +1 -1
- meerk40t/balormk/balor_params.py +167 -167
- meerk40t/balormk/clone_loader.py +457 -457
- meerk40t/balormk/controller.py +1566 -1512
- meerk40t/balormk/cylindermod.py +64 -0
- meerk40t/balormk/device.py +966 -1959
- meerk40t/balormk/driver.py +778 -591
- meerk40t/balormk/galvo_commands.py +1195 -0
- meerk40t/balormk/gui/balorconfig.py +237 -111
- meerk40t/balormk/gui/balorcontroller.py +191 -184
- meerk40t/balormk/gui/baloroperationproperties.py +116 -115
- meerk40t/balormk/gui/corscene.py +845 -0
- meerk40t/balormk/gui/gui.py +179 -147
- meerk40t/balormk/livelightjob.py +466 -382
- meerk40t/balormk/mock_connection.py +131 -109
- meerk40t/balormk/plugin.py +133 -135
- meerk40t/balormk/usb_connection.py +306 -301
- meerk40t/camera/__init__.py +1 -1
- meerk40t/camera/camera.py +514 -397
- meerk40t/camera/gui/camerapanel.py +1241 -1095
- meerk40t/camera/gui/gui.py +58 -58
- meerk40t/camera/plugin.py +441 -399
- meerk40t/ch341/__init__.py +27 -27
- meerk40t/ch341/ch341device.py +628 -628
- meerk40t/ch341/libusb.py +595 -589
- meerk40t/ch341/mock.py +171 -171
- meerk40t/ch341/windriver.py +157 -157
- meerk40t/constants.py +13 -0
- meerk40t/core/__init__.py +1 -1
- meerk40t/core/bindalias.py +550 -539
- meerk40t/core/core.py +47 -47
- meerk40t/core/cutcode/cubiccut.py +73 -73
- meerk40t/core/cutcode/cutcode.py +315 -312
- meerk40t/core/cutcode/cutgroup.py +141 -137
- meerk40t/core/cutcode/cutobject.py +192 -185
- meerk40t/core/cutcode/dwellcut.py +37 -37
- meerk40t/core/cutcode/gotocut.py +29 -29
- meerk40t/core/cutcode/homecut.py +29 -29
- meerk40t/core/cutcode/inputcut.py +34 -34
- meerk40t/core/cutcode/linecut.py +33 -33
- meerk40t/core/cutcode/outputcut.py +34 -34
- meerk40t/core/cutcode/plotcut.py +335 -335
- meerk40t/core/cutcode/quadcut.py +61 -61
- meerk40t/core/cutcode/rastercut.py +168 -148
- meerk40t/core/cutcode/waitcut.py +34 -34
- meerk40t/core/cutplan.py +1843 -1316
- meerk40t/core/drivers.py +330 -329
- meerk40t/core/elements/align.py +801 -669
- meerk40t/core/elements/branches.py +1844 -1507
- meerk40t/core/elements/clipboard.py +229 -219
- meerk40t/core/elements/element_treeops.py +4561 -2837
- meerk40t/core/elements/element_types.py +125 -105
- meerk40t/core/elements/elements.py +4329 -3617
- meerk40t/core/elements/files.py +117 -64
- meerk40t/core/elements/geometry.py +473 -224
- meerk40t/core/elements/grid.py +467 -316
- meerk40t/core/elements/materials.py +158 -94
- meerk40t/core/elements/notes.py +50 -38
- meerk40t/core/elements/offset_clpr.py +933 -912
- meerk40t/core/elements/offset_mk.py +963 -955
- meerk40t/core/elements/penbox.py +339 -267
- meerk40t/core/elements/placements.py +300 -83
- meerk40t/core/elements/render.py +785 -687
- meerk40t/core/elements/shapes.py +2618 -2092
- meerk40t/core/elements/trace.py +651 -563
- meerk40t/core/elements/tree_commands.py +415 -409
- meerk40t/core/elements/undo_redo.py +116 -58
- meerk40t/core/elements/wordlist.py +319 -200
- meerk40t/core/exceptions.py +9 -9
- meerk40t/core/laserjob.py +220 -220
- meerk40t/core/logging.py +63 -63
- meerk40t/core/node/blobnode.py +83 -86
- meerk40t/core/node/bootstrap.py +105 -103
- meerk40t/core/node/branch_elems.py +40 -31
- meerk40t/core/node/branch_ops.py +45 -38
- meerk40t/core/node/branch_regmark.py +48 -41
- meerk40t/core/node/cutnode.py +29 -32
- meerk40t/core/node/effect_hatch.py +375 -257
- meerk40t/core/node/effect_warp.py +398 -0
- meerk40t/core/node/effect_wobble.py +441 -309
- meerk40t/core/node/elem_ellipse.py +404 -309
- meerk40t/core/node/elem_image.py +1082 -801
- meerk40t/core/node/elem_line.py +358 -292
- meerk40t/core/node/elem_path.py +259 -201
- meerk40t/core/node/elem_point.py +129 -102
- meerk40t/core/node/elem_polyline.py +310 -246
- meerk40t/core/node/elem_rect.py +376 -286
- meerk40t/core/node/elem_text.py +445 -418
- meerk40t/core/node/filenode.py +59 -40
- meerk40t/core/node/groupnode.py +138 -74
- meerk40t/core/node/image_processed.py +777 -766
- meerk40t/core/node/image_raster.py +156 -113
- meerk40t/core/node/layernode.py +31 -31
- meerk40t/core/node/mixins.py +135 -107
- meerk40t/core/node/node.py +1427 -1304
- meerk40t/core/node/nutils.py +117 -114
- meerk40t/core/node/op_cut.py +462 -335
- meerk40t/core/node/op_dots.py +296 -251
- meerk40t/core/node/op_engrave.py +414 -311
- meerk40t/core/node/op_image.py +755 -369
- meerk40t/core/node/op_raster.py +787 -522
- meerk40t/core/node/place_current.py +37 -40
- meerk40t/core/node/place_point.py +329 -126
- meerk40t/core/node/refnode.py +58 -47
- meerk40t/core/node/rootnode.py +225 -219
- meerk40t/core/node/util_console.py +48 -48
- meerk40t/core/node/util_goto.py +84 -65
- meerk40t/core/node/util_home.py +61 -61
- meerk40t/core/node/util_input.py +102 -102
- meerk40t/core/node/util_output.py +102 -102
- meerk40t/core/node/util_wait.py +65 -65
- meerk40t/core/parameters.py +709 -707
- meerk40t/core/planner.py +875 -785
- meerk40t/core/plotplanner.py +656 -652
- meerk40t/core/space.py +120 -113
- meerk40t/core/spoolers.py +706 -705
- meerk40t/core/svg_io.py +1836 -1549
- meerk40t/core/treeop.py +534 -445
- meerk40t/core/undos.py +278 -124
- meerk40t/core/units.py +784 -680
- meerk40t/core/view.py +393 -322
- meerk40t/core/webhelp.py +62 -62
- meerk40t/core/wordlist.py +513 -504
- meerk40t/cylinder/cylinder.py +247 -0
- meerk40t/cylinder/gui/cylindersettings.py +41 -0
- meerk40t/cylinder/gui/gui.py +24 -0
- meerk40t/device/__init__.py +1 -1
- meerk40t/device/basedevice.py +322 -123
- meerk40t/device/devicechoices.py +50 -0
- meerk40t/device/dummydevice.py +163 -128
- meerk40t/device/gui/defaultactions.py +618 -602
- meerk40t/device/gui/effectspanel.py +114 -0
- meerk40t/device/gui/formatterpanel.py +253 -290
- meerk40t/device/gui/warningpanel.py +337 -260
- meerk40t/device/mixins.py +13 -13
- meerk40t/dxf/__init__.py +1 -1
- meerk40t/dxf/dxf_io.py +766 -554
- meerk40t/dxf/plugin.py +47 -35
- meerk40t/external_plugins.py +79 -79
- meerk40t/external_plugins_build.py +28 -28
- meerk40t/extra/cag.py +112 -116
- meerk40t/extra/coolant.py +403 -0
- meerk40t/extra/encode_detect.py +198 -0
- meerk40t/extra/ezd.py +1165 -1165
- meerk40t/extra/hershey.py +835 -340
- meerk40t/extra/imageactions.py +322 -316
- meerk40t/extra/inkscape.py +630 -622
- meerk40t/extra/lbrn.py +424 -424
- meerk40t/extra/outerworld.py +284 -0
- meerk40t/extra/param_functions.py +1542 -1556
- meerk40t/extra/potrace.py +257 -253
- meerk40t/extra/serial_exchange.py +118 -0
- meerk40t/extra/updater.py +602 -453
- meerk40t/extra/vectrace.py +147 -146
- meerk40t/extra/winsleep.py +83 -83
- meerk40t/extra/xcs_reader.py +597 -0
- meerk40t/fill/fills.py +781 -335
- meerk40t/fill/patternfill.py +1061 -1061
- meerk40t/fill/patterns.py +614 -567
- meerk40t/grbl/control.py +87 -87
- meerk40t/grbl/controller.py +990 -903
- meerk40t/grbl/device.py +1081 -768
- meerk40t/grbl/driver.py +989 -771
- meerk40t/grbl/emulator.py +532 -497
- meerk40t/grbl/gcodejob.py +783 -767
- meerk40t/grbl/gui/grblconfiguration.py +373 -298
- meerk40t/grbl/gui/grblcontroller.py +485 -271
- meerk40t/grbl/gui/grblhardwareconfig.py +269 -153
- meerk40t/grbl/gui/grbloperationconfig.py +105 -0
- meerk40t/grbl/gui/gui.py +147 -116
- meerk40t/grbl/interpreter.py +44 -44
- meerk40t/grbl/loader.py +22 -22
- meerk40t/grbl/mock_connection.py +56 -56
- meerk40t/grbl/plugin.py +294 -264
- meerk40t/grbl/serial_connection.py +93 -88
- meerk40t/grbl/tcp_connection.py +81 -79
- meerk40t/grbl/ws_connection.py +112 -0
- meerk40t/gui/__init__.py +1 -1
- meerk40t/gui/about.py +2042 -296
- meerk40t/gui/alignment.py +1644 -1608
- meerk40t/gui/autoexec.py +199 -0
- meerk40t/gui/basicops.py +791 -670
- meerk40t/gui/bufferview.py +77 -71
- meerk40t/gui/busy.py +170 -133
- meerk40t/gui/choicepropertypanel.py +1673 -1469
- meerk40t/gui/consolepanel.py +706 -542
- meerk40t/gui/devicepanel.py +687 -581
- meerk40t/gui/dialogoptions.py +110 -107
- meerk40t/gui/executejob.py +316 -306
- meerk40t/gui/fonts.py +90 -90
- meerk40t/gui/functionwrapper.py +252 -0
- meerk40t/gui/gui_mixins.py +729 -0
- meerk40t/gui/guicolors.py +205 -182
- meerk40t/gui/help_assets/help_assets.py +218 -201
- meerk40t/gui/helper.py +154 -0
- meerk40t/gui/hersheymanager.py +1430 -846
- meerk40t/gui/icons.py +3422 -2747
- meerk40t/gui/imagesplitter.py +555 -508
- meerk40t/gui/keymap.py +354 -344
- meerk40t/gui/laserpanel.py +892 -806
- meerk40t/gui/laserrender.py +1470 -1232
- meerk40t/gui/lasertoolpanel.py +805 -793
- meerk40t/gui/magnetoptions.py +436 -0
- meerk40t/gui/materialmanager.py +2917 -0
- meerk40t/gui/materialtest.py +1722 -1694
- meerk40t/gui/mkdebug.py +646 -359
- meerk40t/gui/mwindow.py +163 -140
- meerk40t/gui/navigationpanels.py +2605 -2467
- meerk40t/gui/notes.py +143 -142
- meerk40t/gui/opassignment.py +414 -410
- meerk40t/gui/operation_info.py +310 -299
- meerk40t/gui/plugin.py +494 -328
- meerk40t/gui/position.py +714 -669
- meerk40t/gui/preferences.py +901 -650
- meerk40t/gui/propertypanels/attributes.py +1461 -1131
- meerk40t/gui/propertypanels/blobproperty.py +117 -114
- meerk40t/gui/propertypanels/consoleproperty.py +83 -80
- meerk40t/gui/propertypanels/gotoproperty.py +77 -0
- meerk40t/gui/propertypanels/groupproperties.py +223 -217
- meerk40t/gui/propertypanels/hatchproperty.py +489 -469
- meerk40t/gui/propertypanels/imageproperty.py +2244 -1384
- meerk40t/gui/propertypanels/inputproperty.py +59 -58
- meerk40t/gui/propertypanels/opbranchproperties.py +82 -80
- meerk40t/gui/propertypanels/operationpropertymain.py +1890 -1638
- meerk40t/gui/propertypanels/outputproperty.py +59 -58
- meerk40t/gui/propertypanels/pathproperty.py +389 -380
- meerk40t/gui/propertypanels/placementproperty.py +1214 -383
- meerk40t/gui/propertypanels/pointproperty.py +140 -136
- meerk40t/gui/propertypanels/propertywindow.py +313 -181
- meerk40t/gui/propertypanels/rasterwizardpanels.py +996 -912
- meerk40t/gui/propertypanels/regbranchproperties.py +76 -0
- meerk40t/gui/propertypanels/textproperty.py +770 -755
- meerk40t/gui/propertypanels/waitproperty.py +56 -55
- meerk40t/gui/propertypanels/warpproperty.py +121 -0
- meerk40t/gui/propertypanels/wobbleproperty.py +255 -204
- meerk40t/gui/ribbon.py +2468 -2210
- meerk40t/gui/scene/scene.py +1100 -1051
- meerk40t/gui/scene/sceneconst.py +22 -22
- meerk40t/gui/scene/scenepanel.py +439 -349
- meerk40t/gui/scene/scenespacewidget.py +365 -365
- meerk40t/gui/scene/widget.py +518 -505
- meerk40t/gui/scenewidgets/affinemover.py +215 -215
- meerk40t/gui/scenewidgets/attractionwidget.py +315 -309
- meerk40t/gui/scenewidgets/bedwidget.py +120 -97
- meerk40t/gui/scenewidgets/elementswidget.py +137 -107
- meerk40t/gui/scenewidgets/gridwidget.py +785 -745
- meerk40t/gui/scenewidgets/guidewidget.py +765 -765
- meerk40t/gui/scenewidgets/laserpathwidget.py +66 -66
- meerk40t/gui/scenewidgets/machineoriginwidget.py +86 -86
- meerk40t/gui/scenewidgets/nodeselector.py +28 -28
- meerk40t/gui/scenewidgets/rectselectwidget.py +589 -346
- meerk40t/gui/scenewidgets/relocatewidget.py +33 -33
- meerk40t/gui/scenewidgets/reticlewidget.py +83 -83
- meerk40t/gui/scenewidgets/selectionwidget.py +2952 -2756
- meerk40t/gui/simpleui.py +357 -333
- meerk40t/gui/simulation.py +2431 -2094
- meerk40t/gui/snapoptions.py +208 -203
- meerk40t/gui/spoolerpanel.py +1227 -1180
- meerk40t/gui/statusbarwidgets/defaultoperations.py +480 -353
- meerk40t/gui/statusbarwidgets/infowidget.py +520 -483
- meerk40t/gui/statusbarwidgets/opassignwidget.py +356 -355
- meerk40t/gui/statusbarwidgets/selectionwidget.py +172 -171
- meerk40t/gui/statusbarwidgets/shapepropwidget.py +754 -236
- meerk40t/gui/statusbarwidgets/statusbar.py +272 -260
- meerk40t/gui/statusbarwidgets/statusbarwidget.py +268 -270
- meerk40t/gui/statusbarwidgets/strokewidget.py +267 -251
- meerk40t/gui/themes.py +200 -78
- meerk40t/gui/tips.py +591 -0
- meerk40t/gui/toolwidgets/circlebrush.py +35 -35
- meerk40t/gui/toolwidgets/toolcircle.py +248 -242
- meerk40t/gui/toolwidgets/toolcontainer.py +82 -77
- meerk40t/gui/toolwidgets/tooldraw.py +97 -90
- meerk40t/gui/toolwidgets/toolellipse.py +219 -212
- meerk40t/gui/toolwidgets/toolimagecut.py +25 -132
- meerk40t/gui/toolwidgets/toolline.py +39 -144
- meerk40t/gui/toolwidgets/toollinetext.py +79 -236
- meerk40t/gui/toolwidgets/toollinetext_inline.py +296 -0
- meerk40t/gui/toolwidgets/toolmeasure.py +160 -216
- meerk40t/gui/toolwidgets/toolnodeedit.py +2088 -2074
- meerk40t/gui/toolwidgets/toolnodemove.py +92 -94
- meerk40t/gui/toolwidgets/toolparameter.py +754 -668
- meerk40t/gui/toolwidgets/toolplacement.py +108 -108
- meerk40t/gui/toolwidgets/toolpoint.py +68 -59
- meerk40t/gui/toolwidgets/toolpointlistbuilder.py +294 -0
- meerk40t/gui/toolwidgets/toolpointmove.py +183 -0
- meerk40t/gui/toolwidgets/toolpolygon.py +288 -403
- meerk40t/gui/toolwidgets/toolpolyline.py +38 -196
- meerk40t/gui/toolwidgets/toolrect.py +211 -207
- meerk40t/gui/toolwidgets/toolrelocate.py +72 -72
- meerk40t/gui/toolwidgets/toolribbon.py +598 -113
- meerk40t/gui/toolwidgets/tooltabedit.py +546 -0
- meerk40t/gui/toolwidgets/tooltext.py +98 -89
- meerk40t/gui/toolwidgets/toolvector.py +213 -204
- meerk40t/gui/toolwidgets/toolwidget.py +39 -39
- meerk40t/gui/usbconnect.py +98 -91
- meerk40t/gui/utilitywidgets/buttonwidget.py +18 -18
- meerk40t/gui/utilitywidgets/checkboxwidget.py +90 -90
- meerk40t/gui/utilitywidgets/controlwidget.py +14 -14
- meerk40t/gui/utilitywidgets/cyclocycloidwidget.py +343 -340
- meerk40t/gui/utilitywidgets/debugwidgets.py +148 -0
- meerk40t/gui/utilitywidgets/handlewidget.py +27 -27
- meerk40t/gui/utilitywidgets/harmonograph.py +450 -447
- meerk40t/gui/utilitywidgets/openclosewidget.py +40 -40
- meerk40t/gui/utilitywidgets/rotationwidget.py +54 -54
- meerk40t/gui/utilitywidgets/scalewidget.py +75 -75
- meerk40t/gui/utilitywidgets/seekbarwidget.py +183 -183
- meerk40t/gui/utilitywidgets/togglewidget.py +142 -142
- meerk40t/gui/utilitywidgets/toolbarwidget.py +8 -8
- meerk40t/gui/wordlisteditor.py +985 -931
- meerk40t/gui/wxmeerk40t.py +1444 -1169
- meerk40t/gui/wxmmain.py +5578 -4112
- meerk40t/gui/wxmribbon.py +1591 -1076
- meerk40t/gui/wxmscene.py +1635 -1453
- meerk40t/gui/wxmtree.py +2410 -2089
- meerk40t/gui/wxutils.py +1769 -1099
- meerk40t/gui/zmatrix.py +102 -102
- meerk40t/image/__init__.py +1 -1
- meerk40t/image/dither.py +429 -0
- meerk40t/image/imagetools.py +2778 -2269
- meerk40t/internal_plugins.py +150 -130
- meerk40t/kernel/__init__.py +63 -12
- meerk40t/kernel/channel.py +259 -212
- meerk40t/kernel/context.py +538 -538
- meerk40t/kernel/exceptions.py +41 -41
- meerk40t/kernel/functions.py +463 -414
- meerk40t/kernel/jobs.py +100 -100
- meerk40t/kernel/kernel.py +3809 -3571
- meerk40t/kernel/lifecycles.py +71 -71
- meerk40t/kernel/module.py +49 -49
- meerk40t/kernel/service.py +147 -147
- meerk40t/kernel/settings.py +383 -343
- meerk40t/lihuiyu/controller.py +883 -876
- meerk40t/lihuiyu/device.py +1181 -1069
- meerk40t/lihuiyu/driver.py +1466 -1372
- meerk40t/lihuiyu/gui/gui.py +127 -106
- meerk40t/lihuiyu/gui/lhyaccelgui.py +377 -363
- meerk40t/lihuiyu/gui/lhycontrollergui.py +741 -651
- meerk40t/lihuiyu/gui/lhydrivergui.py +470 -446
- meerk40t/lihuiyu/gui/lhyoperationproperties.py +238 -237
- meerk40t/lihuiyu/gui/tcpcontroller.py +226 -190
- meerk40t/lihuiyu/interpreter.py +53 -53
- meerk40t/lihuiyu/laserspeed.py +450 -450
- meerk40t/lihuiyu/loader.py +90 -90
- meerk40t/lihuiyu/parser.py +404 -404
- meerk40t/lihuiyu/plugin.py +101 -102
- meerk40t/lihuiyu/tcp_connection.py +111 -109
- meerk40t/main.py +231 -165
- meerk40t/moshi/builder.py +788 -781
- meerk40t/moshi/controller.py +505 -499
- meerk40t/moshi/device.py +495 -442
- meerk40t/moshi/driver.py +862 -696
- meerk40t/moshi/gui/gui.py +78 -76
- meerk40t/moshi/gui/moshicontrollergui.py +538 -522
- meerk40t/moshi/gui/moshidrivergui.py +87 -75
- meerk40t/moshi/plugin.py +43 -43
- meerk40t/network/console_server.py +102 -57
- meerk40t/network/kernelserver.py +10 -9
- meerk40t/network/tcp_server.py +142 -140
- meerk40t/network/udp_server.py +103 -77
- meerk40t/network/web_server.py +390 -0
- meerk40t/newly/controller.py +1158 -1144
- meerk40t/newly/device.py +874 -732
- meerk40t/newly/driver.py +540 -412
- meerk40t/newly/gui/gui.py +219 -188
- meerk40t/newly/gui/newlyconfig.py +116 -101
- meerk40t/newly/gui/newlycontroller.py +193 -186
- meerk40t/newly/gui/operationproperties.py +51 -51
- meerk40t/newly/mock_connection.py +82 -82
- meerk40t/newly/newly_params.py +56 -56
- meerk40t/newly/plugin.py +1214 -1246
- meerk40t/newly/usb_connection.py +322 -322
- meerk40t/rotary/gui/gui.py +52 -46
- meerk40t/rotary/gui/rotarysettings.py +240 -232
- meerk40t/rotary/rotary.py +202 -98
- meerk40t/ruida/control.py +291 -91
- meerk40t/ruida/controller.py +138 -1088
- meerk40t/ruida/device.py +672 -231
- meerk40t/ruida/driver.py +534 -472
- meerk40t/ruida/emulator.py +1494 -1491
- meerk40t/ruida/exceptions.py +4 -4
- meerk40t/ruida/gui/gui.py +71 -76
- meerk40t/ruida/gui/ruidaconfig.py +239 -72
- meerk40t/ruida/gui/ruidacontroller.py +187 -184
- meerk40t/ruida/gui/ruidaoperationproperties.py +48 -47
- meerk40t/ruida/loader.py +54 -52
- meerk40t/ruida/mock_connection.py +57 -109
- meerk40t/ruida/plugin.py +124 -87
- meerk40t/ruida/rdjob.py +2084 -945
- meerk40t/ruida/serial_connection.py +116 -0
- meerk40t/ruida/tcp_connection.py +146 -0
- meerk40t/ruida/udp_connection.py +73 -0
- meerk40t/svgelements.py +9671 -9669
- meerk40t/tools/driver_to_path.py +584 -579
- meerk40t/tools/geomstr.py +5583 -4680
- meerk40t/tools/jhfparser.py +357 -292
- meerk40t/tools/kerftest.py +904 -890
- meerk40t/tools/livinghinges.py +1168 -1033
- meerk40t/tools/pathtools.py +987 -949
- meerk40t/tools/pmatrix.py +234 -0
- meerk40t/tools/pointfinder.py +942 -942
- meerk40t/tools/polybool.py +940 -940
- meerk40t/tools/rasterplotter.py +1660 -547
- meerk40t/tools/shxparser.py +989 -901
- meerk40t/tools/ttfparser.py +726 -446
- meerk40t/tools/zinglplotter.py +595 -593
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/LICENSE +21 -21
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/METADATA +150 -139
- meerk40t-0.9.7010.dist-info/RECORD +445 -0
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/WHEEL +1 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/top_level.txt +0 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/zip-safe +1 -1
- meerk40t/balormk/elementlightjob.py +0 -159
- meerk40t-0.9.3001.dist-info/RECORD +0 -437
- test/bootstrap.py +0 -63
- test/test_cli.py +0 -12
- test/test_core_cutcode.py +0 -418
- test/test_core_elements.py +0 -144
- test/test_core_plotplanner.py +0 -397
- test/test_core_viewports.py +0 -312
- test/test_drivers_grbl.py +0 -108
- test/test_drivers_lihuiyu.py +0 -443
- test/test_drivers_newly.py +0 -113
- test/test_element_degenerate_points.py +0 -43
- test/test_elements_classify.py +0 -97
- test/test_elements_penbox.py +0 -22
- test/test_file_svg.py +0 -176
- test/test_fill.py +0 -155
- test/test_geomstr.py +0 -1523
- test/test_geomstr_nodes.py +0 -18
- test/test_imagetools_actualize.py +0 -306
- test/test_imagetools_wizard.py +0 -258
- test/test_kernel.py +0 -200
- test/test_laser_speeds.py +0 -3303
- test/test_length.py +0 -57
- test/test_lifecycle.py +0 -66
- test/test_operations.py +0 -251
- test/test_operations_hatch.py +0 -57
- test/test_ruida.py +0 -19
- test/test_spooler.py +0 -22
- test/test_tools_rasterplotter.py +0 -29
- test/test_wobble.py +0 -133
- test/test_zingl.py +0 -124
- {test → meerk40t/cylinder}/__init__.py +0 -0
- /meerk40t/{core/element_commands.py → cylinder/gui/__init__.py} +0 -0
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/entry_points.txt +0 -0
meerk40t/ruida/emulator.py
CHANGED
@@ -1,1491 +1,1494 @@
|
|
1
|
-
"""
|
2
|
-
Ruida Emulator
|
3
|
-
|
4
|
-
The emulator allows us to listen for connections that send ruida data, we emulate that a ruida controller and turn
|
5
|
-
the received data into laser commands to be executed by the local driver.
|
6
|
-
"""
|
7
|
-
|
8
|
-
import os
|
9
|
-
from typing import Tuple, Union
|
10
|
-
|
11
|
-
from meerk40t.kernel import get_safe_path
|
12
|
-
|
13
|
-
from ..core.units import
|
14
|
-
from .exceptions import RuidaCommandError
|
15
|
-
from .rdjob import (
|
16
|
-
RDJob,
|
17
|
-
abscoord,
|
18
|
-
decode14,
|
19
|
-
decodeu35,
|
20
|
-
encode32,
|
21
|
-
magic_keys,
|
22
|
-
parse_commands,
|
23
|
-
parse_filenumber,
|
24
|
-
parse_mem,
|
25
|
-
swizzles_lut,
|
26
|
-
)
|
27
|
-
|
28
|
-
|
29
|
-
class RuidaEmulator:
|
30
|
-
def __init__(self, device, units_to_device_matrix):
|
31
|
-
self.device = device
|
32
|
-
self.units_to_device_matrix = units_to_device_matrix
|
33
|
-
|
34
|
-
self.saving = False
|
35
|
-
|
36
|
-
self.filename = None
|
37
|
-
self.filestream = None
|
38
|
-
|
39
|
-
self.color = None
|
40
|
-
|
41
|
-
self.magic = 0x88 # 0x11 for the 634XG
|
42
|
-
# Should automatically shift encoding if wrong.
|
43
|
-
|
44
|
-
# self.magic = 0x38
|
45
|
-
self.lut_swizzle, self.lut_unswizzle = swizzles_lut(self.magic)
|
46
|
-
|
47
|
-
self.channel = None
|
48
|
-
|
49
|
-
self.program_mode = False
|
50
|
-
self.reply = None
|
51
|
-
self.realtime = None
|
52
|
-
|
53
|
-
self.process_commands = True
|
54
|
-
self.swizzle_mode = True
|
55
|
-
|
56
|
-
self.scale = UNITS_PER_uM
|
57
|
-
|
58
|
-
self.job = RDJob(
|
59
|
-
driver=device.driver,
|
60
|
-
priority=0,
|
61
|
-
channel=self._channel,
|
62
|
-
units_to_device_matrix=units_to_device_matrix,
|
63
|
-
|
64
|
-
|
65
|
-
self.
|
66
|
-
|
67
|
-
|
68
|
-
self.
|
69
|
-
self.
|
70
|
-
self.
|
71
|
-
self.
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
self.
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
response =
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
self.
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
@
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
self.
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
if array[2] ==
|
197
|
-
self._describe(array,
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
return True
|
336
|
-
elif array[0] ==
|
337
|
-
self._describe(array, "
|
338
|
-
return True
|
339
|
-
elif array[0] ==
|
340
|
-
self._describe(array, "
|
341
|
-
return True
|
342
|
-
elif array[0] ==
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
self.
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
return True
|
378
|
-
elif array[1] ==
|
379
|
-
self._describe(array, "Home
|
380
|
-
return True
|
381
|
-
elif array[1] ==
|
382
|
-
self._describe(array, "Home
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
return True
|
391
|
-
elif array[1] ==
|
392
|
-
self._describe(array, "
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
return True
|
450
|
-
elif array[1] ==
|
451
|
-
self._describe(array, "
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
self._describe(array, "KeyUp
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
return True
|
509
|
-
elif array[1] ==
|
510
|
-
self._describe(array, "
|
511
|
-
return True
|
512
|
-
elif array[1] ==
|
513
|
-
self._describe(array, "Home
|
514
|
-
return True
|
515
|
-
elif array[1] ==
|
516
|
-
self._describe(array, "Home
|
517
|
-
return True
|
518
|
-
elif array[1] ==
|
519
|
-
self._describe(array, "Home
|
520
|
-
return True
|
521
|
-
elif array[1] ==
|
522
|
-
self._describe(array, "
|
523
|
-
return True
|
524
|
-
elif array[1] ==
|
525
|
-
self._describe(array, "KeyDown
|
526
|
-
return True
|
527
|
-
elif array[1] ==
|
528
|
-
self._describe(array, "KeyDown
|
529
|
-
return True
|
530
|
-
elif array[1] ==
|
531
|
-
self._describe(array, "KeyDown
|
532
|
-
return True
|
533
|
-
elif array[1] ==
|
534
|
-
self._describe(array, "KeyDown
|
535
|
-
return True
|
536
|
-
elif array[1] ==
|
537
|
-
self._describe(array, "KeyDown
|
538
|
-
return True
|
539
|
-
elif array[1] ==
|
540
|
-
self._describe(array, "KeyDown
|
541
|
-
return True
|
542
|
-
elif array[1] ==
|
543
|
-
self._describe(array, "KeyDown
|
544
|
-
return True
|
545
|
-
elif array[1] ==
|
546
|
-
self._describe(array, "
|
547
|
-
return True
|
548
|
-
elif array[1] ==
|
549
|
-
self._describe(array, "KeyUp
|
550
|
-
return True
|
551
|
-
elif array[1] ==
|
552
|
-
self._describe(array, "KeyUp
|
553
|
-
return True
|
554
|
-
elif array[1] ==
|
555
|
-
self._describe(array, "KeyUp
|
556
|
-
return True
|
557
|
-
elif array[1] ==
|
558
|
-
self._describe(array, "KeyUp
|
559
|
-
return True
|
560
|
-
elif array[1] ==
|
561
|
-
self._describe(array, "KeyUp
|
562
|
-
return True
|
563
|
-
elif array[1] ==
|
564
|
-
self._describe(array, "KeyUp
|
565
|
-
return True
|
566
|
-
elif array[1] ==
|
567
|
-
self._describe(array, "KeyUp
|
568
|
-
return True
|
569
|
-
elif array[1] ==
|
570
|
-
self._describe(array, "
|
571
|
-
return True
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
)
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
)
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
)
|
609
|
-
|
610
|
-
self.
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
)
|
618
|
-
|
619
|
-
self.
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
self.
|
696
|
-
elif array[1] ==
|
697
|
-
self._describe(array, "
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
#
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
#
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
if array
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
#
|
730
|
-
|
731
|
-
|
732
|
-
#
|
733
|
-
self.
|
734
|
-
if array[1] ==
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
for
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
name =
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
elif array[1] ==
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
self._describe(array, f"
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
if mem ==
|
882
|
-
return "Axis
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
if mem ==
|
905
|
-
return "Axis
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
if mem ==
|
928
|
-
return "Axis
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
if mem ==
|
951
|
-
return "
|
952
|
-
|
953
|
-
if mem ==
|
954
|
-
return "
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
if mem ==
|
965
|
-
return "Laser
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
if mem ==
|
976
|
-
return "Laser
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
if mem ==
|
987
|
-
return "Laser
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
if mem ==
|
1032
|
-
return "
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
return "Total Laser Work Time
|
1403
|
-
if mem ==
|
1404
|
-
# OEM
|
1405
|
-
return "Total Laser Work Time
|
1406
|
-
if mem ==
|
1407
|
-
# OEM SET
|
1408
|
-
return "Total Laser Work Time
|
1409
|
-
if mem ==
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
return "
|
1455
|
-
if mem
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
return
|
1489
|
-
|
1490
|
-
def
|
1491
|
-
return bytes([self.
|
1
|
+
"""
|
2
|
+
Ruida Emulator
|
3
|
+
|
4
|
+
The emulator allows us to listen for connections that send ruida data, we emulate that a ruida controller and turn
|
5
|
+
the received data into laser commands to be executed by the local driver.
|
6
|
+
"""
|
7
|
+
|
8
|
+
import os
|
9
|
+
from typing import Tuple, Union
|
10
|
+
|
11
|
+
from meerk40t.kernel import get_safe_path
|
12
|
+
|
13
|
+
from ..core.units import UNITS_PER_uM
|
14
|
+
from .exceptions import RuidaCommandError
|
15
|
+
from .rdjob import (
|
16
|
+
RDJob,
|
17
|
+
abscoord,
|
18
|
+
decode14,
|
19
|
+
decodeu35,
|
20
|
+
encode32,
|
21
|
+
magic_keys,
|
22
|
+
parse_commands,
|
23
|
+
parse_filenumber,
|
24
|
+
parse_mem,
|
25
|
+
swizzles_lut,
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
class RuidaEmulator:
|
30
|
+
def __init__(self, device, units_to_device_matrix):
|
31
|
+
self.device = device
|
32
|
+
self.units_to_device_matrix = units_to_device_matrix
|
33
|
+
|
34
|
+
self.saving = False
|
35
|
+
|
36
|
+
self.filename = None
|
37
|
+
self.filestream = None
|
38
|
+
|
39
|
+
self.color = None
|
40
|
+
|
41
|
+
self.magic = 0x88 # 0x11 for the 634XG
|
42
|
+
# Should automatically shift encoding if wrong.
|
43
|
+
|
44
|
+
# self.magic = 0x38
|
45
|
+
self.lut_swizzle, self.lut_unswizzle = swizzles_lut(self.magic)
|
46
|
+
|
47
|
+
self.channel = None
|
48
|
+
|
49
|
+
self.program_mode = False
|
50
|
+
self.reply = None
|
51
|
+
self.realtime = None
|
52
|
+
|
53
|
+
self.process_commands = True
|
54
|
+
self.swizzle_mode = True
|
55
|
+
|
56
|
+
self.scale = UNITS_PER_uM
|
57
|
+
|
58
|
+
self.job = RDJob(
|
59
|
+
driver=device.driver,
|
60
|
+
priority=0,
|
61
|
+
channel=self._channel,
|
62
|
+
units_to_device_matrix=units_to_device_matrix,
|
63
|
+
magic=self.magic,
|
64
|
+
)
|
65
|
+
self.z = 0.0
|
66
|
+
self.u = 0.0
|
67
|
+
|
68
|
+
self.a = 0.0
|
69
|
+
self.b = 0.0
|
70
|
+
self.c = 0.0
|
71
|
+
self.d = 0.0
|
72
|
+
self._magic_keys = magic_keys()
|
73
|
+
|
74
|
+
@property
|
75
|
+
def x(self):
|
76
|
+
return self.device.current[0]
|
77
|
+
|
78
|
+
@property
|
79
|
+
def y(self):
|
80
|
+
return self.device.current[1]
|
81
|
+
|
82
|
+
def __repr__(self):
|
83
|
+
return f"RuidaEmulator(@{hex(id(self))})"
|
84
|
+
|
85
|
+
def msg_reply(self, response, desc="ACK"):
|
86
|
+
if self.swizzle_mode:
|
87
|
+
if self.reply:
|
88
|
+
self.reply(self.swizzle(response))
|
89
|
+
else:
|
90
|
+
if self.realtime:
|
91
|
+
self.realtime(response)
|
92
|
+
if self.channel:
|
93
|
+
self.channel(f"<-- {response.hex()}\t({desc})")
|
94
|
+
|
95
|
+
def _set_magic(self, magic):
|
96
|
+
self.magic = magic
|
97
|
+
self.job.set_magic(magic)
|
98
|
+
self.lut_swizzle, self.lut_unswizzle = swizzles_lut(self.magic)
|
99
|
+
if self.channel:
|
100
|
+
self.channel(f"Setting magic to 0x{self.magic:02x}")
|
101
|
+
|
102
|
+
def checksum_write(self, sent_data):
|
103
|
+
"""
|
104
|
+
This is `write` with a checksum and swizzling. This is how the 50200 packets arrive and need to be processed.
|
105
|
+
|
106
|
+
@param sent_data: Packet data.
|
107
|
+
@return:
|
108
|
+
"""
|
109
|
+
self.swizzle_mode = True
|
110
|
+
if len(sent_data) < 2:
|
111
|
+
return # Cannot contain a checksum.
|
112
|
+
data = sent_data[2:1472]
|
113
|
+
checksum_check = (sent_data[0] & 0xFF) << 8 | sent_data[1] & 0xFF
|
114
|
+
checksum_sum = sum(data) & 0xFFFF
|
115
|
+
if len(data) == 4:
|
116
|
+
magic = self._magic_keys.get(data)
|
117
|
+
if magic is not None:
|
118
|
+
self._set_magic(magic)
|
119
|
+
if checksum_check == checksum_sum:
|
120
|
+
response = b"\xCC"
|
121
|
+
self.msg_reply(response, desc="Checksum match")
|
122
|
+
else:
|
123
|
+
response = b"\xCF"
|
124
|
+
self.msg_reply(
|
125
|
+
response, desc=f"Checksum Fail ({checksum_sum} != {checksum_check})"
|
126
|
+
)
|
127
|
+
if self.channel:
|
128
|
+
self.channel("--> " + str(data.hex()))
|
129
|
+
return
|
130
|
+
self.write(data)
|
131
|
+
|
132
|
+
def realtime_write(self, bytes_to_write):
|
133
|
+
"""
|
134
|
+
Real time commands are replied to and sent in realtime. For Ruida devices these are sent along udp 50207.
|
135
|
+
|
136
|
+
@param bytes_to_write:
|
137
|
+
@return: bytes to write.
|
138
|
+
"""
|
139
|
+
self.swizzle_mode = False
|
140
|
+
self.msg_reply(b"\xCC") # Clear ACK.
|
141
|
+
self.write(bytes_to_write, unswizzle=False)
|
142
|
+
|
143
|
+
def write(self, data, unswizzle=True):
|
144
|
+
"""
|
145
|
+
Procedural commands sent in large data chunks. This can be through USB or UDP or a loaded file. These are
|
146
|
+
expected to be unswizzled with the swizzle_mode set for the reply. Write will parse out the individual commands
|
147
|
+
and send those to the command routine.
|
148
|
+
|
149
|
+
@param data:
|
150
|
+
@param unswizzle: Whether the given data should be unswizzled
|
151
|
+
@return:
|
152
|
+
"""
|
153
|
+
packet = self.unswizzle(data) if unswizzle else data
|
154
|
+
for command in parse_commands(packet):
|
155
|
+
array = list(command)
|
156
|
+
try:
|
157
|
+
if not self._process_realtime(array):
|
158
|
+
self.job.write_command(command)
|
159
|
+
self.device.spooler.send(self.job, prevent_duplicate=True)
|
160
|
+
except (RuidaCommandError, IndexError):
|
161
|
+
if self.channel:
|
162
|
+
self.channel(f"Process Failure: {str(bytes(array).hex())}")
|
163
|
+
|
164
|
+
def _channel(self, text):
|
165
|
+
if self.channel:
|
166
|
+
self.channel(text)
|
167
|
+
|
168
|
+
def _describe(self, array, desc):
|
169
|
+
if self.channel:
|
170
|
+
self.channel(f"--> {str(bytes(array).hex())}\t({desc})")
|
171
|
+
|
172
|
+
def _respond(self, respond, desc=None):
|
173
|
+
if respond is not None:
|
174
|
+
self.msg_reply(respond, desc=desc)
|
175
|
+
|
176
|
+
def _process_realtime(self, array):
|
177
|
+
"""
|
178
|
+
Test whether the given command is realtime or interfacing code. Should return True if the job does not deal
|
179
|
+
with the given command type.
|
180
|
+
|
181
|
+
@param array:
|
182
|
+
@return: If realtime or machine interfacing code.
|
183
|
+
"""
|
184
|
+
if array[0] < 0x80:
|
185
|
+
if self.channel:
|
186
|
+
self.channel(f"NOT A COMMAND: {array[0]}")
|
187
|
+
raise RuidaCommandError
|
188
|
+
elif array[0] == 0xA5:
|
189
|
+
# Interface key values. These are de facto realtime. Only seen in android app. UDP: 50207
|
190
|
+
key = None
|
191
|
+
if array[1] == 0x50:
|
192
|
+
key = "Down"
|
193
|
+
elif array[1] == 0x51:
|
194
|
+
key = "Up"
|
195
|
+
if array[1] == 0x53:
|
196
|
+
if array[2] == 0x00:
|
197
|
+
self._describe(array, "Interface Frame")
|
198
|
+
else:
|
199
|
+
if array[2] == 0x02:
|
200
|
+
self._describe(array, f"Interface +X {key}")
|
201
|
+
if key == "Down":
|
202
|
+
try:
|
203
|
+
self.device.driver.move_right(True)
|
204
|
+
except AttributeError:
|
205
|
+
pass
|
206
|
+
else:
|
207
|
+
try:
|
208
|
+
self.device.driver.move_right(False)
|
209
|
+
except AttributeError:
|
210
|
+
pass
|
211
|
+
elif array[2] == 0x01:
|
212
|
+
self._describe(array, f"Interface -X {key}")
|
213
|
+
if key == "Down":
|
214
|
+
try:
|
215
|
+
self.device.driver.move_left(True)
|
216
|
+
except AttributeError:
|
217
|
+
pass
|
218
|
+
else:
|
219
|
+
try:
|
220
|
+
self.device.driver.move_left(False)
|
221
|
+
except AttributeError:
|
222
|
+
pass
|
223
|
+
if array[2] == 0x03:
|
224
|
+
self._describe(array, f"Interface +Y {key}")
|
225
|
+
if key == "Down":
|
226
|
+
try:
|
227
|
+
self.device.driver.move_top(True)
|
228
|
+
except AttributeError:
|
229
|
+
pass
|
230
|
+
else:
|
231
|
+
try:
|
232
|
+
self.device.driver.move_top(False)
|
233
|
+
except AttributeError:
|
234
|
+
pass
|
235
|
+
elif array[2] == 0x04:
|
236
|
+
self._describe(array, f"Interface -Y {key}")
|
237
|
+
if key == "Down":
|
238
|
+
try:
|
239
|
+
self.device.driver.move_bottom(True)
|
240
|
+
except AttributeError:
|
241
|
+
pass
|
242
|
+
else:
|
243
|
+
try:
|
244
|
+
self.device.driver.move_bottom(False)
|
245
|
+
except AttributeError:
|
246
|
+
pass
|
247
|
+
if array[2] == 0x0A:
|
248
|
+
self._describe(array, f"Interface +Z {key}")
|
249
|
+
if key == "Down":
|
250
|
+
try:
|
251
|
+
self.device.driver.move_plus_z(True)
|
252
|
+
except AttributeError:
|
253
|
+
pass
|
254
|
+
else:
|
255
|
+
try:
|
256
|
+
self.device.driver.move_plus_z(False)
|
257
|
+
except AttributeError:
|
258
|
+
pass
|
259
|
+
elif array[2] == 0x0B:
|
260
|
+
self._describe(array, f"Interface -Z {key}")
|
261
|
+
if key == "Down":
|
262
|
+
try:
|
263
|
+
self.device.driver.move_minus_z(True)
|
264
|
+
except AttributeError:
|
265
|
+
pass
|
266
|
+
else:
|
267
|
+
try:
|
268
|
+
self.device.driver.move_minus_z(False)
|
269
|
+
except AttributeError:
|
270
|
+
pass
|
271
|
+
if array[2] == 0x0C:
|
272
|
+
self._describe(array, f"Interface +U {key}")
|
273
|
+
if key == "Down":
|
274
|
+
try:
|
275
|
+
self.device.driver.move_plus_u(True)
|
276
|
+
except AttributeError:
|
277
|
+
pass
|
278
|
+
else:
|
279
|
+
try:
|
280
|
+
self.device.driver.move_plus_u(False)
|
281
|
+
except AttributeError:
|
282
|
+
pass
|
283
|
+
elif array[2] == 0x0D:
|
284
|
+
self._describe(array, f"Interface -U {key}")
|
285
|
+
if key == "Down":
|
286
|
+
try:
|
287
|
+
self.device.driver.move_minus_u(True)
|
288
|
+
except AttributeError:
|
289
|
+
pass
|
290
|
+
else:
|
291
|
+
try:
|
292
|
+
self.device.driver.move_minus_u(False)
|
293
|
+
except AttributeError:
|
294
|
+
pass
|
295
|
+
elif array[2] == 0x05:
|
296
|
+
self._describe(array, f"Interface Pulse {key}")
|
297
|
+
if key == "Down":
|
298
|
+
try:
|
299
|
+
self.device.driver.laser_on()
|
300
|
+
except AttributeError:
|
301
|
+
pass
|
302
|
+
else:
|
303
|
+
try:
|
304
|
+
self.device.driver.laser_off()
|
305
|
+
except AttributeError:
|
306
|
+
pass
|
307
|
+
elif array[2] == 0x11:
|
308
|
+
self._describe(array, "Interface Speed")
|
309
|
+
elif array[2] == 0x06:
|
310
|
+
self._describe(array, "Interface Start/Pause")
|
311
|
+
try:
|
312
|
+
self.device.driver.pause()
|
313
|
+
except AttributeError:
|
314
|
+
pass
|
315
|
+
elif array[2] == 0x09:
|
316
|
+
self._describe(array, "Interface Stop")
|
317
|
+
try:
|
318
|
+
self.device.driver.reset()
|
319
|
+
except AttributeError:
|
320
|
+
pass
|
321
|
+
elif array[2] == 0x5A:
|
322
|
+
self._describe(array, "Interface Reset")
|
323
|
+
elif array[2] == 0x0F:
|
324
|
+
self._describe(array, "Interface Trace On/Off")
|
325
|
+
elif array[2] == 0x07:
|
326
|
+
self._describe(array, "Interface ESC")
|
327
|
+
elif array[2] == 0x12:
|
328
|
+
self._describe(array, "Interface Laser Gate")
|
329
|
+
elif array[2] == 0x08:
|
330
|
+
self._describe(array, "Interface Origin")
|
331
|
+
try:
|
332
|
+
self.device.driver.move_abs(0, 0)
|
333
|
+
except AttributeError:
|
334
|
+
pass
|
335
|
+
return True
|
336
|
+
elif array[0] == 0xCC:
|
337
|
+
self._describe(array, "ACK from machine")
|
338
|
+
return True
|
339
|
+
elif array[0] == 0xCD:
|
340
|
+
self._describe(array, "ERR from machine")
|
341
|
+
return True
|
342
|
+
elif array[0] == 0xCE:
|
343
|
+
self._describe(array, "Keep Alive")
|
344
|
+
return True
|
345
|
+
elif array[0] == 0xD7:
|
346
|
+
# END OF FILE.
|
347
|
+
self.filename = None
|
348
|
+
self.program_mode = False
|
349
|
+
self._describe(array, "End Of File")
|
350
|
+
return False
|
351
|
+
elif array[0] == 0xD8:
|
352
|
+
if array[1] == 0x00:
|
353
|
+
self._describe(array, "Start Process")
|
354
|
+
self.program_mode = True
|
355
|
+
return False
|
356
|
+
elif array[1] == 0x01:
|
357
|
+
self._describe(array, "Stop Process")
|
358
|
+
try:
|
359
|
+
self.device.driver.reset()
|
360
|
+
self.device.driver.home()
|
361
|
+
except AttributeError:
|
362
|
+
pass
|
363
|
+
return True
|
364
|
+
elif array[1] == 0x02:
|
365
|
+
self._describe(array, "Pause Process")
|
366
|
+
try:
|
367
|
+
self.device.driver.pause()
|
368
|
+
except AttributeError:
|
369
|
+
pass
|
370
|
+
return True
|
371
|
+
elif array[1] == 0x03:
|
372
|
+
self._describe(array, "Restore Process")
|
373
|
+
try:
|
374
|
+
self.device.driver.resume()
|
375
|
+
except AttributeError:
|
376
|
+
pass
|
377
|
+
return True
|
378
|
+
elif array[1] == 0x2C:
|
379
|
+
self._describe(array, "Home Z")
|
380
|
+
return True
|
381
|
+
elif array[1] == 0x2D:
|
382
|
+
self._describe(array, "Home U")
|
383
|
+
return True
|
384
|
+
elif array[1] == 0x2A:
|
385
|
+
self._describe(array, "Home XY")
|
386
|
+
try:
|
387
|
+
self.device.driver.home()
|
388
|
+
except AttributeError:
|
389
|
+
pass
|
390
|
+
return True
|
391
|
+
elif array[1] == 0x2E:
|
392
|
+
self._describe(array, "FocusZ")
|
393
|
+
return True
|
394
|
+
elif array[1] == 0x20:
|
395
|
+
self._describe(array, "KeyDown -X +Left")
|
396
|
+
try:
|
397
|
+
self.device.driver.move_left(True)
|
398
|
+
except AttributeError:
|
399
|
+
pass
|
400
|
+
return True
|
401
|
+
elif array[1] == 0x21:
|
402
|
+
self._describe(array, "KeyDown +X +Right")
|
403
|
+
try:
|
404
|
+
self.device.driver.move_right(True)
|
405
|
+
except AttributeError:
|
406
|
+
pass
|
407
|
+
return True
|
408
|
+
elif array[1] == 0x22:
|
409
|
+
self._describe(array, "KeyDown +Y +Top")
|
410
|
+
try:
|
411
|
+
self.device.driver.move_top(True)
|
412
|
+
except AttributeError:
|
413
|
+
pass
|
414
|
+
return True
|
415
|
+
elif array[1] == 0x23:
|
416
|
+
self._describe(array, "KeyDown -Y +Bottom")
|
417
|
+
try:
|
418
|
+
self.device.driver.move_down(True)
|
419
|
+
except AttributeError:
|
420
|
+
pass
|
421
|
+
return True
|
422
|
+
elif array[1] == 0x24:
|
423
|
+
self._describe(array, "KeyDown +Z")
|
424
|
+
try:
|
425
|
+
self.device.driver.move_plus_z(True)
|
426
|
+
except AttributeError:
|
427
|
+
pass
|
428
|
+
return True
|
429
|
+
elif array[1] == 0x25:
|
430
|
+
self._describe(array, "KeyDown -Z")
|
431
|
+
try:
|
432
|
+
self.device.driver.move_minus_z(True)
|
433
|
+
except AttributeError:
|
434
|
+
pass
|
435
|
+
return True
|
436
|
+
elif array[1] == 0x26:
|
437
|
+
self._describe(array, "KeyDown +U")
|
438
|
+
try:
|
439
|
+
self.device.driver.move_plus_u(True)
|
440
|
+
except AttributeError:
|
441
|
+
pass
|
442
|
+
return True
|
443
|
+
elif array[1] == 0x27:
|
444
|
+
self._describe(array, "KeyDown -U")
|
445
|
+
try:
|
446
|
+
self.device.driver.move_minus_u(True)
|
447
|
+
except AttributeError:
|
448
|
+
pass
|
449
|
+
return True
|
450
|
+
elif array[1] == 0x28:
|
451
|
+
self._describe(array, "KeyDown 0x21")
|
452
|
+
return True
|
453
|
+
elif array[1] == 0x30:
|
454
|
+
self._describe(array, "KeyUp -X +Left")
|
455
|
+
try:
|
456
|
+
self.device.driver.move_left(False)
|
457
|
+
except AttributeError:
|
458
|
+
pass
|
459
|
+
return True
|
460
|
+
elif array[1] == 0x31:
|
461
|
+
self._describe(array, "KeyUp +X +Right")
|
462
|
+
try:
|
463
|
+
self.device.driver.move_right(False)
|
464
|
+
except AttributeError:
|
465
|
+
pass
|
466
|
+
return True
|
467
|
+
elif array[1] == 0x32:
|
468
|
+
self._describe(array, "KeyUp +Y +Top")
|
469
|
+
try:
|
470
|
+
self.device.driver.move_top(False)
|
471
|
+
except AttributeError:
|
472
|
+
pass
|
473
|
+
return True
|
474
|
+
elif array[1] == 0x33:
|
475
|
+
self._describe(array, "KeyUp -Y +Bottom")
|
476
|
+
try:
|
477
|
+
self.device.driver.move_down(False)
|
478
|
+
except AttributeError:
|
479
|
+
pass
|
480
|
+
return True
|
481
|
+
elif array[1] == 0x34:
|
482
|
+
self._describe(array, "KeyUp +Z")
|
483
|
+
try:
|
484
|
+
self.device.driver.move_plus_z(False)
|
485
|
+
except AttributeError:
|
486
|
+
pass
|
487
|
+
return True
|
488
|
+
elif array[1] == 0x35:
|
489
|
+
try:
|
490
|
+
self.device.driver.move_minus_z(False)
|
491
|
+
except AttributeError:
|
492
|
+
pass
|
493
|
+
self._describe(array, "KeyUp -Z")
|
494
|
+
return True
|
495
|
+
elif array[1] == 0x36:
|
496
|
+
self._describe(array, "KeyUp +U")
|
497
|
+
try:
|
498
|
+
self.device.driver.move_plus_u(False)
|
499
|
+
except AttributeError:
|
500
|
+
pass
|
501
|
+
return True
|
502
|
+
elif array[1] == 0x37:
|
503
|
+
self._describe(array, "KeyUp -U")
|
504
|
+
try:
|
505
|
+
self.device.driver.move_minus_u(False)
|
506
|
+
except AttributeError:
|
507
|
+
pass
|
508
|
+
return True
|
509
|
+
elif array[1] == 0x38:
|
510
|
+
self._describe(array, "KeyUp 0x20")
|
511
|
+
return True
|
512
|
+
elif array[1] == 0x39:
|
513
|
+
self._describe(array, "Home A")
|
514
|
+
return True
|
515
|
+
elif array[1] == 0x3A:
|
516
|
+
self._describe(array, "Home B")
|
517
|
+
return True
|
518
|
+
elif array[1] == 0x3B:
|
519
|
+
self._describe(array, "Home C")
|
520
|
+
return True
|
521
|
+
elif array[1] == 0x3C:
|
522
|
+
self._describe(array, "Home D")
|
523
|
+
return True
|
524
|
+
elif array[1] == 0x40:
|
525
|
+
self._describe(array, "KeyDown 0x18")
|
526
|
+
return True
|
527
|
+
elif array[1] == 0x41:
|
528
|
+
self._describe(array, "KeyDown 0x19")
|
529
|
+
return True
|
530
|
+
elif array[1] == 0x42:
|
531
|
+
self._describe(array, "KeyDown 0x1A")
|
532
|
+
return True
|
533
|
+
elif array[1] == 0x43:
|
534
|
+
self._describe(array, "KeyDown 0x1B")
|
535
|
+
return True
|
536
|
+
elif array[1] == 0x44:
|
537
|
+
self._describe(array, "KeyDown 0x1C")
|
538
|
+
return True
|
539
|
+
elif array[1] == 0x45:
|
540
|
+
self._describe(array, "KeyDown 0x1D")
|
541
|
+
return True
|
542
|
+
elif array[1] == 0x46:
|
543
|
+
self._describe(array, "KeyDown 0x1E")
|
544
|
+
return True
|
545
|
+
elif array[1] == 0x47:
|
546
|
+
self._describe(array, "KeyDown 0x1F")
|
547
|
+
return True
|
548
|
+
elif array[1] == 0x48:
|
549
|
+
self._describe(array, "KeyUp 0x08")
|
550
|
+
return True
|
551
|
+
elif array[1] == 0x49:
|
552
|
+
self._describe(array, "KeyUp 0x09")
|
553
|
+
return True
|
554
|
+
elif array[1] == 0x4A:
|
555
|
+
self._describe(array, "KeyUp 0x0A")
|
556
|
+
return True
|
557
|
+
elif array[1] == 0x4B:
|
558
|
+
self._describe(array, "KeyUp 0x0B")
|
559
|
+
return True
|
560
|
+
elif array[1] == 0x4C:
|
561
|
+
self._describe(array, "KeyUp 0x0C")
|
562
|
+
return True
|
563
|
+
elif array[1] == 0x4D:
|
564
|
+
self._describe(array, "KeyUp 0x0D")
|
565
|
+
return True
|
566
|
+
elif array[1] == 0x4E:
|
567
|
+
self._describe(array, "KeyUp 0x0E")
|
568
|
+
return True
|
569
|
+
elif array[1] == 0x4F:
|
570
|
+
self._describe(array, "KeyUp 0x0F")
|
571
|
+
return True
|
572
|
+
elif array[1] == 0x51:
|
573
|
+
self._describe(array, "Inhale On/Off")
|
574
|
+
return True
|
575
|
+
elif array[0] == 0xD9:
|
576
|
+
if len(array) == 1:
|
577
|
+
self._describe(array, "Unknown Directional Setting")
|
578
|
+
else:
|
579
|
+
options = array[2]
|
580
|
+
if options == 0x03:
|
581
|
+
param = "Light"
|
582
|
+
elif options == 0x02:
|
583
|
+
param = ""
|
584
|
+
elif options == 0x01:
|
585
|
+
param = "Light/Origin"
|
586
|
+
else: # options == 0x00:
|
587
|
+
param = "Origin"
|
588
|
+
|
589
|
+
if array[1] == 0x00 or array[1] == 0x50:
|
590
|
+
coord = abscoord(array[3:8])
|
591
|
+
self._describe(
|
592
|
+
array, f"Move {param} X: {coord:+}μm ({self.x},{self.y})"
|
593
|
+
)
|
594
|
+
try:
|
595
|
+
self.device.driver.move_abs(self.x + coord * self.scale, self.y)
|
596
|
+
except AttributeError:
|
597
|
+
pass
|
598
|
+
elif array[1] == 0x01 or array[1] == 0x51:
|
599
|
+
coord = abscoord(array[3:8])
|
600
|
+
self._describe(
|
601
|
+
array, f"Move {param} Y: {coord:+}μm ({self.x},{self.y})"
|
602
|
+
)
|
603
|
+
try:
|
604
|
+
self.device.driver.move_abs(self.x, self.y + coord * self.scale)
|
605
|
+
except AttributeError:
|
606
|
+
pass
|
607
|
+
elif array[1] == 0x02 or array[1] == 0x52:
|
608
|
+
coord = abscoord(array[3:8])
|
609
|
+
self._describe(
|
610
|
+
array, f"Move {param} Z: {coord:+}μm ({self.x},{self.y})"
|
611
|
+
)
|
612
|
+
try:
|
613
|
+
self.device.driver.axis("z", coord * self.scale)
|
614
|
+
except AttributeError:
|
615
|
+
pass
|
616
|
+
elif array[1] == 0x03 or array[1] == 0x53:
|
617
|
+
coord = abscoord(array[3:8])
|
618
|
+
self._describe(
|
619
|
+
array, f"Move {param} U: {coord:+}μm ({self.x},{self.y})"
|
620
|
+
)
|
621
|
+
try:
|
622
|
+
self.device.driver.axis("u", coord * self.scale)
|
623
|
+
except AttributeError:
|
624
|
+
pass
|
625
|
+
elif array[1] == 0x0F:
|
626
|
+
self._describe(array, "Feed Axis Move")
|
627
|
+
elif array[1] == 0x10 or array[1] == 0x60:
|
628
|
+
x = abscoord(array[3:8])
|
629
|
+
y = abscoord(array[8:13])
|
630
|
+
self._describe(array, f"Move {param} XY ({x}μm, {y}μm)")
|
631
|
+
if "Origin" in param:
|
632
|
+
try:
|
633
|
+
self.device.driver.move_abs(
|
634
|
+
f"{x / 1000}mm",
|
635
|
+
f"{y / 1000}mm",
|
636
|
+
)
|
637
|
+
except AttributeError:
|
638
|
+
pass
|
639
|
+
else:
|
640
|
+
try:
|
641
|
+
self.device.driver.home()
|
642
|
+
except AttributeError:
|
643
|
+
pass
|
644
|
+
elif array[1] == 0x30 or array[1] == 0x70:
|
645
|
+
x = abscoord(array[3:8])
|
646
|
+
y = abscoord(array[8:13])
|
647
|
+
self.u = abscoord(array[13 : 13 + 5])
|
648
|
+
self._describe(
|
649
|
+
array,
|
650
|
+
f"Move {param} XYU: {x}μm ({y}μm, {self.u}μm)",
|
651
|
+
)
|
652
|
+
try:
|
653
|
+
self.device.driver.move_abs(x * self.scale, y * self.scale)
|
654
|
+
self.device.driver.axis("u", self.u * self.scale)
|
655
|
+
except AttributeError:
|
656
|
+
pass
|
657
|
+
return True
|
658
|
+
elif array[0] == 0xDA:
|
659
|
+
# DA commands are usually memory or system processing commands.
|
660
|
+
|
661
|
+
mem = parse_mem(array[2:4])
|
662
|
+
name, v = self.mem_lookup(mem)
|
663
|
+
if array[1] == 0x00:
|
664
|
+
if name is None:
|
665
|
+
name = "Unmapped"
|
666
|
+
self._describe(
|
667
|
+
array,
|
668
|
+
f"Get {array[2]:02x} {array[3]:02x} (mem: {mem:04x}) ({name})",
|
669
|
+
)
|
670
|
+
if isinstance(v, int):
|
671
|
+
v = int(v)
|
672
|
+
vencode = encode32(v)
|
673
|
+
self._respond(
|
674
|
+
b"\xDA\x01" + bytes(array[2:4]) + bytes(vencode),
|
675
|
+
desc=f"Respond {array[2]:02x} {array[3]:02x} (mem: {mem:04x}) ({name}) = {v} (0x{v:08x})",
|
676
|
+
)
|
677
|
+
else:
|
678
|
+
vencode = v
|
679
|
+
self._respond(
|
680
|
+
b"\xDA\x01" + bytes(array[2:4]) + bytes(vencode),
|
681
|
+
desc=f"Respond {array[2]:02x} {array[3]:02x} (mem: {mem:04x}) ({name}) = {str(vencode)}",
|
682
|
+
)
|
683
|
+
elif array[1] == 0x01:
|
684
|
+
value0 = array[4:9]
|
685
|
+
value1 = array[9:14]
|
686
|
+
v0 = decodeu35(value0)
|
687
|
+
v1 = decodeu35(value1)
|
688
|
+
self._describe(
|
689
|
+
array,
|
690
|
+
f"Set {array[2]:02x} {array[3]:02x} (mem: {mem:04x}) ({name}) = {v0} (0x{v0:08x}) {v1} (0x{v1:08x})",
|
691
|
+
)
|
692
|
+
# MEM SET. This is sometimes inside files to set things like declared filesize
|
693
|
+
return False
|
694
|
+
elif array[1] == 0x04:
|
695
|
+
self._describe(array, "OEM On/Off, CardIO On/OFF")
|
696
|
+
elif array[1] == 0x05 or array[1] == 0x54:
|
697
|
+
self._describe(array, "Read Run Info")
|
698
|
+
self._respond(b"\xda\x05" + b"\x00" * 20, desc="Read Run Response")
|
699
|
+
elif array[1] == 0x06 or array[1] == 0x52:
|
700
|
+
self._describe(array, "Unknown/System Time.")
|
701
|
+
elif array[1] == 0x10 or array[1] == 0x53:
|
702
|
+
self._describe(array, "Set System Time")
|
703
|
+
elif array[1] == 0x30:
|
704
|
+
# Property requested with select document, upload button "fresh property"
|
705
|
+
filenumber = parse_filenumber(array[2:4])
|
706
|
+
self._describe(array, f"Upload Info 0x30 Document {filenumber}")
|
707
|
+
# Response Unverified
|
708
|
+
self._respond(
|
709
|
+
b"\xda\x30" + b"\x00" * 20, desc="Upload Info Response 0x30"
|
710
|
+
)
|
711
|
+
elif array[1] == 0x31:
|
712
|
+
# Property requested with select document, upload button "fresh property"
|
713
|
+
filenumber = parse_filenumber(array[2:4])
|
714
|
+
self._describe(array, f"Upload Info 0x31 Document {filenumber}")
|
715
|
+
# Response Unverified
|
716
|
+
self._respond(
|
717
|
+
b"\xda\x31" + b"\x00" * 20, desc="Upload Info Response 0x31"
|
718
|
+
)
|
719
|
+
elif array[1] == 0x60:
|
720
|
+
# len: 14
|
721
|
+
v = decode14(array[2:4])
|
722
|
+
self._describe(array, f"RD-FUNCTION-UNK1 {v}")
|
723
|
+
return True
|
724
|
+
elif array[0] == 0xE5: # 0xE502
|
725
|
+
if len(array) == 1:
|
726
|
+
self._describe(array, "Lightburn Swizzle Modulation E5")
|
727
|
+
return True
|
728
|
+
if array[1] == 0x00:
|
729
|
+
# RDWorks File Upload
|
730
|
+
filenumber = array[2]
|
731
|
+
self._describe(array, f"Document Page Number {filenumber}")
|
732
|
+
# Response Unverified
|
733
|
+
self._respond(b"\xe5\x00" + b"\x00" * 20, desc="Document Page Response")
|
734
|
+
if array[1] == 0x02:
|
735
|
+
# len 3
|
736
|
+
self._describe(array, "Document Data End")
|
737
|
+
if array[1] == 0x03:
|
738
|
+
self._describe(array, "Is TblCor Usable")
|
739
|
+
if array[1] == 0x04:
|
740
|
+
# Something check in data chunk write
|
741
|
+
pass
|
742
|
+
return True
|
743
|
+
elif array[0] == 0xE7:
|
744
|
+
# File Layout commands
|
745
|
+
if array[1] == 0x01:
|
746
|
+
self.filename = ""
|
747
|
+
for a in array[2:]:
|
748
|
+
if a == 0x00:
|
749
|
+
break
|
750
|
+
self.filename += chr(a)
|
751
|
+
self._describe(array, f"Filename: {self.filename}")
|
752
|
+
# self._respond(b"\xe8\x02", desc="File Packet Ack") # RESPONSE UNKNOWN
|
753
|
+
if self.saving:
|
754
|
+
self.filestream = open(get_safe_path(f"{self.filename}.rd"), "wb")
|
755
|
+
return True
|
756
|
+
elif array[0] == 0xE8:
|
757
|
+
# FILE INTERACTIONS
|
758
|
+
if array[1] == 0x00:
|
759
|
+
# e8 00 00 00 00 00
|
760
|
+
v1 = parse_filenumber(array[2:4])
|
761
|
+
v2 = parse_filenumber(array[4:6])
|
762
|
+
from glob import glob
|
763
|
+
from os.path import join, realpath
|
764
|
+
|
765
|
+
files = [
|
766
|
+
name for name in glob(join(realpath(get_safe_path(".")), "*.rd"))
|
767
|
+
]
|
768
|
+
if v1 == 0:
|
769
|
+
for f in files:
|
770
|
+
os.remove(f)
|
771
|
+
self._describe(array, "Delete All Documents")
|
772
|
+
else:
|
773
|
+
name = files[v1 - 1]
|
774
|
+
os.remove(name)
|
775
|
+
self._describe(array, f"Delete Document {v1} {v2}")
|
776
|
+
elif array[1] == 0x01:
|
777
|
+
filenumber = parse_filenumber(array[2:4])
|
778
|
+
self._describe(array, f"Document Name {filenumber}")
|
779
|
+
from glob import glob
|
780
|
+
from os.path import join, realpath
|
781
|
+
|
782
|
+
files = [
|
783
|
+
name for name in glob(join(realpath(get_safe_path(".")), "*.rd"))
|
784
|
+
]
|
785
|
+
name = files[filenumber - 1]
|
786
|
+
name = os.path.split(name)[-1]
|
787
|
+
name = name.split(".")[0]
|
788
|
+
name = name.upper()[:8]
|
789
|
+
self._respond(
|
790
|
+
bytes(array[:4]) + bytes(name, "utf8") + b"\00",
|
791
|
+
f"Document {filenumber} Named: {name}",
|
792
|
+
)
|
793
|
+
elif array[1] == 0x02:
|
794
|
+
self.saving = True
|
795
|
+
self._describe(array, "File transfer")
|
796
|
+
elif array[1] == 0x03:
|
797
|
+
filenumber = parse_filenumber(array[2:4])
|
798
|
+
|
799
|
+
from glob import glob
|
800
|
+
from os.path import join, realpath
|
801
|
+
|
802
|
+
files = [
|
803
|
+
name for name in glob(join(realpath(get_safe_path(".")), "*.rd"))
|
804
|
+
]
|
805
|
+
name = files[filenumber - 1]
|
806
|
+
try:
|
807
|
+
with open(name, "rb") as f:
|
808
|
+
self.write(f.read())
|
809
|
+
except OSError:
|
810
|
+
pass
|
811
|
+
self._describe(array, f"Start Select Document {filenumber}")
|
812
|
+
elif array[1] == 0x04:
|
813
|
+
filenumber = parse_filenumber(array[2:4])
|
814
|
+
self._describe(array, f"Calculate Document Time {filenumber}")
|
815
|
+
return True
|
816
|
+
return False
|
817
|
+
|
818
|
+
def mem_lookup(self, mem) -> Tuple[str, Union[int, bytes]]:
|
819
|
+
if mem == 0x0002:
|
820
|
+
return "Laser Info", 0 #
|
821
|
+
if mem == 0x0003:
|
822
|
+
return "Machine Def", 0 #
|
823
|
+
if mem == 0x0004:
|
824
|
+
return "IOEnable", 0 # 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, bits
|
825
|
+
if mem == 0x0005:
|
826
|
+
return "G0 Velocity", 200000 # 200 mm/s
|
827
|
+
if mem == 0x000B:
|
828
|
+
return "Eng Facula", 800 # 80%
|
829
|
+
if mem == 0x000C:
|
830
|
+
return "Home Velocity", 20000 # 20mm/s
|
831
|
+
if mem == 0x000E:
|
832
|
+
return "Eng Vert Velocity", 100000 # 100 mm/s
|
833
|
+
if mem == 0x0010:
|
834
|
+
return "System Control Mode", 0
|
835
|
+
if mem == 0x0011:
|
836
|
+
return "Laser PWM Frequency 1", 0
|
837
|
+
if mem == 0x0012:
|
838
|
+
return "Laser Min Power 1", 0
|
839
|
+
if mem == 0x0013:
|
840
|
+
return "Laser Max Power 1", 0
|
841
|
+
if mem == 0x0016:
|
842
|
+
return "Laser Attenuation", 0
|
843
|
+
if mem == 0x0017:
|
844
|
+
return "Laser PWM Frequency 2", 0
|
845
|
+
if mem == 0x0018:
|
846
|
+
return "Laser Min Power 2", 0
|
847
|
+
if mem == 0x0019:
|
848
|
+
return "Laser Max Power 2", 0
|
849
|
+
if mem == 0x001A:
|
850
|
+
return "Laser Standby Frequency 1", 0
|
851
|
+
if mem == 0x001B:
|
852
|
+
return "Laser Standby Pulse 1", 0
|
853
|
+
if mem == 0x001C:
|
854
|
+
return "Laser Standby Frequency 2", 0
|
855
|
+
if mem == 0x001D:
|
856
|
+
return "Laser Standby Pulse 2", 0
|
857
|
+
if mem == 0x001E:
|
858
|
+
return "Auto Type Space", 0
|
859
|
+
if mem == 0x001F:
|
860
|
+
return "TriColor", 0
|
861
|
+
if mem == 0x0020:
|
862
|
+
return "Axis Control Para 1", 0x4000 # True
|
863
|
+
if mem == 0x0021:
|
864
|
+
return "Axis Precision 1", 0
|
865
|
+
if mem == 0x0023:
|
866
|
+
return "Axis Max Velocity 1", 0
|
867
|
+
if mem == 0x0024:
|
868
|
+
return "Axis Start Velocity 1", 0
|
869
|
+
if mem == 0x0025:
|
870
|
+
return "Axis Max Acc 1", 0
|
871
|
+
if mem == 0x0026:
|
872
|
+
return "Axis Range 1, Get Frame X", 320000
|
873
|
+
if mem == 0x0027:
|
874
|
+
return "Axis Btn Start Velocity 1", 0
|
875
|
+
if mem == 0x0028:
|
876
|
+
return "Axis Btn Acc 1", 0
|
877
|
+
if mem == 0x0029:
|
878
|
+
return "Axis Estp Acc 1", 0
|
879
|
+
if mem == 0x002A:
|
880
|
+
return "Axis Home Offset 1", 0
|
881
|
+
if mem == 0x002B:
|
882
|
+
return "Axis Backlash 1", 0 # 0mm
|
883
|
+
|
884
|
+
if mem == 0x0030:
|
885
|
+
return "Axis Control Para 2", 0x4000 # True
|
886
|
+
if mem == 0x0031:
|
887
|
+
return "Axis Precision 2", 0
|
888
|
+
if mem == 0x0033:
|
889
|
+
return "Axis Max Velocity 2", 0
|
890
|
+
if mem == 0x0034:
|
891
|
+
return "Axis Start Velocity 2", 0
|
892
|
+
if mem == 0x0035:
|
893
|
+
return "Axis Max Acc 2", 0
|
894
|
+
if mem == 0x0036:
|
895
|
+
return "Axis Range 2, Get Frame Y", 220000
|
896
|
+
if mem == 0x0037:
|
897
|
+
return "Axis Btn Start Velocity 2", 0
|
898
|
+
if mem == 0x0038:
|
899
|
+
return "Axis Btn Acc 2", 0
|
900
|
+
if mem == 0x0039:
|
901
|
+
return "Axis Estp Acc 2", 0
|
902
|
+
if mem == 0x003A:
|
903
|
+
return "Axis Home Offset 2", 0
|
904
|
+
if mem == 0x003B:
|
905
|
+
return "Axis Backlash 2", 0 # 0 mm
|
906
|
+
|
907
|
+
if mem == 0x0040:
|
908
|
+
return "Axis Control Para 3", 0 # False
|
909
|
+
if mem == 0x0041:
|
910
|
+
return "Axis Precision 3", 0
|
911
|
+
if mem == 0x0043:
|
912
|
+
return "Axis Max Velocity 3", 0
|
913
|
+
if mem == 0x0044:
|
914
|
+
return "Axis Start Velocity 3", 0
|
915
|
+
if mem == 0x0045:
|
916
|
+
return "Axis Max Acc 3", 0
|
917
|
+
if mem == 0x0046:
|
918
|
+
return "Axis Range 3, Get Frame Z", 0
|
919
|
+
if mem == 0x0047:
|
920
|
+
return "Axis Btn Start Velocity 3", 0
|
921
|
+
if mem == 0x0048:
|
922
|
+
return "Axis Btn Acc 3", 0
|
923
|
+
if mem == 0x0049:
|
924
|
+
return "Axis Estp Acc 3", 0
|
925
|
+
if mem == 0x004A:
|
926
|
+
return "Axis Home Offset 3", 0
|
927
|
+
if mem == 0x004B:
|
928
|
+
return "Axis Backlash 3", 0
|
929
|
+
|
930
|
+
if mem == 0x0050:
|
931
|
+
return "Axis Control Para 4", 0 # False
|
932
|
+
if mem == 0x0051:
|
933
|
+
return "Axis Precision 4", 0
|
934
|
+
if mem == 0x0053:
|
935
|
+
return "Axis Max Velocity 4", 0
|
936
|
+
if mem == 0x0054:
|
937
|
+
return "Axis Start Velocity 4", 0
|
938
|
+
if mem == 0x0055:
|
939
|
+
return "Axis Max Acc 4", 0
|
940
|
+
if mem == 0x0056:
|
941
|
+
return "Axis Range 4, Get Frame U", 0
|
942
|
+
if mem == 0x0057:
|
943
|
+
return "Axis Btn Start Velocity 4", 0
|
944
|
+
if mem == 0x0058:
|
945
|
+
return "Axis Btn Acc 4", 0
|
946
|
+
if mem == 0x0059:
|
947
|
+
return "Axis Estp Acc 4", 0
|
948
|
+
if mem == 0x005A:
|
949
|
+
return "Axis Home Offset 4", 0
|
950
|
+
if mem == 0x005B:
|
951
|
+
return "Axis Backlash 4", 0
|
952
|
+
|
953
|
+
if mem == 0x0060:
|
954
|
+
return "Machine Type", 0
|
955
|
+
|
956
|
+
if mem == 0x0063:
|
957
|
+
return "Laser Min Power 3", 0
|
958
|
+
if mem == 0x0064:
|
959
|
+
return "Laser Max Power 3", 0
|
960
|
+
if mem == 0x0065:
|
961
|
+
return "Laser PWM Frequency 3", 0
|
962
|
+
if mem == 0x0066:
|
963
|
+
return "Laser Standby Frequency 3", 0
|
964
|
+
if mem == 0x0067:
|
965
|
+
return "Laser Standby Pulse 3", 0
|
966
|
+
|
967
|
+
if mem == 0x0068:
|
968
|
+
return "Laser Min Power 4", 0
|
969
|
+
if mem == 0x0069:
|
970
|
+
return "Laser Max Power 4", 0
|
971
|
+
if mem == 0x006A:
|
972
|
+
return "Laser PWM Frequency 4", 0
|
973
|
+
if mem == 0x006B:
|
974
|
+
return "Laser Standby Frequency 4", 0
|
975
|
+
if mem == 0x006C:
|
976
|
+
return "Laser Standby Pulse 4", 0
|
977
|
+
|
978
|
+
if mem == 0x006D:
|
979
|
+
return "Laser Min Power 5", 0
|
980
|
+
if mem == 0x006E:
|
981
|
+
return "Laser Max Power 5", 0
|
982
|
+
if mem == 0x006F:
|
983
|
+
return "Laser PWM Frequency 5", 0
|
984
|
+
if mem == 0x0070:
|
985
|
+
return "Laser Standby Frequency 5", 0
|
986
|
+
if mem == 0x0071:
|
987
|
+
return "Laser Standby Pulse 5", 0
|
988
|
+
|
989
|
+
if mem == 0x0072:
|
990
|
+
return "Laser Min Power 6", 0
|
991
|
+
if mem == 0x0073:
|
992
|
+
return "Laser Max Power 6", 0
|
993
|
+
if mem == 0x0074:
|
994
|
+
return "Laser PWM Frequency 6", 0
|
995
|
+
if mem == 0x0075:
|
996
|
+
return "Laser Standby Frequency 6", 0
|
997
|
+
if mem == 0x0076:
|
998
|
+
return "Laser Standby Pulse 6", 0
|
999
|
+
if mem == 0x0077:
|
1000
|
+
return "Auto Type Space 2", 0
|
1001
|
+
if mem == 0x0077:
|
1002
|
+
return "Auto Type Space 3", 0
|
1003
|
+
if mem == 0x0078:
|
1004
|
+
return "Auto Type Space 4", 0
|
1005
|
+
if mem == 0x0079:
|
1006
|
+
return "Auto Type Space 5", 0
|
1007
|
+
if mem == 0x007A:
|
1008
|
+
return "Auto Type Space 6", 0
|
1009
|
+
if mem == 0x0080:
|
1010
|
+
return "RD-UNKNOWN 2", 0
|
1011
|
+
if mem == 0x0090:
|
1012
|
+
return "RD-UNKNOWN 3", 0
|
1013
|
+
if mem == 0x00A0:
|
1014
|
+
return "RD-UNKNOWN 4", 0
|
1015
|
+
if mem == 0x00B0:
|
1016
|
+
return "RD-UNKNOWN 5", 0
|
1017
|
+
if mem == 0x0C0:
|
1018
|
+
return "Offset 8 Start", 0
|
1019
|
+
if mem == 0x0C1:
|
1020
|
+
return "Offset 8 End", 0
|
1021
|
+
if mem == 0x00C2:
|
1022
|
+
return "Offset 9 Start", 0
|
1023
|
+
if mem == 0x00C3:
|
1024
|
+
return "Offset 9 End", 0
|
1025
|
+
if mem == 0x00C4:
|
1026
|
+
return "Offset 10 Start", 0
|
1027
|
+
if mem == 0x00C5:
|
1028
|
+
return "Offset 10 End", 0
|
1029
|
+
if mem == 0x00C6:
|
1030
|
+
return "Offset 7 Start", 0
|
1031
|
+
if mem == 0x0C7:
|
1032
|
+
return "Offset 7 End", 0
|
1033
|
+
|
1034
|
+
if mem == 0x00C8:
|
1035
|
+
return "Axis Home Velocity 1", 0
|
1036
|
+
if mem == 0x00C9:
|
1037
|
+
return "Axis Home Velocity 2", 0
|
1038
|
+
if mem == 0x00CA:
|
1039
|
+
return "Margin 1", 0
|
1040
|
+
if mem == 0x00CB:
|
1041
|
+
return "Margin 2", 0
|
1042
|
+
if mem == 0x00CC:
|
1043
|
+
return "Margin 3", 0
|
1044
|
+
if mem == 0x00CD:
|
1045
|
+
return "Margin 4", 0
|
1046
|
+
if mem == 0x00CE:
|
1047
|
+
return "VWheelRatio", 0
|
1048
|
+
if mem == 0x00CF:
|
1049
|
+
return "VPunchRatio", 0
|
1050
|
+
if mem == 0x00D8:
|
1051
|
+
return "VSlotRatio", 0
|
1052
|
+
if mem == 0x00D0:
|
1053
|
+
return "In Hale Zone", 0
|
1054
|
+
if mem == 0x00D9:
|
1055
|
+
return "VSlot Share Home Offset", 0
|
1056
|
+
if mem == 0x00DA:
|
1057
|
+
return "VPunch Share Home Offset", 0
|
1058
|
+
if mem == 0x00E7:
|
1059
|
+
return "VWheel Share Home Offset", 0
|
1060
|
+
if mem == 0x0100:
|
1061
|
+
return "System Settings", 0 # bits 2,2,1,1,1,1,1,1,1,1,1
|
1062
|
+
if mem == 0x0101:
|
1063
|
+
return "Turn Velocity", 20000 # 20 m/s
|
1064
|
+
if mem == 0x0102:
|
1065
|
+
return "Syn Acc", 3000000 # 3000 mm/s2
|
1066
|
+
if mem == 0x0103:
|
1067
|
+
return "G0 Delay", 0 # 0 ms
|
1068
|
+
if mem == 0x0104:
|
1069
|
+
return "Scan Step Factor", 0
|
1070
|
+
if mem == 0x0115:
|
1071
|
+
return "Dock Point X", 0
|
1072
|
+
if mem == 0x0116:
|
1073
|
+
return "Dock Point Y", 0
|
1074
|
+
if mem == 0x0105:
|
1075
|
+
return "User Para 5", 0
|
1076
|
+
if mem == 0x0107:
|
1077
|
+
return "Feed Delay After", 0 # 0 s
|
1078
|
+
if mem == 0x0108:
|
1079
|
+
return "User Key Fast Velocity", 0
|
1080
|
+
if mem == 0x0109:
|
1081
|
+
return "Turn Acc", 400000 # 400 mm/s
|
1082
|
+
if mem == 0x010A:
|
1083
|
+
return "G0 Acc", 3000000 # 3000 mm/s2
|
1084
|
+
if mem == 0x010B:
|
1085
|
+
return "Feed Delay Prior", 0 # 0 ms
|
1086
|
+
if mem == 0x010C:
|
1087
|
+
return "Manual Distance", 0
|
1088
|
+
if mem == 0x010D:
|
1089
|
+
return "Shut Down Delay", 0
|
1090
|
+
if mem == 0x010E:
|
1091
|
+
return "Focus Depth", 5000 # 5mm
|
1092
|
+
if mem == 0x010F:
|
1093
|
+
return "Go Scale Blank", 0 # 0 mm
|
1094
|
+
if mem == 0x0117:
|
1095
|
+
return "Array Feed Repay", 0 # 0mm
|
1096
|
+
if mem == 0x0117:
|
1097
|
+
return "Rotate On Delay", 0
|
1098
|
+
if mem == 0x0119:
|
1099
|
+
return "Rotate Off Delay", 0
|
1100
|
+
if mem == 0x011A:
|
1101
|
+
return "Acc Ratio", 100 # 100%
|
1102
|
+
if mem == 0x011B:
|
1103
|
+
return "Turn Ratio", 100 # 100% (speed factor)
|
1104
|
+
if mem == 0x011C:
|
1105
|
+
return "Acc G0 Ratio", 100 # 100%
|
1106
|
+
if mem == 0x011F:
|
1107
|
+
return "Rotate Pulse", 0
|
1108
|
+
if mem == 0x0121:
|
1109
|
+
return "Rotate D", 0
|
1110
|
+
if mem == 0x0122:
|
1111
|
+
return "Eng Facula Replay", 0
|
1112
|
+
if mem == 0x0124:
|
1113
|
+
return "X Min Eng Velocity", 10000 # 10mm/s
|
1114
|
+
if mem == 0x0125:
|
1115
|
+
return "X Eng Acc", 10000000 # 10000 m/s
|
1116
|
+
if mem == 0x0126:
|
1117
|
+
return "User Para 1", 0
|
1118
|
+
if mem == 0x0128:
|
1119
|
+
return "Z Home Velocity", 0
|
1120
|
+
if mem == 0x0129:
|
1121
|
+
return "Z Work Velocity", 0
|
1122
|
+
if mem == 0x012A:
|
1123
|
+
return "Z G0 Velocity", 0
|
1124
|
+
if mem == 0x012B:
|
1125
|
+
return "Union Home Distance", 0
|
1126
|
+
if mem == 0x012C:
|
1127
|
+
return "U Home Velocity", 0
|
1128
|
+
if mem == 0x012D:
|
1129
|
+
return "U Work Velocity", 0 # Axis Dock Position Other
|
1130
|
+
if mem == 0x012E:
|
1131
|
+
return "Feed Repay", 0
|
1132
|
+
if mem == 0x0131:
|
1133
|
+
return "Manual Fast Speed", 100000 # 100 mm/s
|
1134
|
+
if mem == 0x0132:
|
1135
|
+
return "Manual Slow Speed", 10000 # 10 mm/s
|
1136
|
+
if mem == 0x0134:
|
1137
|
+
return "Y Minimum Eng Velocity", 10000 # 10mm/s
|
1138
|
+
if mem == 0x0135:
|
1139
|
+
return "Y Eng Acc", 3000000 # 3000 mm/s
|
1140
|
+
if mem == 0x0137:
|
1141
|
+
return "Eng Acc Ratio", 100 # Engraving factor 100%
|
1142
|
+
if mem == 0x0138:
|
1143
|
+
return "Sts Ahead Time", 0
|
1144
|
+
if mem == 0x0139:
|
1145
|
+
return "Repeat Delay", 0
|
1146
|
+
if mem == 0x013B:
|
1147
|
+
return "User Para 3", 0
|
1148
|
+
if mem == 0x013D:
|
1149
|
+
return "User Para 2", 0
|
1150
|
+
if mem == 0x013F:
|
1151
|
+
return "User Para 4", 0 # Pressure Monitor Delay
|
1152
|
+
if mem == 0x0140:
|
1153
|
+
return "Axis Home Velocity 3", 0
|
1154
|
+
if mem == 0x0141:
|
1155
|
+
return "Axis Work Velocity 3", 0
|
1156
|
+
if mem == 0x0142:
|
1157
|
+
return "Axis Home Velocity 4", 0
|
1158
|
+
if mem == 0x0143:
|
1159
|
+
return "Axis Work Velocity 4", 0
|
1160
|
+
if mem == 0x0144:
|
1161
|
+
return "Axis Home Velocity 5", 0
|
1162
|
+
if mem == 0x0145:
|
1163
|
+
return "Axis Work Velocity 5", 0
|
1164
|
+
if mem == 0x0146:
|
1165
|
+
return "Axis Home Velocity 6", 0
|
1166
|
+
if mem == 0x0147:
|
1167
|
+
return "Axis Work Velocity 6", 0
|
1168
|
+
if mem == 0x0148:
|
1169
|
+
return "Axis Home Velocity 7", 0
|
1170
|
+
if mem == 0x0149:
|
1171
|
+
return "Axis Work Velocity 7", 0
|
1172
|
+
if mem == 0x014A:
|
1173
|
+
return "Axis Home Velocity 8", 0
|
1174
|
+
if mem == 0x014B:
|
1175
|
+
return "Axis Work Velocity 8", 0
|
1176
|
+
if mem == 0x014C:
|
1177
|
+
return "Laser Reset Time", 0
|
1178
|
+
if mem == 0x014D:
|
1179
|
+
return "Laser Start Distance", 0
|
1180
|
+
if mem == 0x014E:
|
1181
|
+
return "Z Pen Up Pos", 0 # units 0.001
|
1182
|
+
if mem == 0x014F:
|
1183
|
+
return "Z Pen Down Pos", 0 # units 0.001
|
1184
|
+
if mem == 0x0150:
|
1185
|
+
return "Offset 1 Start", 0
|
1186
|
+
if mem == 0x0151:
|
1187
|
+
return "Offset 1 End", 0
|
1188
|
+
if mem == 0x0152:
|
1189
|
+
return "Offset 2 Start", 0
|
1190
|
+
if mem == 0x0153:
|
1191
|
+
return "Offset 2 End", 0
|
1192
|
+
if mem == 0x0154:
|
1193
|
+
return "Offset 3 Start", 0
|
1194
|
+
if mem == 0x0155:
|
1195
|
+
return "Offset 3 End", 0
|
1196
|
+
if mem == 0x0156:
|
1197
|
+
return "Offset 6 Start", 0
|
1198
|
+
if mem == 0x0157:
|
1199
|
+
return "Offset 6 End", 0
|
1200
|
+
if mem == 0x0158:
|
1201
|
+
return "Offset 4 Start", 0
|
1202
|
+
if mem == 0x0159:
|
1203
|
+
return "Offset 4 End", 0
|
1204
|
+
if mem == 0x015A:
|
1205
|
+
return "Offset 5 Start", 0
|
1206
|
+
if mem == 0x015B:
|
1207
|
+
return "Offset 5 End", 0
|
1208
|
+
if mem == 0x15C:
|
1209
|
+
return "Delay 6 On", 0
|
1210
|
+
if mem == 0x15D:
|
1211
|
+
return "Delay 6 Off", 0
|
1212
|
+
if mem == 0x15E:
|
1213
|
+
return "Delay 7 On", 0
|
1214
|
+
if mem == 0x15F:
|
1215
|
+
return "Delay 7 Off", 0
|
1216
|
+
if mem == 0x0160:
|
1217
|
+
return "Inhale On Delay", 0 # Delay 8
|
1218
|
+
if mem == 0x0161:
|
1219
|
+
return "Inhale Off Delay", 0 # Delay 8
|
1220
|
+
if mem == 0x162:
|
1221
|
+
return "Delay 5 On", 0
|
1222
|
+
if mem == 0x163:
|
1223
|
+
return "Delay 5 Off", 0
|
1224
|
+
if mem == 0x164:
|
1225
|
+
return "Delay 2 On", 0
|
1226
|
+
if mem == 0x165:
|
1227
|
+
return "Delay 2 Off", 0
|
1228
|
+
if mem == 0x0166:
|
1229
|
+
return "VSample Distance", 0
|
1230
|
+
if mem == 0x016D:
|
1231
|
+
return "VUp Angle", 0
|
1232
|
+
if mem == 0x016E:
|
1233
|
+
return "VRotatePulse", 0
|
1234
|
+
if mem == 0x177:
|
1235
|
+
return "Delay 9 On", 0
|
1236
|
+
if mem == 0x178:
|
1237
|
+
return "Delay 9 Off", 0
|
1238
|
+
if mem == 0x0169:
|
1239
|
+
return "Offset 11 Start", 0
|
1240
|
+
if mem == 0x016A:
|
1241
|
+
return "Offset 11 End", 0
|
1242
|
+
if mem == 0x16B:
|
1243
|
+
return "Tool Up Pos 4", 0
|
1244
|
+
if mem == 0x16C:
|
1245
|
+
return "Tool Down Pos 4", 0
|
1246
|
+
if mem == 0x170:
|
1247
|
+
return "Delay 1 On", 0
|
1248
|
+
if mem == 0x171:
|
1249
|
+
return "VCorner Precision", 0
|
1250
|
+
if mem == 0x172:
|
1251
|
+
return "Delay 3 On", 0
|
1252
|
+
if mem == 0x173:
|
1253
|
+
return "Delay 4 Off", 0
|
1254
|
+
if mem == 0x174:
|
1255
|
+
return "Delay 4 On", 0
|
1256
|
+
if mem == 0x175:
|
1257
|
+
return "Delay 1 Off", 0
|
1258
|
+
if mem == 0x176:
|
1259
|
+
return "Delay 3 Off", 0
|
1260
|
+
if mem == 0x0177:
|
1261
|
+
return "Idle Long Distance", 0
|
1262
|
+
if mem == 0x178:
|
1263
|
+
return "Tool Up Pos 3", 0
|
1264
|
+
if mem == 0x179:
|
1265
|
+
return "Tool Down Pos 3", 0
|
1266
|
+
if mem == 0x17A:
|
1267
|
+
return "Tool Up Pos 2", 0
|
1268
|
+
if mem == 0x17B:
|
1269
|
+
return "Tool Down Pos 2", 0
|
1270
|
+
if mem == 0x017C:
|
1271
|
+
return "Punch Rotate Delay", 0
|
1272
|
+
if mem == 0x017D:
|
1273
|
+
return "VSlot Angle", 0
|
1274
|
+
if mem == 0x017F:
|
1275
|
+
return "Tool Up Delay", 0
|
1276
|
+
if mem == 0x017E:
|
1277
|
+
return "VTool Rotate Limit", 0
|
1278
|
+
if mem == 0x0180:
|
1279
|
+
return "Card Language", 0
|
1280
|
+
if 0x181 <= mem <= 0x187:
|
1281
|
+
return f"PC Lock {mem - 0x181}", 0
|
1282
|
+
if mem == 0x0188:
|
1283
|
+
return "User Key Slow Velocity", 0
|
1284
|
+
if mem == 0x0189:
|
1285
|
+
return "MachineID 2", 0
|
1286
|
+
if mem == 0x018A:
|
1287
|
+
return "MachineID 3", 0
|
1288
|
+
if mem == 0x018B:
|
1289
|
+
return "MachineID 4", 0
|
1290
|
+
if mem == 0x018C:
|
1291
|
+
return "Blow On Delay", 0
|
1292
|
+
if mem == 0x018D:
|
1293
|
+
return "Blow Off Delay", 0
|
1294
|
+
if mem == 0x018F:
|
1295
|
+
return "User Para 6, Blower", 0
|
1296
|
+
if mem == 0x0190:
|
1297
|
+
return "Jet Time", 0
|
1298
|
+
if mem == 0x0190:
|
1299
|
+
return "Color Mark Head Max Distance", 0
|
1300
|
+
if mem == 0x0191:
|
1301
|
+
return "Color Mark Head Distance", 0
|
1302
|
+
if mem == 0x0192:
|
1303
|
+
return "Color Mark Mark Distance", 0
|
1304
|
+
if mem == 0x0193:
|
1305
|
+
return "Color Mark Camera Distance", 0 # JetOffset = 0x193 to 0x194
|
1306
|
+
if mem == 0x0194:
|
1307
|
+
return "Color Mark Sensor Offset2", 0
|
1308
|
+
if mem == 0x0195:
|
1309
|
+
return "Cylinder Down Delay", 0
|
1310
|
+
if mem == 0x0196:
|
1311
|
+
return "Cylinder Up Delay", 0
|
1312
|
+
if mem == 0x0197:
|
1313
|
+
return "Press Down Delay", 0
|
1314
|
+
if mem == 0x0198:
|
1315
|
+
return "Press Up Delay", 0
|
1316
|
+
if mem == 0x0199:
|
1317
|
+
return "Drop Position Start", 0
|
1318
|
+
if mem == 0x019A:
|
1319
|
+
return "Drop Position End", 0
|
1320
|
+
if mem == 0x019B:
|
1321
|
+
return "Drop Interval", 0
|
1322
|
+
if mem == 0x019C:
|
1323
|
+
return "Drop Time", 0
|
1324
|
+
if mem == 0x019D:
|
1325
|
+
return "Sharpen Delay On", 0
|
1326
|
+
if mem == 0x019E:
|
1327
|
+
return "Sharpen Delay Off", 0
|
1328
|
+
if mem == 0x019F:
|
1329
|
+
return "Sharpen Time Limit", 0
|
1330
|
+
if mem == 0x01A0:
|
1331
|
+
return "Sharpen Travel Limit", 0
|
1332
|
+
if mem == 0x01A1:
|
1333
|
+
return "Work End Time", 0
|
1334
|
+
if mem == 0x01A2:
|
1335
|
+
return "Color Mark Offset", 0
|
1336
|
+
if mem == 0x01A3:
|
1337
|
+
return "Color Mark Count", 0
|
1338
|
+
if mem == 0x01A4:
|
1339
|
+
return "Wheel Press Compensation", 0 # Protect IO Status
|
1340
|
+
if mem == 0x01A5:
|
1341
|
+
return "Color Mark Filter Length", 0
|
1342
|
+
if mem == 0x01A6:
|
1343
|
+
return "VBlow Back On Delay", 0
|
1344
|
+
if mem == 0x01A7:
|
1345
|
+
return "VBlow Back Off Delay", 0
|
1346
|
+
if mem == 0x01AC:
|
1347
|
+
return "Y U Safe Distance", 0
|
1348
|
+
if mem == 0x01AD:
|
1349
|
+
return "Y U Home Distance", 0
|
1350
|
+
if mem == 0x01AE:
|
1351
|
+
return "VTool Preset Position X", 0
|
1352
|
+
if mem == 0x01AF:
|
1353
|
+
return "VTool Preset Position Y", 0
|
1354
|
+
if mem == 0x01B1:
|
1355
|
+
return "VTool Preset Compensation", 0
|
1356
|
+
if mem == 0x01B2:
|
1357
|
+
return "VTool Preset Cur Depth", 0
|
1358
|
+
if mem == 0x0200:
|
1359
|
+
# 22 ok, 23 paused. 21 running.
|
1360
|
+
pos, state, minor = self.device.driver.status()
|
1361
|
+
if state == "idle":
|
1362
|
+
return "Machine Status", 22
|
1363
|
+
if state == "hold":
|
1364
|
+
return "Machine Status", 23
|
1365
|
+
if state == "busy":
|
1366
|
+
return "Machine Status", 21
|
1367
|
+
return "Machine Status", 22
|
1368
|
+
if mem == 0x0201:
|
1369
|
+
return "Total Open Time (s)", 0
|
1370
|
+
if mem == 0x0202:
|
1371
|
+
return "Total Work Time (s)", 0
|
1372
|
+
if mem == 0x0203:
|
1373
|
+
return "Total Work Number", 0
|
1374
|
+
if mem == 0x0205:
|
1375
|
+
from glob import glob
|
1376
|
+
from os.path import join, realpath
|
1377
|
+
|
1378
|
+
files = [name for name in glob(join(realpath(get_safe_path(".")), "*.rd"))]
|
1379
|
+
v = len(files)
|
1380
|
+
return "Total Doc Number", v
|
1381
|
+
if mem == 0x0206:
|
1382
|
+
from os.path import realpath
|
1383
|
+
from shutil import disk_usage
|
1384
|
+
|
1385
|
+
total, used, free = disk_usage(realpath(get_safe_path(".")))
|
1386
|
+
v = min(total, 100000000) # Max 100 megs.
|
1387
|
+
return "Flash Space", v
|
1388
|
+
if mem == 0x0207:
|
1389
|
+
from os.path import realpath
|
1390
|
+
from shutil import disk_usage
|
1391
|
+
|
1392
|
+
total, used, free = disk_usage(realpath(get_safe_path(".")))
|
1393
|
+
v = min(free, 100000000) # Max 100 megs.
|
1394
|
+
return "Flash Space", v
|
1395
|
+
if mem == 0x0208:
|
1396
|
+
return "Previous Work Time", 0
|
1397
|
+
if mem == 0x0211:
|
1398
|
+
return "Total Laser Work Time", 0
|
1399
|
+
if mem == 0x0212:
|
1400
|
+
return "File Custom Flag / Feed Info", 0
|
1401
|
+
if mem == 0x0217:
|
1402
|
+
return "Total Laser Work Time 2", 0
|
1403
|
+
if mem == 0x0218:
|
1404
|
+
# OEM PULSE ENERGY
|
1405
|
+
return "Total Laser Work Time 3", 0
|
1406
|
+
if mem == 0x0219:
|
1407
|
+
# OEM SET CURRENT
|
1408
|
+
return "Total Laser Work Time 4", 0
|
1409
|
+
if mem == 0x021A:
|
1410
|
+
# OEM SET FREQUENCY
|
1411
|
+
return "Total Laser Work Time 5", 0
|
1412
|
+
if mem == 0x021F:
|
1413
|
+
return "Ring Number", 0
|
1414
|
+
if mem == 0x0221:
|
1415
|
+
pos, state, minor = self.device.driver.status()
|
1416
|
+
x, y = self.units_to_device_matrix.point_in_inverse_space(pos)
|
1417
|
+
x /= self.scale
|
1418
|
+
return "Axis Preferred Position 1, Pos X", int(x)
|
1419
|
+
if mem == 0x0223:
|
1420
|
+
return "X Total Travel (m)", 0
|
1421
|
+
if mem == 0x0224:
|
1422
|
+
return "Position Point 0", 0
|
1423
|
+
if mem == 0x0231:
|
1424
|
+
pos, state, minor = self.device.driver.status()
|
1425
|
+
x, y = self.units_to_device_matrix.point_in_inverse_space(pos)
|
1426
|
+
y /= self.scale
|
1427
|
+
return "Axis Preferred Position 2, Pos Y", int(y)
|
1428
|
+
if mem == 0x0233:
|
1429
|
+
return "Y Total Travel (m)", 0
|
1430
|
+
if mem == 0x0234:
|
1431
|
+
return "Position Point 1", 0
|
1432
|
+
if mem == 0x0241:
|
1433
|
+
pos, state, minor = self.device.driver.status()
|
1434
|
+
if len(pos) >= 3:
|
1435
|
+
z = pos[2]
|
1436
|
+
else:
|
1437
|
+
z = self.job.z
|
1438
|
+
return "Axis Preferred Position 3, Pos Z", int(z)
|
1439
|
+
if mem == 0x0243:
|
1440
|
+
return "Z Total Travel (m)", 0
|
1441
|
+
if mem == 0x0251:
|
1442
|
+
return "Axis Preferred Position 4, Pos U", int(self.job.u)
|
1443
|
+
if mem == 0x0253:
|
1444
|
+
return "U Total Travel (m)", 0
|
1445
|
+
if mem == 0x025A:
|
1446
|
+
return "Axis Preferred Position 5, Pos A", int(self.job.a)
|
1447
|
+
if mem == 0x025B:
|
1448
|
+
return "Axis Preferred Position 6, Pos B", int(self.job.b)
|
1449
|
+
if mem == 0x025C:
|
1450
|
+
return "Axis Preferred Position 7, Pos C", int(self.job.c)
|
1451
|
+
if mem == 0x025D:
|
1452
|
+
return "Axis Preferred Position 8, Pos D", int(self.job.d)
|
1453
|
+
if mem == 0x0260:
|
1454
|
+
return "DocumentWorkNum", 0
|
1455
|
+
if 0x0261 <= mem < 0x02C4:
|
1456
|
+
# Unsure if this is where the document numbers end.
|
1457
|
+
return "Document Number", mem - 0x260
|
1458
|
+
if mem == 0x02C4:
|
1459
|
+
return "Read Scan Backlash Flag", 0
|
1460
|
+
if mem == 0x02C5:
|
1461
|
+
return "Read Scan Backlash 1", 0
|
1462
|
+
if mem == 0x02D5:
|
1463
|
+
return "Read Scan Backlash 2", 0
|
1464
|
+
if mem == 0x02FE:
|
1465
|
+
return "Card ID", 0x65006500 # RDC6442G
|
1466
|
+
if mem == 0x02FF:
|
1467
|
+
return "Mainboard Version", b"MEERK40T\x00"
|
1468
|
+
if mem == 0x0313:
|
1469
|
+
return "Material Thickness", 0
|
1470
|
+
if mem == 0x031C:
|
1471
|
+
return "File Fault", 0 # Error counter.
|
1472
|
+
if mem == 0x0320:
|
1473
|
+
return "File Total Length", 0
|
1474
|
+
if mem == 0x0321:
|
1475
|
+
return "File Progress Len", 0
|
1476
|
+
if mem == 0x033B:
|
1477
|
+
return "Read Process Feed Length", 0
|
1478
|
+
if mem == 0x0340:
|
1479
|
+
return "Stop Time", 0
|
1480
|
+
if 0x0391 <= mem < 0x0420:
|
1481
|
+
return f"Time for File {mem - 0x00390} to Run", 100
|
1482
|
+
if mem == 0x0591:
|
1483
|
+
return "Card Lock", 0 # 0x55aaaa55
|
1484
|
+
if mem == 0x05C0:
|
1485
|
+
return "Laser Life", 0
|
1486
|
+
if 0x05C0 <= mem < 0x600:
|
1487
|
+
pass
|
1488
|
+
return "Unknown", 0
|
1489
|
+
|
1490
|
+
def unswizzle(self, data):
|
1491
|
+
return bytes([self.lut_unswizzle[b] for b in data])
|
1492
|
+
|
1493
|
+
def swizzle(self, data):
|
1494
|
+
return bytes([self.lut_swizzle[b] for b in data])
|