Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ynsta/steamcontroller.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/sc-gyro-plot.py7
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()