• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3tool=`dirname $0`/../build/ptraccel-debug
4gnuplot=/usr/bin/gnuplot
5
6if [[ -e '$tool' ]]; then
7	echo "Unable to find $tool"
8	exit 1
9fi
10speeds="-1 -0.75 -0.5 -0.25 0 0.5 1"
11
12outfile="ptraccel-linear"
13for speed in $speeds; do
14	$tool --mode=accel --dpi=1000 --filter=linear --speed=$speed > $outfile-$speed.gnuplot
15done
16$gnuplot <<EOF
17set terminal svg enhanced background rgb 'white'
18set output "$outfile.svg"
19set xlabel "speed in mm/s"
20set ylabel "accel factor"
21set style data lines
22set yrange [0:3]
23set xrange [0:400]
24speeds="$speeds"
25fname(s)=sprintf("$outfile-%s.gnuplot", s)
26plot for [s in speeds] fname(s) using 1:2 title s, \
27
28EOF
29
30outfile="ptraccel-low-dpi"
31dpis="200 400 800 1000"
32for dpi in $dpis; do
33	$tool --mode=accel --dpi=$dpi --filter=low-dpi > $outfile-$dpi.gnuplot
34done
35
36$gnuplot <<EOF
37set terminal svg enhanced background rgb 'white'
38set output "$outfile.svg"
39set xlabel "speed in mm/s"
40set ylabel "accel factor"
41set style data lines
42set yrange [0:5]
43set xrange [0:400]
44
45dpis="$dpis"
46fname(d)=sprintf("$outfile-%s.gnuplot", d)
47lname(d)=sprintf("%sdpi", d)
48plot for [dpi in dpis] fname(dpi) using 1:2 title lname(dpi), \
49
50EOF
51
52
53outfile="ptraccel-touchpad"
54for speed in $speeds; do
55	$tool --mode=accel --dpi=1000 --filter=touchpad --speed=$speed> $outfile-$speed.gnuplot
56done
57
58$gnuplot <<EOF
59set terminal svg enhanced background rgb 'white'
60set output "$outfile.svg"
61set xlabel "speed in mm/s"
62set ylabel "accel factor"
63set style data lines
64set xrange [0:400]
65speeds="$speeds"
66fname(s)=sprintf("$outfile-%s.gnuplot", s)
67plot for [s in speeds] fname(s) using 1:2 title s, \
68
69EOF
70
71outfile="ptraccel-trackpoint"
72for speed in $speeds; do
73	$tool --mode=accel --speed=$speed --filter=trackpoint > $outfile-$speed.gnuplot
74done
75$gnuplot <<EOF
76set terminal svg enhanced background rgb 'white'
77set output "$outfile.svg"
78set xlabel "delta (units/ms)"
79set ylabel "accel factor"
80set style data lines
81set yrange [0:5]
82set xrange [0:1]
83speeds="$speeds"
84fname(s)=sprintf("$outfile-%s.gnuplot", s)
85plot for [s in speeds] fname(s) using 4:2 title s, \
86
87EOF
88