界面不摆还没接线的开关:先撤掉“同时显示未滤波曲线” - What: plot_settings_dialog 去掉"同时显示未滤波曲线"复选框(连同 reset 里的清位、retranslate 的两行文案、filter_values() 里的读取),filter_values() 里写明 show_unfiltered 暂时固定 False 及原因;两个 locale 删掉 filter_show_unfiltered / filter_show_unfiltered_tip 两个键。FilterSettings.show_unfiltered 字段保留(session.json 的 filters 块仍在记它,等第二 buffer 接上后再把开关放回对话框)。 - Why: 上一版把这个复选框放进了对话框,但"未滤波曲线"还没有数据通路——力值卡片不画、CSV 也没有 *_unfiltered 列,等于界面上摆了一个承诺了却不做事的开关;这正是这一轮一直在清理的那类问题(文件说的/界面说的与实际做的不一致)。宁可先不给入口,也不要给一个假的。 - Verification: .repro/locale_check.py:287 个字面键全部命中、两个 locale 键集合相同(341/341);studio 全量 89 passed;ui_check 554 项检查 0 失败。 - Not in this change: CSV 的 17 列与未滤波第二 buffer 仍未接线(这是把开关放回来的前提)。
This commit is contained in:
@@ -72,8 +72,6 @@
|
||||
"filter_rate_tip": "The rate the low-pass coefficients are designed for (Hz)",
|
||||
"filter_rate_auto": "Follow the measured frame rate",
|
||||
"filter_rate_auto_tip": "Design the low-pass for the device's measured rate; clear it to pin a number",
|
||||
"filter_show_unfiltered": "Also show the unfiltered curves",
|
||||
"filter_show_unfiltered_tip": "Draw the pre-filter readings beside the filtered ones, so what the filter did can be judged. Display only — the record is unaffected",
|
||||
"filter_measurement_note": "The flow EMA is a *measurement* setting: changing it makes this recording incomparable with earlier ones.",
|
||||
"filter_locked": "Filters cannot change while recording; this applies to the next session.",
|
||||
"filter_nyquist": "Note: a {cutoff} Hz cutoff is at or above the Nyquist frequency of {nyquist} Hz (sample rate {rate} Hz) — the device would not filter. Lower the cutoff or pin a higher sample rate.",
|
||||
|
||||
@@ -72,8 +72,6 @@
|
||||
"filter_rate_tip": "低通系数按哪个采样率设计(Hz)",
|
||||
"filter_rate_auto": "自动跟随帧率",
|
||||
"filter_rate_auto_tip": "按设备实测帧率设计低通系数;取消可固定一个数值",
|
||||
"filter_show_unfiltered": "同时显示未滤波曲线",
|
||||
"filter_show_unfiltered_tip": "在力值卡片上把滤波前的读数一并显示,便于判断滤波到底做了什么。只影响显示,不影响记录",
|
||||
"filter_measurement_note": "光流 EMA 属于“测量”设置:改了它,本次录制与之前的不可比。",
|
||||
"filter_locked": "录制中不能更改滤波;下一次采集生效。",
|
||||
"filter_nyquist": "注意:低通 {cutoff} Hz 已达到或超过奈奎斯特频率 {nyquist} Hz(采样率 {rate} Hz)——设备不会滤。请调低截止频率或固定更高的采样率。",
|
||||
|
||||
@@ -196,9 +196,6 @@ class PlotSettingsDialog(QDialog):
|
||||
lambda checked: self.rate_spin.setEnabled(not checked)
|
||||
)
|
||||
|
||||
self.show_unfiltered_check = QCheckBox()
|
||||
self.show_unfiltered_check.setChecked(bool(filters.show_unfiltered))
|
||||
|
||||
self.filter_preset_label = QLabel()
|
||||
self.flow_ema_label = QLabel()
|
||||
self.median_label = QLabel()
|
||||
@@ -212,11 +209,9 @@ class PlotSettingsDialog(QDialog):
|
||||
group_form.addRow(self.lowpass_label, self.lowpass_spin)
|
||||
group_form.addRow(self.lowpass_order_label, self.lowpass_order_spin)
|
||||
group_form.addRow(self.rate_auto_check, self.rate_spin)
|
||||
group_form.addRow(self.show_unfiltered_check)
|
||||
|
||||
for widget in (self.flow_ema_spin, self.median_spin, self.lowpass_spin,
|
||||
self.rate_spin, self.rate_auto_check,
|
||||
self.show_unfiltered_check):
|
||||
self.rate_spin, self.rate_auto_check):
|
||||
widget.setToolTip("") # filled in by retranslate()
|
||||
self.flow_ema_spin.valueChanged.connect(self._on_filter_value_edited)
|
||||
self.median_spin.valueChanged.connect(self._on_filter_value_edited)
|
||||
@@ -291,13 +286,17 @@ class PlotSettingsDialog(QDialog):
|
||||
rate: float | str = "auto"
|
||||
if not self.rate_auto_check.isChecked():
|
||||
rate = float(self.rate_spin.value())
|
||||
# ``show_unfiltered`` is deliberately not offered here yet: the second
|
||||
# (unfiltered) buffer is not wired to the cards or the CSV, and a switch
|
||||
# that promises a curve it does not draw is worse than no switch. The
|
||||
# field is kept in the settings (and in the record) until it lands.
|
||||
return FilterSettings(
|
||||
flow_ema_alpha=float(self.flow_ema_spin.value()),
|
||||
median_window=int(self.median_spin.value()),
|
||||
lowpass_hz=float(self.lowpass_spin.value()),
|
||||
lowpass_order=int(self.lowpass_order_spin.value()),
|
||||
sample_rate_hz=rate,
|
||||
show_unfiltered=self.show_unfiltered_check.isChecked(),
|
||||
show_unfiltered=False,
|
||||
preset=self.selected_preset(),
|
||||
).normalised()
|
||||
|
||||
@@ -352,7 +351,6 @@ class PlotSettingsDialog(QDialog):
|
||||
self.lowpass_spin.setValue(0.0)
|
||||
self.lowpass_order_spin.setValue(2)
|
||||
self.rate_auto_check.setChecked(True)
|
||||
self.show_unfiltered_check.setChecked(False)
|
||||
self._show_preset("off")
|
||||
self._refresh_filter_note()
|
||||
|
||||
@@ -385,8 +383,6 @@ class PlotSettingsDialog(QDialog):
|
||||
self.rate_auto_check.setToolTip(t("dialog.filter_rate_auto_tip"))
|
||||
self.rate_label.setText(t("dialog.filter_rate"))
|
||||
self.rate_spin.setToolTip(t("dialog.filter_rate_tip"))
|
||||
self.show_unfiltered_check.setText(t("dialog.filter_show_unfiltered"))
|
||||
self.show_unfiltered_check.setToolTip(t("dialog.filter_show_unfiltered_tip"))
|
||||
self._refresh_filter_note()
|
||||
ok_btn = self.button_box.button(QDialogButtonBox.Ok)
|
||||
cancel_btn = self.button_box.button(QDialogButtonBox.Cancel)
|
||||
|
||||
Reference in New Issue
Block a user