forked from KlipperScreen/KlipperScreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2e979f
commit d2036c1
Showing
104 changed files
with
8,082 additions
and
581 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,147 @@ | ||
[ | ||
{ | ||
"name": "Home", | ||
"icon": "home", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Home All", | ||
"icon": "home", | ||
"method": "post_printer_gcode", | ||
"params": {"script": "G28"} | ||
}, | ||
{ | ||
"name": "Home X", | ||
"icon": "home-x", | ||
"method": "post_printer_gcode", | ||
"params": {"script": "G28 X"} | ||
}, | ||
{ | ||
"name": "Home Y", | ||
"icon": "home-y", | ||
"method": "post_printer_gcode", | ||
"params": {"script": "G28 Y"} | ||
}, | ||
{ | ||
"name": "Home Z", | ||
"icon": "home-z", | ||
"method": "post_printer_gcode", | ||
"params": {"script": "G28 Z"} | ||
} | ||
{ | ||
"preheat_options": { | ||
"PLA": { | ||
"tool": 195, | ||
"bed": 40 | ||
}, | ||
"ABS":{ | ||
"tool": 220, | ||
"bed": 90 | ||
} | ||
}, | ||
"mainmenu": [ | ||
{ | ||
"name": "Homing", | ||
"icon": "home", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Home All", | ||
"icon": "home", | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "G28"} | ||
}, | ||
{ | ||
"name": "Home X", | ||
"icon": "home-x", | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "G28 X"} | ||
}, | ||
{ | ||
"name": "Home Y", | ||
"icon": "home-y", | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "G28 Y"} | ||
}, | ||
{ | ||
"name": "Home Z", | ||
"icon": "home-z", | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "G28 Z"} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Preheat", | ||
"icon": "heat-up", | ||
"panel": "preheat" | ||
}, | ||
{ | ||
"name": "Actions" , | ||
"icon": "actions", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Move", | ||
"icon": "move", | ||
"panel": "move" | ||
}, | ||
{ | ||
"name": "Extrude", | ||
"icon": "filament", | ||
"panel": "extrude" | ||
}, | ||
{ | ||
"name": "Fan", | ||
"icon": "fan", | ||
"panel": "fan" | ||
}, | ||
{ | ||
"name": "Temperature", | ||
"icon": "heat-up", | ||
"panel": "temperature" | ||
}, | ||
{ | ||
"name": "Disable Motors", | ||
"icon": "motor-off", | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "M18"}, | ||
"command": { | ||
"method": "post_printer_gcode_script", | ||
"params": {"script": "M18"} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Configuration", | ||
"icon": "control", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Bed Level", | ||
"icon": "bed-level", | ||
"panel": "bed_level" | ||
}, | ||
{ | ||
"name": "ZOffsets", | ||
"icon": "z-offset-increase", | ||
"panel": "zcalibrate" | ||
}, | ||
{ | ||
"name": "Network", | ||
"icon": "network", | ||
"panel": "network" | ||
}, | ||
{ | ||
"name": "System", | ||
"icon": "info", | ||
"panel": "system" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Print", | ||
"icon": "print", | ||
"panel": "print" | ||
} | ||
], | ||
"printmenu": [ | ||
{ | ||
"name": "Temperature", | ||
"icon": "heat-up", | ||
"panel": "temperature" | ||
}, | ||
{ | ||
"name": "Tuning", | ||
"icon": "fan", | ||
"panel": "finetune" | ||
}, | ||
{ | ||
"name": "Network", | ||
"icon": "network", | ||
"panel": "network" | ||
}, | ||
{ | ||
"name": "System", | ||
"icon": "info", | ||
"panel": "system" | ||
}, | ||
{ | ||
"name": "Extrude", | ||
"icon": "filament", | ||
"panel": "extrude" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Actions" , | ||
"icon": "actions", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Move", | ||
"icon": "move", | ||
"panel": "move" | ||
}, | ||
{ | ||
"name": "Extrude", | ||
"icon": "filament", | ||
"panel": "extrude_multitool" | ||
}, | ||
{ | ||
"name": "Fan", | ||
"icon": "fan", | ||
"panel": "fan" | ||
}, | ||
{ | ||
"name": "Temperature", | ||
"icon": "heat-up", | ||
"panel": "temperature" | ||
}, | ||
{ | ||
"name": "Control", | ||
"icon": "control", | ||
"panel": "control" | ||
}, | ||
{ | ||
"name": "ToolChanger", | ||
"icon": "toolchanger", | ||
"panel": "toolchanger" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Filament", | ||
"icon": "filament" | ||
}, | ||
{ | ||
"name": "Configuration", | ||
"icon": "control", | ||
"panel": "menu", | ||
"items": [ | ||
{ | ||
"name": "Bed Level", | ||
"icon": "bed-level", | ||
"panel": "bed-level" | ||
}, | ||
{ | ||
"name": "ZOffsets", | ||
"icon": "z-offset-increase", | ||
"panel": "nozzle-calibration" | ||
}, | ||
{ | ||
"name": "Network", | ||
"icon": "network", | ||
"panel": "network" | ||
}, | ||
{ | ||
"name": "System", | ||
"icon": "info", | ||
"panel": "system" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Print", | ||
"icon": "print" | ||
} | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
class KlippyGcodes: | ||
|
||
HOME = "G28" | ||
HOME_X = "G28 X" | ||
HOME_Y = "G28 Y" | ||
HOME_Z = "G28 Z" | ||
|
||
MOVE = "G1" | ||
MOVE_ABSOLUTE = "G90" | ||
MOVE_RELATIVE = "G91" | ||
|
||
EXTRUDE_ABS = "M82" | ||
EXTRUDE_REL = "M83" | ||
|
||
SET_EXT_TEMP = "M104" | ||
MAX_EXT_TEMP = 300 | ||
|
||
SET_BED_TEMP = "M140" | ||
MAX_BED_TEMP = 150 | ||
|
||
SET_FAN_SPEED = "M106" | ||
|
||
PROBE_CALIBRATE = "PROBE_CALIBRATE" | ||
PROBE_MOVE = "TESTZ Z=" | ||
PROBE_ABORT = "ABORT" | ||
PROBE_ACCEPT = "ACCEPT" | ||
|
||
SAVE_CONFIG = "SAVE_CONFIG" | ||
RESTART = "RESTART" | ||
FIRMWARE_RESTART= "FIRMWARE_RESTART" | ||
|
||
|
||
@staticmethod | ||
def set_bed_temp(temp): | ||
return KlippyGcodes.SET_BED_TEMP + " S" + str(temp) | ||
|
||
@staticmethod | ||
def set_ext_temp(temp, tool=0): | ||
return KlippyGcodes.SET_EXT_TEMP + " T" + tool + " S" + str(temp) | ||
|
||
@staticmethod | ||
def set_fan_speed(speed): | ||
speed = str( int(float(int(speed) % 101)/100*255) ) | ||
return KlippyGcodes.SET_FAN_SPEED + " S"+ speed | ||
|
||
@staticmethod | ||
def probe_move(dist): | ||
return KlippyGcodes.PROBE_MOVE + dist | ||
|
||
@staticmethod | ||
def extrude(dist, speed=500): | ||
return KlippyGcodes.MOVE + " E" + dist + " F" + speed |
Oops, something went wrong.