fix: 为所有接口采集速度历史而非仅活动接口
原 calculateSpeed 仅给活动接口追加采样点,切换到非活动接口时趋势图 为空需等待数分钟。新增 m_lastRxBytesByIface/m_lastTxBytesByIface 跟踪所有接口字节基线,遍历全部接口采集速度历史。 切换接口时趋势图立即有数据,新增接口(如USB网卡)也自动开始采集。
This commit is contained in:
@@ -35,8 +35,9 @@
|
||||
~~可传入不存在的接口名,会被持久化到配置文件,当前会话期间速度恒为 0。~~
|
||||
已在方法入口增加 `m_interfaceList.contains(interface)` 校验,无效接口名直接忽略。
|
||||
|
||||
**7. 速度历史仅记录活动接口**
|
||||
`m_speedHistory` 每秒只给 `m_activeInterface` 追加采样点。非活动接口永不采集,切换到新接口时趋势图为空,需等待数分钟才有数据。若要"切回仍能看到历史",应后台为所有接口持续采样。
|
||||
**7. ~~速度历史仅记录活动接口~~ ✅ 已修复**
|
||||
~~`m_speedHistory` 每秒只给 `m_activeInterface` 追加采样点,非活动接口永不采集,切换到新接口时趋势图为空。~~
|
||||
已新增 `m_lastRxBytesByIface` / `m_lastTxBytesByIface` 跟踪所有接口的字节基线,`calculateSpeed()` 遍历所有接口采集速度历史。切换接口时趋势图立即有数据。
|
||||
|
||||
**8. 窗口居中未考虑多显示器**
|
||||
`AboutWindow`、`SettingsWindow`、`TrafficChartWindow` 用 `Screen.width/height` 居中,frameless 窗口在多屏环境下可能出现在非预期屏幕。
|
||||
|
||||
Reference in New Issue
Block a user