Emit LinuxCNC probe moves as probe events
This commit is contained in:
@@ -156,6 +156,14 @@ void CanonEventSink::arc_feed(int line, const CncSimPose &end, const CncSimPose
|
||||
position_ = end;
|
||||
}
|
||||
|
||||
void CanonEventSink::straight_probe(int line, const CncSimPose &end) {
|
||||
CncSimEvent event = base_event(CNC_SIM_EVENT_PROBE, line);
|
||||
event.start = position_;
|
||||
event.end = end;
|
||||
emit(event);
|
||||
position_ = end;
|
||||
}
|
||||
|
||||
void CanonEventSink::dwell(double seconds, int line) {
|
||||
CncSimEvent event = base_event(CNC_SIM_EVENT_DWELL, line);
|
||||
event.dwell_seconds = seconds;
|
||||
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
void straight_traverse(int line, const CncSimPose &end);
|
||||
void straight_feed(int line, const CncSimPose &end);
|
||||
void arc_feed(int line, const CncSimPose &end, const CncSimPose ¢er, int turns);
|
||||
void straight_probe(int line, const CncSimPose &end);
|
||||
void dwell(double seconds, int line);
|
||||
void program_end(int line);
|
||||
void emit_raw(CncSimEvent event);
|
||||
|
||||
@@ -341,7 +341,7 @@ void STRAIGHT_PROBE(int lineno,
|
||||
double u, double v, double w,
|
||||
unsigned char) {
|
||||
if (active_sink) {
|
||||
active_sink->straight_feed(lineno, make_pose(x, y, z, a, b, c, u, v, w));
|
||||
active_sink->straight_probe(event_line(lineno), make_pose(x, y, z, a, b, c, u, v, w));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user