GUI for finger v1

This commit is contained in:
ykcheungab
2026-06-18 22:18:19 +08:00
parent f19f092b64
commit 3fd9b839a9
42 changed files with 2326 additions and 1186 deletions
+4 -3
View File
@@ -27,8 +27,8 @@ class ForceChartWindow:
app_name: str = "Orisys Plot Example",
) -> None:
pg = _require_pyqtgraph()
pg.setConfigOption("background", "w")
pg.setConfigOption("foreground", "k")
pg.setConfigOption("background", "k")
pg.setConfigOption("foreground", "w")
self._pg = pg
self.npoints = npoints
@@ -36,6 +36,7 @@ class ForceChartWindow:
self.app = pg.mkQApp(app_name)
self.win = pg.GraphicsLayoutWidget(show=True, title=title)
self.win.setWindowTitle(title)
self.pen = pg.mkPen(color="w")
self.data = np.zeros((npoints, 2, 3), dtype=np.float64)
for channel in range(3):
@@ -51,7 +52,7 @@ class ForceChartWindow:
p3.setLabel("bottom", "时间", units="s")
self._plots = (p1, p2, p3)
self._curves = (p1.plot(pen="k"), p2.plot(pen="k"), p3.plot(pen="k"))
self._curves = (p1.plot(pen=self.pen ), p2.plot(pen=self.pen ), p3.plot(pen=self.pen ))
def push(self, timestamp: float, fn: float, fx: float, fy: float) -> None:
for channel in range(3):