shaper_calibrate: Estimate max_accel to avoid excessive smoothing

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
Dmitry Butyugin 2021-01-29 19:21:04 +01:00 committed by KevinOConnor
parent 8c369b54ab
commit 73a39370ad
2 changed files with 37 additions and 10 deletions

View file

@ -100,9 +100,10 @@ def plot_freq_response(lognames, calibration_data, shapers,
ax2.set_ylabel('Shaper vibration reduction (ratio)')
best_shaper_vals = None
for shaper in shapers:
label = "%s (%.1f Hz, vibr=%.1f%%, sm~=%.2f)" % (
label = "%s (%.1f Hz, vibr=%.1f%%, sm~=%.2f, accel<=%.f)" % (
shaper.name.upper(), shaper.freq,
shaper.vibrs * 100., shaper.smoothing)
shaper.vibrs * 100., shaper.smoothing,
round(shaper.max_accel / 100.) * 100.)
linestyle = 'dotted'
if shaper.name == selected_shaper:
linestyle = 'dashdot'