feat(resample): 实验性功能新增「重采样」(位于「自由标记」上方)
- Lane::ResampleItem + resample/resampleItems/resamplePanel/resampleScroll, 并在 LaneCarry / SplitLane / PruneLaneSignalItems / RemapAfterSignalInsert|Removal 同步 - 面板:可滚动分组列表(信号色条目栏 + 复选框 + 展开三角),展开后 4 行: 最大/最小数据间隔(只读,勾选时一次性缓存,绘制不扫描采样)+ 重采样间隔/频率(输入) - 输入框联动:改间隔同步频率,改频率同步间隔(输入单位分别为秒 / Hz) - 「构建为新信号」:DataSet::AppendGroupAxis 追加新时间轴 + InsertDerivedSignal, 采样值先按公式/系数/绝对值/镜像/Y偏移变换再等间隔线性插值,时间轴偏移不烘值 - 新信号名 <原信号> (重采样 <自适应单位频率>);Utf8Util::FormatFrequency 为唯一实现 - 非单调轴 / 点太少 / 间隔过大 / 点数超 2000 万 ⇒ 拒绝构建并给出自绘提示 - 顺带加入 FormulaEval(公式编译/求值,供 ApplyDrawTransform 与后续 UI 使用)
This commit is contained in:
1 parent
30e9d65c30
commit
1e1c2432ae
19 files changed
+1979
-56
No files matched your search
@@ -142,7 +142,8 @@ namespace jdi
|
||||
cache.mirrorVertical == resolved.style->mirrorVertical &&
|
||||
cache.mirrorHorizontal == resolved.style->mirrorHorizontal &&
|
||||
cache.offsetY == resolved.style->offsetY &&
|
||||
cache.offsetTime == resolved.style->offsetTime;
|
||||
cache.offsetTime == resolved.style->offsetTime &&
|
||||
cache.formula == resolved.style->formula;
|
||||
|
||||
if (!sameKey)
|
||||
{
|
||||
@@ -185,6 +186,7 @@ namespace jdi
|
||||
cache.mirrorHorizontal = resolved.style->mirrorHorizontal;
|
||||
cache.offsetY = resolved.style->offsetY;
|
||||
cache.offsetTime = resolved.style->offsetTime;
|
||||
cache.formula = resolved.style->formula;
|
||||
cache.originX = targetX;
|
||||
cache.originY = targetY;
|
||||
cache.valid = true;
|
||||
@@ -1185,6 +1187,16 @@ namespace jdi
|
||||
mix(resolved.style->mirrorHorizontal ? 1ull : 0ull);
|
||||
mixFloat(resolved.style->offsetY);
|
||||
mixFloat(static_cast<float>(resolved.style->offsetTime));
|
||||
// 「公式映射」逐点改变图层里的波形 ⇒ 必须让图层失效。
|
||||
{
|
||||
std::uint64_t textHash = 1469598103934665603ull;
|
||||
for (const wchar_t character : resolved.style->formula)
|
||||
{
|
||||
textHash ^= static_cast<std::uint64_t>(static_cast<std::uint32_t>(character));
|
||||
textHash *= 1099511628211ull;
|
||||
}
|
||||
mix(textHash);
|
||||
}
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user