Skip to content

Commit

Permalink
Simplify device listings and add longer ray5
Browse files Browse the repository at this point in the history
  • Loading branch information
Laserology committed Oct 22, 2024
1 parent 43e9751 commit 8de7145
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 95 deletions.
12 changes: 4 additions & 8 deletions meerk40t/balormk/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ def plugin(kernel, lifecycle):
"The JCZ Controller is a type of Galvo Laser Controller for several different sources compatible with the EZCad2™ software."
),
"priority": 9,
"family": _("Fibre-Laser"),
"family_priority": 30,
"family": _("Generic Fibre-Laser"),
"choices": [
{
"attr": "label",
Expand All @@ -58,8 +57,7 @@ def plugin(kernel, lifecycle):
+ "\n"
+ _("With this driver we specifically enable the MOPA feature."),
"priority": 8,
"family": _("Fibre-Laser"),
"family_priority": 30,
"family": _("Generic Fibre-Laser"),
"choices": [
{
"attr": "label",
Expand Down Expand Up @@ -89,8 +87,7 @@ def plugin(kernel, lifecycle):
"With specific settings for the CO2 source. (No specific settings are known)."
),
"priority": 7,
"family": _("CO2-Laser"),
"family_priority": 99,
"family": _("Generic CO2-Laser"),
"choices": [
{
"attr": "label",
Expand All @@ -116,8 +113,7 @@ def plugin(kernel, lifecycle):
"With specific settings for the UV source. (No specific settings are known)."
),
"priority": 6,
"family": _("UV-Laser"),
"family_priority": 10,
"family": _("Generic UV-Laser"),
"choices": [
{
"attr": "label",
Expand Down
47 changes: 36 additions & 11 deletions meerk40t/grbl/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def plugin(kernel, lifecycle=None):
"friendly_name": _("Generic (GRBL-Controller)"),
"extended_info": _("Generic GRBL Laser Device."),
"priority": 17,
"family": _("Generic"),
"family_priority": 20,
"family": _("Generic Diode-Laser"),
"choices": [
{
"attr": "label",
Expand All @@ -59,7 +58,6 @@ def plugin(kernel, lifecycle=None):
),
"priority": 20,
"family": _("Generic"),
"family_priority": 20,
"choices": [
{
"attr": "label",
Expand All @@ -84,15 +82,14 @@ def plugin(kernel, lifecycle=None):
"dev_info/grbl-k40",
{
"provider": "provider/device/grbl",
"friendly_name": _("K40 (GRBL-Controller)"),
"friendly_name": _("K40 CO2 (GRBL-Controller)"),
"extended_info": _("K40 laser with a modified GRBL laser controller."),
"priority": 18,
"family": _("CO2-Laser"),
"family_priority": 99,
"family": _("K-Series CO2-Laser"),
"choices": [
{
"attr": "label",
"default": "GRBL-K40",
"default": "GRBL-K40-CO2",
},
{
"attr": "has_endstops",
Expand Down Expand Up @@ -126,8 +123,7 @@ def plugin(kernel, lifecycle=None):
"Any of a variety of inexpensive GRBL based diode lasers."
),
"priority": 19,
"family": _("Diode-Laser"),
"family_priority": 50,
"family": _("Generic"),
"choices": [
{
"attr": "label",
Expand All @@ -151,8 +147,7 @@ def plugin(kernel, lifecycle=None):
"friendly_name": _("Ortur Laser Master 2 (GRBL)"),
"extended_info": _("Ortur-branded self-assembled grbl diode lasers"),
"priority": 21,
"family": _("Diode-Laser"),
"family_priority": 50,
"family": _("Ortur Diode-Laser"),
"choices": [
{
"attr": "label",
Expand All @@ -175,6 +170,36 @@ def plugin(kernel, lifecycle=None):
],
},
)
kernel.register(
"dev_info/grbl-longer-ray5",
{
"provider": "provider/device/grbl",
"friendly_name": _("Longer Ray5 (GRBL)"),
"extended_info": _("Longer-branded 10w/20w grbl diode laser."),
"priority": 21,
"family": _("Longer Diode-Laser"),
"choices": [
{
"attr": "label",
"default": "Longer-Ray5",
},
{
"attr": "has_endstops",
"default": False,
},
{
"attr": "source",
"default": "diode",
},
{
"attr": "require_validator",
"default": False,
},
{"attr": "bedheight", "default": "450mm"},
{"attr": "bedwidth", "default": "450mm"},
],
},
)
kernel.register("driver/grbl", GRBLDriver)
kernel.register("spoolerjob/grbl", GcodeJob)
kernel.register("interpreter/grbl", GRBLInterpreter)
Expand Down
3 changes: 1 addition & 2 deletions meerk40t/gui/devicepanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def populate_tree(self):
tree_root = tree.AddRoot(_("Devices"))
self.dev_infos = list(self.context.find("dev_info"))
self.dev_infos.sort(
key=lambda e: str(e[0].get("family_priority", 0))
key=lambda e: str(e[0].get("family", 0))
+ "_"
+ str(e[0].get("priority", 0)),
reverse=True,
Expand All @@ -136,7 +136,6 @@ def populate_tree(self):
parent_item = tree.AppendItem(tree_root, family)
device_item = tree.AppendItem(parent_item, info)
tree.SetItemData(device_item, index)
tree.ExpandAll()

def on_text_filter(self, event):
self.filter = self.text_filter.GetValue()
Expand Down
6 changes: 2 additions & 4 deletions meerk40t/lihuiyu/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def plugin(kernel, lifecycle=None):
+ "The most recent and popular revision version is 6C6879-LASER-M2:9."
),
"priority": 99,
"family": _("CO2-Laser"),
"family_priority": 99,
"family": _("K-Series CO2-Laser"),
"choices": [
{
"attr": "label",
Expand Down Expand Up @@ -66,8 +65,7 @@ def plugin(kernel, lifecycle=None):
+ "The M3Nano Plus variation replaces the A4988 stepper motor chips with TMC stepper motor chips."
),
"priority": 90,
"family": _("CO2-Laser"),
"family_priority": 99,
"family": _("K-Series CO2-Laser"),
"choices": [
{
"attr": "board",
Expand Down
3 changes: 1 addition & 2 deletions meerk40t/moshi/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def plugin(kernel, lifecycle=None):
+ "The boards are usually red and sport two large black heatsinks for their stepper motor chips."
),
"priority": 0,
"family": _("CO2-Laser"),
"family_priority": 99,
"family": _("Generic CO2-Laser"),
"choices": [
{
"attr": "label",
Expand Down
Loading

0 comments on commit 8de7145

Please sign in to comment.