Skip to content

Commit

Permalink
Fix idex schell script linting
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Jan 21, 2024
1 parent 6ac528f commit ec89264
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions scripts/idex-generate-belt-tension-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ then
fi
fi

/home/pi/klipper/scripts/graph_accelerometer.py -c /tmp/*_y_belt_tension.csv -o /home/pi/printer_data/config/input_shaper/y_tension_comparison_$DATE.png
/home/pi/klipper/scripts/graph_accelerometer.py -c /tmp/*_y_belt_tension.csv -o /home/pi/printer_data/config/input_shaper/y_tension_comparison_"$DATE".png
fi
if [ $DISABLE_X -eq 0 ]
then
Expand All @@ -107,5 +107,5 @@ then
cp /tmp/raw_data_x_toolboardb_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
/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
fi
98 changes: 49 additions & 49 deletions scripts/idex-generate-shaper-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,84 +52,84 @@ then
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t0.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t0.csv" ]
then
echo "ERROR: No y data found for T0"
exit 1
fi
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t0.csv /tmp/t0_y.csv
cp "/tmp/resonances_y_$4_$5_$6_t0.csv" /tmp/t0_y.csv
echo "please wait..."
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_y.csv -o /home/pi/printer_data/config/input_shaper/t0_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t0.csv
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_y.csv -o /home/pi/printer_data/config/input_shaper/t0_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t0.csv"
fi

if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t1.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t1.csv" ]
then
echo "ERROR: No y data found for T1"
exit 1
fi
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t1.csv /tmp/t1_y.csv
cp "/tmp/resonances_y_$4_$5_$6_t1.csv" /tmp/t1_y.csv
echo "please wait..."
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_y.csv -o /home/pi/printer_data/config/input_shaper/t1_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t1.csv
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_y.csv -o /home/pi/printer_data/config/input_shaper/t1_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t1.csv"
fi
fi

if [ $IDEX -eq 1 ]
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t0_copy.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t0_copy.csv" ]
then
echo "ERROR: No y data found for T0 copy mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t0_copy.csv /tmp/t0_copy_y.csv
[ -e "/tmp/t0_copy_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_copy_y.csv -o /home/pi/printer_data/config/input_shaper/t0_copy_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t0_copy.csv
cp "/tmp/resonances_y_$4_$5_$6_t0_copy.csv" /tmp/t0_copy_y.csv
[ -e "/tmp/t0_copy_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_copy_y.csv -o /home/pi/printer_data/config/input_shaper/t0_copy_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t0_copy.csv"
fi
if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t1_copy.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t1_copy.csv" ]
then
echo "ERROR: No y data found for T1 copy mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t1_copy.csv /tmp/t1_copy_y.csv
[ -e "/tmp/t1_copy_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_copy_y.csv -o /home/pi/printer_data/config/input_shaper/t1_copy_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t1_copy.csv
cp "/tmp/resonances_y_$4_$5_$6_t1_copy.csv" /tmp/t1_copy_y.csv
[ -e "/tmp/t1_copy_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_copy_y.csv -o /home/pi/printer_data/config/input_shaper/t1_copy_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t1_copy.csv"
fi
fi

if [ $IDEX -eq 2 ]
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t0_mirror.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t0_mirror.csv" ]
then
echo "ERROR: No y data found for T0 mirror mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t0_mirror.csv /tmp/t0_mirror_y.csv
[ -e "/tmp/t0_mirror_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_mirror_y.csv -o /home/pi/printer_data/config/input_shaper/t0_mirror_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t0_mirror.csv
cp "/tmp/resonances_y_$4_$5_$6_t0_mirror.csv" /tmp/t0_mirror_y.csv
[ -e "/tmp/t0_mirror_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_mirror_y.csv -o /home/pi/printer_data/config/input_shaper/t0_mirror_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t0_mirror.csv"
fi
if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_y_"$4"_"$5"_"$6"_t1_mirror.csv" ]
if [ ! -e "/tmp/resonances_y_$4_$5_$6_t1_mirror.csv" ]
then
echo "ERROR: No y data found for T1 mirror mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_y_"$4"_"$5"_"$6"_t1_mirror.csv /tmp/t1_mirror_y.csv
[ -e "/tmp/t1_mirror_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_mirror_y.csv -o /home/pi/printer_data/config/input_shaper/t1_mirror_resonances_y_$DATE.png
rm /tmp/resonances_y_"$4"_"$5"_"$6"_t1_mirror.csv
cp "/tmp/resonances_y_$4_$5_$6_t1_mirror.csv" /tmp/t1_mirror_y.csv
[ -e "/tmp/t1_mirror_y.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_mirror_y.csv -o /home/pi/printer_data/config/input_shaper/t1_mirror_resonances_y_"$DATE".png
rm "/tmp/resonances_y_$4_$5_$6_t1_mirror.csv"
fi
fi
fi
Expand All @@ -147,85 +147,85 @@ then
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t0.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t0.csv" ]
then
echo "ERROR: resonances_x_"$4"_"$5"_"$6"_t0.csv"
echo "ERROR: resonances_x_$4_$5_$6_t0.csv"
echo "ERROR: No x data found for T0"
exit 1
fi
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t0.csv /tmp/t0_x.csv
cp "/tmp/resonances_x_$4_$5_$6_t0.csv" /tmp/t0_x.csv
echo "please wait..."
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_x.csv -o /home/pi/printer_data/config/input_shaper/t0_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t0.csv
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_x.csv -o /home/pi/printer_data/config/input_shaper/t0_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t0.csv"
fi

if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t1.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t1.csv" ]
then
echo "ERROR: No x data found for T1"
exit 1
fi
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t1.csv /tmp/t1_x.csv
cp "/tmp/resonances_x_$4_$5_$6_t1.csv" /tmp/t1_x.csv
echo "please wait..."
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_x.csv -o /home/pi/printer_data/config/input_shaper/t1_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t1.csv
/home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_x.csv -o /home/pi/printer_data/config/input_shaper/t1_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t1.csv"
fi
fi

if [ $IDEX -eq 1 ]
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t0_copy.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t0_copy.csv" ]
then
echo "ERROR: No x data found for T0 copy mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t0_copy.csv /tmp/t0_copy_x.csv
[ -e "/tmp/t0_copy_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_copy_x.csv -o /home/pi/printer_data/config/input_shaper/t0_copy_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t0_copy.csv
cp "/tmp/resonances_x_$4_$5_$6_t0_copy.csv" /tmp/t0_copy_x.csv
[ -e "/tmp/t0_copy_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_copy_x.csv -o /home/pi/printer_data/config/input_shaper/t0_copy_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t0_copy.csv"
fi
if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t1_copy.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t1_copy.csv" ]
then
echo "ERROR: No x data found for T1 copy mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t1_copy.csv /tmp/t1_copy_x.csv
[ -e "/tmp/t1_copy_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_copy_x.csv -o /home/pi/printer_data/config/input_shaper/t1_copy_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t1_copy.csv
cp "/tmp/resonances_x_$4_$5_$6_t1_copy.csv" /tmp/t1_copy_x.csv
[ -e "/tmp/t1_copy_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_copy_x.csv -o /home/pi/printer_data/config/input_shaper/t1_copy_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t1_copy.csv"
fi
fi

if [ $IDEX -eq 2 ]
then
if [ $T0 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t0_mirror.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t0_mirror.csv" ]
then
echo "ERROR: No x data found for T0 mirror mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t0_mirror.csv /tmp/t0_mirror_x.csv
[ -e "/tmp/t0_mirror_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_mirror_x.csv -o /home/pi/printer_data/config/input_shaper/t0_mirror_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t0_mirror.csv
cp "/tmp/resonances_x_$4_$5_$6_t0_mirror.csv" /tmp/t0_mirror_x.csv
[ -e "/tmp/t0_mirror_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t0_mirror_x.csv -o /home/pi/printer_data/config/input_shaper/t0_mirror_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t0_mirror.csv"
fi
if [ $T1 -eq 1 ]
then
if [ ! -e "/tmp/resonances_x_"$4"_"$5"_"$6"_t1_mirror.csv" ]
if [ ! -e "/tmp/resonances_x_$4_$5_$6_t1_mirror.csv" ]
then
echo "ERROR: No x data found for T1 mirror mode"
exit 1
fi
echo "please wait..."
cp /tmp/resonances_x_"$4"_"$5"_"$6"_t1_mirror.csv /tmp/t1_mirror_x.csv
[ -e "/tmp/t1_mirror_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_mirror_x.csv -o /home/pi/printer_data/config/input_shaper/t1_mirror_resonances_x_$DATE.png
rm /tmp/resonances_x_"$4"_"$5"_"$6"_t1_mirror.csv
cp "/tmp/resonances_x_$4_$5_$6_t1_mirror.csv" /tmp/t1_mirror_x.csv
[ -e "/tmp/t1_mirror_x.csv" ] && /home/pi/klipper/scripts/calibrate_shaper.py /tmp/t1_mirror_x.csv -o /home/pi/printer_data/config/input_shaper/t1_mirror_resonances_x_"$DATE".png
rm "/tmp/resonances_x_$4_$5_$6_t1_mirror.csv"
fi
fi
fi

0 comments on commit ec89264

Please sign in to comment.