diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-02-11 14:43:36 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-02-12 17:20:40 -0500 |
commit | ab1eb70d1c70dd438f6b283503f7473cdc080d0f (patch) | |
tree | 5189b5284cfac643bbdcea21ed83896c1d5e494f /scripts | |
parent | 71256f9456ffdeb17c0c18066131f717ab6b6fce (diff) | |
download | kutter-ab1eb70d1c70dd438f6b283503f7473cdc080d0f.tar.gz kutter-ab1eb70d1c70dd438f6b283503f7473cdc080d0f.tar.xz kutter-ab1eb70d1c70dd438f6b283503f7473cdc080d0f.zip |
toolhead: Rework lookahead flush to be more stable during high cpu
Change the lookahead queue so that it attempts to buffer at least
buffer_time_high amount of moves when first starting a print. This
helps ensure the buffer is normally always full.
If the buffer falls below buffer_time_low then it is either due to the
end of a print or because octoprint/klippy is unable to keep up.
Change the code so that in this case the lookahead queue will attempt
to gather buffer_time_high amount of moves before restarting movement.
Update the default buffer_time_low to 1 second and buffer_time_high to
2 seconds. With the above changes a smaller buffer_time_high and a
larger buffer_time_low are more practical.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/graphstats.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/graphstats.py b/scripts/graphstats.py index 7600ee52..ef93e711 100755 --- a/scripts/graphstats.py +++ b/scripts/graphstats.py @@ -8,7 +8,7 @@ import optparse, datetime import matplotlib.pyplot as plt, matplotlib.dates as mdates MAXBANDWIDTH=25000. -MAXBUFFER=5. +MAXBUFFER=2. def parse_log(logname): f = open(logname, 'rb') @@ -90,7 +90,7 @@ def plot_mcu(data, maxbw, outname): ax1.plot_date(times, bwdeltas, 'g', label='Bandwidth') ax1.plot_date(times, loads, 'r', label='MCU load') ax1.plot_date(times, hostbuffers, 'c', label='Host buffer') - ax1.legend() + ax1.legend(loc='best') ax1.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M')) #plt.gcf().autofmt_xdate() ax1.grid(True) |