mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-07 06:08:08 +02:00
tools: fix pointer acceleration graphs generation script
We're printing most of those those as mm/s now, improve to use gnuplot for loops, and a few other fixes. The low-dpi graph is still out of whack (or the implementation is?), need to fix that separately. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2a31b21554
commit
651651f8a8
1 changed files with 35 additions and 33 deletions
|
|
@ -7,48 +7,54 @@ if [[ -e '$tool' ]]; then
|
||||||
echo "Unable to find $tool"
|
echo "Unable to find $tool"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
speeds="-1 -0.75 -0.5 -0.25 0 0.5 1"
|
||||||
|
|
||||||
outfile="ptraccel-linear"
|
outfile="ptraccel-linear"
|
||||||
for speed in -1 -0.75 -0.5 -0.25 0 0.5 1; do
|
for speed in $speeds; do
|
||||||
$tool --mode=accel --dpi=1000 --filter=linear --speed=$speed > $outfile-$speed.gnuplot
|
$tool --mode=accel --dpi=1000 --filter=linear --speed=$speed > $outfile-$speed.gnuplot
|
||||||
done
|
done
|
||||||
$gnuplot <<EOF
|
$gnuplot <<EOF
|
||||||
set terminal svg enhanced background rgb 'white'
|
set terminal svg enhanced background rgb 'white'
|
||||||
set output "$outfile.svg"
|
set output "$outfile.svg"
|
||||||
set xlabel "speed in units/us"
|
set xlabel "speed in mm/s"
|
||||||
set ylabel "accel factor"
|
set ylabel "accel factor"
|
||||||
set style data lines
|
set style data lines
|
||||||
set yrange [0:3]
|
set yrange [0:3]
|
||||||
set xrange [0:0.003]
|
set xrange [0:400]
|
||||||
plot "$outfile--1.gnuplot" using 1:2 title "-1.0", \
|
speeds="$speeds"
|
||||||
"$outfile--0.75.gnuplot" using 1:2 title "-0.75", \
|
fname(s)=sprintf("$outfile-%s.gnuplot", s)
|
||||||
"$outfile--0.5.gnuplot" using 1:2 title "-0.5", \
|
plot for [s in speeds] fname(s) using 1:2 title s, \
|
||||||
"$outfile--0.25.gnuplot" using 1:2 title "-0.25", \
|
|
||||||
"$outfile-0.gnuplot" using 1:2 title "0.0", \
|
|
||||||
"$outfile-0.5.gnuplot" using 1:2 title "0.5", \
|
|
||||||
"$outfile-1.gnuplot" using 1:2 title "1.0"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
outfile="ptraccel-low-dpi"
|
outfile="ptraccel-low-dpi"
|
||||||
for dpi in 200 400 800 1000; do
|
dpis="200 400 800 1000"
|
||||||
|
for dpi in $dpis; do
|
||||||
$tool --mode=accel --dpi=$dpi --filter=low-dpi > $outfile-$dpi.gnuplot
|
$tool --mode=accel --dpi=$dpi --filter=low-dpi > $outfile-$dpi.gnuplot
|
||||||
done
|
done
|
||||||
|
|
||||||
$gnuplot <<EOF
|
$gnuplot <<EOF
|
||||||
set terminal svg enhanced background rgb 'white'
|
set terminal svg enhanced background rgb 'white'
|
||||||
set output "$outfile.svg"
|
set output "$outfile.svg"
|
||||||
set xlabel "speed in units/us"
|
set xlabel "speed in mm/s"
|
||||||
set ylabel "accel factor"
|
set ylabel "accel factor"
|
||||||
set style data lines
|
set style data lines
|
||||||
set yrange [0:5]
|
set yrange [0:5]
|
||||||
set xrange [0:0.003]
|
set xrange [0:400]
|
||||||
plot "$outfile-200.gnuplot" using 1:2 title "200dpi", \
|
|
||||||
"$outfile-400.gnuplot" using 1:2 title "400dpi", \
|
dpis="$dpis"
|
||||||
"$outfile-800.gnuplot" using 1:2 title "800dpi", \
|
fname(d)=sprintf("$outfile-%s.gnuplot", d)
|
||||||
"$outfile-1000.gnuplot" using 1:2 title "1000dpi"
|
lname(d)=sprintf("%sdpi", d)
|
||||||
|
plot for [dpi in dpis] fname(dpi) using 1:2 title lname(dpi), \
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
outfile="ptraccel-touchpad"
|
outfile="ptraccel-touchpad"
|
||||||
|
for speed in $speeds; do
|
||||||
|
$tool --mode=accel --dpi=1000 --filter=touchpad --speed=$speed> $outfile-$speed.gnuplot
|
||||||
|
done
|
||||||
|
|
||||||
$gnuplot <<EOF
|
$gnuplot <<EOF
|
||||||
set terminal svg enhanced background rgb 'white'
|
set terminal svg enhanced background rgb 'white'
|
||||||
set output "$outfile.svg"
|
set output "$outfile.svg"
|
||||||
|
|
@ -56,31 +62,27 @@ set xlabel "speed in mm/s"
|
||||||
set ylabel "accel factor"
|
set ylabel "accel factor"
|
||||||
set style data lines
|
set style data lines
|
||||||
set xrange [0:400]
|
set xrange [0:400]
|
||||||
plot \
|
speeds="$speeds"
|
||||||
$(
|
fname(s)=sprintf("$outfile-%s.gnuplot", s)
|
||||||
for speed in -1 -0.5 -0.2 0 0.2 0.5 1; do
|
plot for [s in speeds] fname(s) using 1:2 title s, \
|
||||||
$tool --mode=accel --dpi=1000 --filter=touchpad --speed=$speed> $outfile-$speed.gnuplot
|
|
||||||
echo "\"$outfile-$speed.gnuplot\" using 1:2 title '$speed', \\"
|
|
||||||
done
|
|
||||||
)
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
outfile="ptraccel-trackpoint"
|
outfile="ptraccel-trackpoint"
|
||||||
$tool --mode=accel --dpi=1000 --filter=linear > $outfile-mouse.gnuplot
|
$tool --mode=accel --dpi=1000 --filter=linear > $outfile-mouse.gnuplot
|
||||||
for constaccel in 1 2 3; do
|
for speed in $speeds; do
|
||||||
dpi=$((1000/$constaccel))
|
$tool --mode=accel --speed=$speed --filter=trackpoint > $outfile-$speed.gnuplot
|
||||||
$tool --mode=accel --dpi=$dpi --filter=trackpoint > $outfile-trackpoint-$constaccel.gnuplot
|
|
||||||
done
|
done
|
||||||
$gnuplot <<EOF
|
$gnuplot <<EOF
|
||||||
set terminal svg enhanced background rgb 'white'
|
set terminal svg enhanced background rgb 'white'
|
||||||
set output "$outfile.svg"
|
set output "$outfile.svg"
|
||||||
set xlabel "speed in units/us"
|
set xlabel "delta (units)"
|
||||||
set ylabel "accel factor"
|
set ylabel "accel factor"
|
||||||
set style data lines
|
set style data lines
|
||||||
set yrange [0:5]
|
set yrange [0:5]
|
||||||
set xrange [0:0.003]
|
set xrange [0:20]
|
||||||
plot "$outfile-mouse.gnuplot" using 1:2 title "linear (mouse)", \
|
speeds="$speeds"
|
||||||
"$outfile-trackpoint-1.gnuplot" using 1:2 title "const accel 1", \
|
fname(s)=sprintf("$outfile-%s.gnuplot", s)
|
||||||
"$outfile-trackpoint-2.gnuplot" using 1:2 title "const accel 2", \
|
plot for [s in speeds] fname(s) using 1:2 title s, \
|
||||||
"$outfile-trackpoint-3.gnuplot" using 1:2 title "const accel 3"
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue