adding files

This commit is contained in:
2026-03-21 23:48:08 +01:00
parent eba2b73dec
commit 18f86cfd1e
105 changed files with 13770 additions and 0 deletions

View 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

View 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
View 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)

View File

@@ -0,0 +1,3 @@
#!/bin/bash
#do nothing
exit 0

View 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

View 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
View 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

View 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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
#do nothing
exit 0

4
my-3d/custom-m-codes/M84 Normal file
View 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

View File

@@ -0,0 +1,4 @@
o<stop_idle_hold> sub
M103
o<stop_idle_hold> endsub
M2

View File

@@ -0,0 +1,3 @@
o<do_nothing> sub
o<do_nothing> endsub
M2

View File

@@ -0,0 +1,4 @@
o<stop_idle_hold> sub
M102
o<stop_idle_hold> endsub
M2

View File

@@ -0,0 +1,4 @@
o<stop_idle_hold> sub
M103
o<stop_idle_hold> endsub
M2