Skip to content

Commit

Permalink
idex belt tension script
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Jan 24, 2024
1 parent a8fd55f commit 629105d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scripts/idex-generate-belt-tension-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,40 @@ then

if [ $T2 -eq 1 ]
then
if [ ! -e "/tmp/raw_data_y_toolboard_t2.csv" ]
if [ ! -e "/tmp/raw_data_y_toolboard_t0_t2.csv" ]
then
echo "ERROR: No y data found for left toolhead (T0)"
exit 1
fi
if [ ! -e "/tmp/raw_data_y_toolboardb_t2.csv" ]
if [ ! -e "/tmp/raw_data_y_toolboard_t1_t2.csv" ]
then
echo "ERROR: No y data found for right toolhead (T1)"
exit 1
fi
cp /tmp/raw_data_y_toolboard_t2.csv /tmp/left_y_belt_tension.csv
cp /tmp/raw_data_y_toolboardb_t2.csv /tmp/right_y_belt_tension.csv
cp /tmp/raw_data_y_toolboard_t0_t2.csv /tmp/left_y_belt_tension.csv
cp /tmp/raw_data_y_toolboard_t1_t2.csv /tmp/right_y_belt_tension.csv
fi

if [ $T2 -eq 0 ]
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/raw_data_y_toolboard_t0.csv" ]
if [ ! -e "/tmp/raw_data_y_toolboard_t0_t0.csv" ]
then
echo "ERROR: No y data found for left toolhead (T0)"
exit 1
fi
cp /tmp/raw_data_y_toolboard_t0.csv /tmp/left_y_belt_tension.csv
cp /tmp/raw_data_y_toolboard_t0_t0.csv /tmp/left_y_belt_tension.csv
fi

if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/raw_data_y_toolboardb_t1.csv" ]
if [ ! -e "/tmp/raw_data_y_toolboard_t1_t1.csv" ]
then
echo "ERROR: No y data found for right toolhead (T1)"
exit 1
fi
cp /tmp/raw_data_y_toolboardb_t1.csv /tmp/right_y_belt_tension.csv
cp /tmp/raw_data_y_toolboard_t1_t1.csv /tmp/right_y_belt_tension.csv
fi
fi

Expand All @@ -89,22 +89,22 @@ then

if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/raw_data_x_toolboard_t0.csv" ]
if [ ! -e "/tmp/raw_data_x_toolboard_t0_t0.csv" ]
then
echo "ERROR: No x data found for the left toolhead (T0)"
exit 1
fi
cp /tmp/raw_data_x_toolboard_t0.csv /tmp/left_x_belt_tension.csv
cp /tmp/raw_data_x_toolboard_t0_t0.csv /tmp/left_x_belt_tension.csv
fi

if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/raw_data_x_toolboardb_t1.csv" ]
if [ ! -e "/tmp/raw_data_x_toolboard_t1_t1.csv" ]
then
echo "ERROR: No x data found for right toolhbead (T1)"
exit 1
fi
cp /tmp/raw_data_x_toolboardb_t1.csv /tmp/right_x_belt_tension.csv
cp /tmp/raw_data_x_toolboard_t1_t1.csv /tmp/right_x_belt_tension.csv
fi

/home/pi/klipper/scripts/graph_accelerometer.py -c /tmp/*_x_belt_tension.csv -o /home/pi/printer_data/config/input_shaper/x_tension_comparison_"$DATE".png
Expand Down

0 comments on commit 629105d

Please sign in to comment.