mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-02 19:10:10 +01:00
tools: fix units for trackpoint accel graph
We use speed now and trackpoints are in units/ms Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6dca5df806
commit
5f9c985661
2 changed files with 5 additions and 4 deletions
|
|
@ -76,13 +76,13 @@ done
|
|||
$gnuplot <<EOF
|
||||
set terminal svg enhanced background rgb 'white'
|
||||
set output "$outfile.svg"
|
||||
set xlabel "delta (units)"
|
||||
set xlabel "delta (units/ms)"
|
||||
set ylabel "accel factor"
|
||||
set style data lines
|
||||
set yrange [0:5]
|
||||
set xrange [0:20]
|
||||
speeds="$speeds"
|
||||
fname(s)=sprintf("$outfile-%s.gnuplot", s)
|
||||
plot for [s in speeds] fname(s) using 1:2 title s, \
|
||||
plot for [s in speeds] fname(s) using 4:2 title s, \
|
||||
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -161,11 +161,12 @@ print_accel_func(struct motion_filter *filter,
|
|||
printf("# set style data lines\n");
|
||||
printf("# plot \"gnuplot.data\" using 1:2 title 'accel factor'\n");
|
||||
printf("#\n");
|
||||
printf("# data: velocity(mm/s) factor velocity(units/us)\n");
|
||||
printf("# data: velocity(mm/s) factor velocity(units/us) velocity(units/ms)\n");
|
||||
for (mmps = 0.0; mmps < 1000.0; mmps += 1) {
|
||||
double units_per_us = mmps_to_upus(mmps, dpi);
|
||||
double units_per_ms = units_per_us * 1000.0;
|
||||
double result = profile(filter, NULL, units_per_us, 0 /* time */);
|
||||
printf("%.8f\t%.4f\t%.8f\n", mmps, result, units_per_us);
|
||||
printf("%.8f\t%.4f\t%.8f\t%.8f\n", mmps, result, units_per_us, units_per_ms);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue