Keep XYZAC tool motion smooth and expose rotary DRO values
This commit is contained in:
@@ -89,7 +89,16 @@ function projection(result: Record<string, unknown>, message: MessageEnvelope, p
|
||||
program: (result.program as Record<string, unknown>) ?? previous.snapshot.program,
|
||||
motion: {
|
||||
...previous.snapshot.motion,
|
||||
axes: [Number(pose.x ?? previous.snapshot.motion?.axes?.[0] ?? 0), Number(pose.y ?? previous.snapshot.motion?.axes?.[1] ?? 0), Number(pose.z ?? previous.snapshot.motion?.axes?.[2] ?? 0)],
|
||||
// Keep the XYZAC axis vector intact on every motion delta. Older
|
||||
// projection code rebuilt only XYZ, which made A/C disappear from
|
||||
// consumers that read the canonical motion array.
|
||||
axes: [
|
||||
Number(pose.x ?? previous.snapshot.motion?.axes?.[0] ?? 0),
|
||||
Number(pose.y ?? previous.snapshot.motion?.axes?.[1] ?? 0),
|
||||
Number(pose.z ?? previous.snapshot.motion?.axes?.[2] ?? 0),
|
||||
Number(pose.a ?? previous.snapshot.motion?.axes?.[3] ?? 0),
|
||||
Number(pose.c ?? previous.snapshot.motion?.axes?.[4] ?? 0),
|
||||
],
|
||||
joints,
|
||||
},
|
||||
wasm_motion: (result.wasm_motion as Record<string, unknown>) ?? previous.snapshot.wasm_motion,
|
||||
|
||||
Reference in New Issue
Block a user