Align AXIS Web control lifecycle with LinuxCNC
This commit is contained in:
@@ -9,6 +9,7 @@ export type XyzacVisualState = {
|
||||
joints: [number, number, number, number, number];
|
||||
livePose: XyzacKinematicsSnapshot["pose"];
|
||||
activeProgress: number;
|
||||
livePathEpoch: number;
|
||||
motionTrace: Array<{ tick: number; pose: XyzacKinematicsSnapshot["pose"]; joints: number[]; activeSegmentId: number; activeProgress: number }>;
|
||||
offsets: XyzacKinematicsSnapshot["offsets"];
|
||||
activeSegmentId: number | null;
|
||||
@@ -23,7 +24,7 @@ export type XyzacVisualSource = {
|
||||
simulation_tick?: number;
|
||||
state_hash?: string;
|
||||
kinematics?: XyzacKinematicsSnapshot;
|
||||
visual?: { active_segment_id?: number | null; active_progress?: number; motion_trace?: Array<{ tick: number; pose: Record<string, number>; joints: number[]; active_segment_id: number; active_progress: number }>; pose?: Record<string, number>; joints?: number[]; toolpath?: Array<Record<string, unknown>> };
|
||||
visual?: { active_segment_id?: number | null; active_progress?: number; live_path_epoch?: number; motion_trace?: Array<{ tick: number; pose: Record<string, number>; joints: number[]; active_segment_id: number; active_progress: number }>; pose?: Record<string, number>; joints?: number[]; toolpath?: Array<Record<string, unknown>> };
|
||||
};
|
||||
|
||||
export function projectXyzacVisual(snapshot: XyzacVisualSource | null | undefined): XyzacVisualState {
|
||||
@@ -48,6 +49,7 @@ export function projectXyzacVisual(snapshot: XyzacVisualSource | null | undefine
|
||||
joints,
|
||||
livePose: pose,
|
||||
activeProgress,
|
||||
livePathEpoch: Number.isSafeInteger(snapshot?.visual?.live_path_epoch) ? Number(snapshot?.visual?.live_path_epoch) : 0,
|
||||
motionTrace,
|
||||
offsets: kinematics?.offsets ?? ZERO_OFFSETS,
|
||||
activeSegmentId: snapshot?.visual?.active_segment_id ?? null,
|
||||
|
||||
Reference in New Issue
Block a user