diff options
author | Benjamin Chrétien <chretien.b@gmail.com> | 2016-05-11 15:54:40 +0300 |
---|---|---|
committer | Benjamin Chrétien <chretien.b@gmail.com> | 2016-05-11 15:57:09 +0300 |
commit | f01ea3fbb99b49c0f52aa410cb5e7c1d6ab3deef (patch) | |
tree | f4459ca5acdc8f2a893648b140cb9a5326ba915a | |
parent | 71cb09c9dd4e0d6dfd61a109562f24e5aea58517 (diff) |
sc-gyro-plot.py: fix size mismatch
-rwxr-xr-x | scripts/sc-gyro-plot.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/sc-gyro-plot.py b/scripts/sc-gyro-plot.py index c1648d5..47ad06f 100755 --- a/scripts/sc-gyro-plot.py +++ b/scripts/sc-gyro-plot.py @@ -102,7 +102,12 @@ def _main(): for name in imu.keys(): imu[name].append(sci._asdict()[name]) - imu[name] = imu[name][-len(times):] + nt = len(times) + ni = len(imu[name]) + if nt < ni: + imu[name] = imu[name][-nt:] + elif nt > ni: + times = times[nt-ni:] curves[name].setData(times, imu[name]) app.processEvents() |