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