adding files
This commit is contained in:
4
my-3d/custom-m-codes/M102
Normal file
4
my-3d/custom-m-codes/M102
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# file to turn on parport pin XX to close the IO break out bord relay
|
||||
halcmd setp and2.0.in1 1
|
||||
exit 0
|
||||
4
my-3d/custom-m-codes/M103
Normal file
4
my-3d/custom-m-codes/M103
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# file to turn on parport pin XX to close the IO break out bord relay
|
||||
halcmd setp and2.0.in1 0
|
||||
exit 0
|
||||
12
my-3d/custom-m-codes/M104
Normal file
12
my-3d/custom-m-codes/M104
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/python3
|
||||
# M104: Set Extruder Temperature
|
||||
import sys
|
||||
import hal
|
||||
|
||||
_dummy = hal.component("dummy")
|
||||
|
||||
P = sys.argv[1]
|
||||
setVal = str(int(float(P))) #convert from float-in-a-string to int-in-a-string
|
||||
hal.set_p("my-temp-ctrl.ref-temp", setVal)
|
||||
|
||||
print("M104 P" + setVal)
|
||||
3
my-3d/custom-m-codes/M105
Normal file
3
my-3d/custom-m-codes/M105
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
#do nothing
|
||||
exit 0
|
||||
6
my-3d/custom-m-codes/M106
Normal file
6
my-3d/custom-m-codes/M106
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# M106: Set Extruder fan PWM
|
||||
temp=$1
|
||||
echo fan-pwm $temp
|
||||
halcmd sets fan-pwm-value $temp
|
||||
exit 0
|
||||
4
my-3d/custom-m-codes/M107
Normal file
4
my-3d/custom-m-codes/M107
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# M107: Fan Off
|
||||
halcmd sets fan-pwm-value 0.0
|
||||
exit 0
|
||||
28
my-3d/custom-m-codes/M109
Normal file
28
my-3d/custom-m-codes/M109
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# M109: Set Extruder Temperature and Wait
|
||||
float_ref=$1
|
||||
printf -v int_ref %.0f "$float_ref"
|
||||
curr=$(halcmd getp my-temp-ctrl.curr-temp)
|
||||
|
||||
halcmd setp my-temp-ctrl.ref-temp $int_ref
|
||||
echo curr $curr
|
||||
echo ref $int_ref
|
||||
|
||||
CNT=0
|
||||
let ref=int_ref-2
|
||||
# do until reference temp is greater or equal to current temp
|
||||
echo curr $curr, ref $ref
|
||||
until [ $curr -ge $ref ]
|
||||
do
|
||||
sleep 1
|
||||
curr=$(halcmd getp my-temp-ctrl.curr-temp)
|
||||
echo curr $curr, ref $ref
|
||||
echo cnt $CNT
|
||||
let CNT=CNT+1
|
||||
if [ "$CNT" = 60 ]; then
|
||||
echo timeout
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
echo M109 P$int_ref
|
||||
exit 0
|
||||
6
my-3d/custom-m-codes/M140
Normal file
6
my-3d/custom-m-codes/M140
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
# M140: Set Bed Temperature (Fast)
|
||||
v=$1
|
||||
echo bed-pwm $v
|
||||
halcmd sets bed-pwm-value $v
|
||||
exit 0
|
||||
3
my-3d/custom-m-codes/M190
Normal file
3
my-3d/custom-m-codes/M190
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
#do nothing
|
||||
exit 0
|
||||
4
my-3d/custom-m-codes/M84
Normal file
4
my-3d/custom-m-codes/M84
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
# file to turn on parport pin XX to close the IO break out bord relay
|
||||
halcmd setp and2.0.in1 0
|
||||
exit 0
|
||||
4
my-3d/custom-m-codes/disable_steppers.ngc
Normal file
4
my-3d/custom-m-codes/disable_steppers.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
o<stop_idle_hold> sub
|
||||
M103
|
||||
o<stop_idle_hold> endsub
|
||||
M2
|
||||
3
my-3d/custom-m-codes/do_nothing.ngc
Normal file
3
my-3d/custom-m-codes/do_nothing.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
o<do_nothing> sub
|
||||
o<do_nothing> endsub
|
||||
M2
|
||||
4
my-3d/custom-m-codes/enable_steppers.ngc
Normal file
4
my-3d/custom-m-codes/enable_steppers.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
o<stop_idle_hold> sub
|
||||
M102
|
||||
o<stop_idle_hold> endsub
|
||||
M2
|
||||
4
my-3d/custom-m-codes/stop_idle_hold.ngc
Normal file
4
my-3d/custom-m-codes/stop_idle_hold.ngc
Normal file
@@ -0,0 +1,4 @@
|
||||
o<stop_idle_hold> sub
|
||||
M103
|
||||
o<stop_idle_hold> endsub
|
||||
M2
|
||||
Reference in New Issue
Block a user