设置偏执距离

This commit is contained in:
2026-10-13 19:32:03 +08:00
parent 656e08482e
commit 66c12a5c54
4 changed files with 5 additions and 28 deletions
@@ -228,7 +228,7 @@ def default_preferences() -> dict[str, Any]:
#: against it, so it is what makes the reported move match the bench. A tool
#: tip offset belongs here — it used to be a separate field, and having two
#: of them is what let the picture and the numbers disagree.
"finger_tool_xy_mm": [0.0, 0.0],
"finger_tool_xy_mm": [0.0, 3.0],
#: Stage travel, degrees. Confirmed at the bench: the vertical stage turns
#: a full half-turn either way (±180), and the horizontal stage turns
#: continuously. An earlier value of 90 was wrong and made half the patch
@@ -120,10 +120,9 @@ class MultipointPanel(QWidget):
layout.addLayout(buttons)
extra = QHBoxLayout()
extra.setSpacing(8)
self.import_button = QPushButton(page)
self.align_button = QPushButton(page)
self.reacquire_button = QPushButton(page)
for button in (self.import_button, self.align_button, self.reacquire_button):
for button in (self.align_button, self.reacquire_button):
extra.addWidget(button, 1)
layout.addLayout(extra)
@@ -201,7 +200,6 @@ class MultipointPanel(QWidget):
self.remove_button.clicked.connect(self._remove)
self.up_button.clicked.connect(lambda: self._move(-1))
self.down_button.clicked.connect(lambda: self._move(1))
self.import_button.clicked.connect(self._import_finger)
self.align_button.clicked.connect(self._align)
self.reacquire_button.clicked.connect(self._reacquire)
self.source.currentIndexChanged.connect(lambda _index: self._refresh())
@@ -247,7 +245,6 @@ class MultipointPanel(QWidget):
self.remove_button.setText(t("multipoint.remove"))
self.up_button.setText(t("multipoint.up"))
self.down_button.setText(t("multipoint.down"))
self.import_button.setText(t("multipoint.import_points"))
self.align_button.setText(t("multipoint.align"))
self.reacquire_button.setText(t("multipoint.reacquire"))
self.source_label.setText(t("multipoint.source"))
@@ -420,26 +417,6 @@ class MultipointPanel(QWidget):
"""The right-hand confirm button records the current multi-point step."""
self._confirm()
def _import_finger(self) -> None:
def go():
if self._finger is None or not hasattr(self._finger, "acquisition_points"):
raise RuntimeError(t("multipoint.no_finger"))
points = self._finger.acquisition_points()
if not points:
raise RuntimeError(t("multipoint.no_finger_points"))
force = self._max_force()
lower = self._min_force()
for point in points:
uv = point.get("u_px"), point.get("v_px")
self.campaign.add_solved_site(
point["site_id"], point["x"], point["y"], point["z"],
(point["nx"], point["ny"], point["nz"]), point["pose"],
self._levels(), self._hold(), self.repeats.value(),
max_force_n=force, min_force_n=lower,
uv_px=None if uv[0] is None else (float(uv[0]), float(uv[1])),
)
self._run(go)
def _align(self) -> None:
if not self._selected:
self.message.setText(t("multipoint.align_select"))
@@ -524,7 +501,7 @@ class MultipointPanel(QWidget):
self.wrench_box.setVisible(wrench)
for widget in (
self.add_button, self.update_button, self.remove_button, self.up_button,
self.down_button, self.import_button, self.simulate_button, self.start_button,
self.down_button, self.simulate_button, self.start_button,
self.site_id, self.repeats, self.frame, self.max_force, self.min_force, self.source,
):
widget.setEnabled(not active)