mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-01-11 02:30:05 +00:00
final adjustments with hardware
This commit is contained in:
@@ -28,7 +28,7 @@ STEPPER_INVERTED_E = True
|
||||
# means zero position.
|
||||
ENDSTOP_INVERTED_X = True
|
||||
ENDSTOP_INVERTED_Y = True
|
||||
ENDSTOP_INVERTED_Z = True
|
||||
ENDSTOP_INVERTED_Z = False # Auto leveler
|
||||
|
||||
# Workplace physical size.
|
||||
TABLE_SIZE_X_MM = 200
|
||||
@@ -42,12 +42,12 @@ SPINDLE_MAX_RPM = 10000
|
||||
EXTRUDER_MAX_TEMPERATURE = 250
|
||||
BED_MAX_TEMPERATURE = 100
|
||||
MIN_TEMPERATURE = 40
|
||||
EXTRUDER_PID = {"P": 0.0993079964195,
|
||||
"I": 0.00267775053311,
|
||||
"D": 0.267775053311}
|
||||
BED_PID = {"P": 5.06820175723,
|
||||
"I": 0.0476413193519,
|
||||
"D": 4.76413193519}
|
||||
EXTRUDER_PID = {"P": 0.059161177519,
|
||||
"I": 0.00206217171374,
|
||||
"D": 0.206217171374}
|
||||
BED_PID = {"P": 0.226740848076,
|
||||
"I": 0.00323956215053,
|
||||
"D": 0.323956215053}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Pins configuration.
|
||||
|
||||
@@ -37,12 +37,12 @@ class GMachine(object):
|
||||
hal.init()
|
||||
|
||||
def release(self):
|
||||
""" Return machine to original position and free all resources.
|
||||
""" Free all resources.
|
||||
"""
|
||||
self.safe_zero()
|
||||
self._spindle(0)
|
||||
for h in self._heaters:
|
||||
self._heaters[h].stop()
|
||||
self._fan(False)
|
||||
hal.deinit()
|
||||
|
||||
def reset(self):
|
||||
@@ -183,7 +183,7 @@ class GMachine(object):
|
||||
pq = q
|
||||
return ea, eb
|
||||
|
||||
def _circular(self, delta, radius, velocity, direction):
|
||||
def _move_circular(self, delta, radius, velocity, direction):
|
||||
delta = delta.round(1.0 / STEPPER_PULSES_PER_MM_X,
|
||||
1.0 / STEPPER_PULSES_PER_MM_Y,
|
||||
1.0 / STEPPER_PULSES_PER_MM_Z,
|
||||
@@ -360,9 +360,9 @@ class GMachine(object):
|
||||
elif c == 'G1': # linear interpolation
|
||||
self._move_linear(delta, velocity)
|
||||
elif c == 'G2': # circular interpolation, clockwise
|
||||
self._circular(delta, radius, velocity, CW)
|
||||
self._move_circular(delta, radius, velocity, CW)
|
||||
elif c == 'G3': # circular interpolation, counterclockwise
|
||||
self._circular(delta, radius, velocity, CCW)
|
||||
self._move_circular(delta, radius, velocity, CCW)
|
||||
elif c == 'G4': # delay in s
|
||||
if not gcode.has('P'):
|
||||
raise GMachineException("P is not specified")
|
||||
|
||||
Reference in New Issue
Block a user