mirror of
https://github.com/synthetos/g2.git
synced 2026-09-26 01:02:30 +08:00
Checkpoint
This commit is contained in:
@@ -1578,12 +1578,12 @@ static void _exec_program_finalize(float *value, bool *flag)
|
||||
|
||||
void cm_cycle_start()
|
||||
{
|
||||
cm_request_operation(OPERATION_CYCLE_START, nullptr);
|
||||
// if (cm->cycle_type == CYCLE_NONE) { // don't (re)start homing, probe or other canned cycles
|
||||
// cm->cycle_type = CYCLE_MACHINING;
|
||||
// cm->machine_state = MACHINE_CYCLE;
|
||||
// qr_init_queue_report(); // clear queue reporting buffer counts//
|
||||
// }
|
||||
// cm_request_operation(OPERATION_CYCLE_START, nullptr);
|
||||
if (cm->cycle_type == CYCLE_NONE) { // don't (re)start homing, probe or other canned cycles
|
||||
cm->cycle_type = CYCLE_MACHINING;
|
||||
cm->machine_state = MACHINE_CYCLE;
|
||||
qr_init_queue_report(); // clear queue reporting buffer counts//
|
||||
}
|
||||
}
|
||||
|
||||
void cm_cycle_end()
|
||||
|
||||
@@ -134,16 +134,25 @@ typedef enum { // cycle start and feedhold requests
|
||||
typedef enum { // feedhold state machine
|
||||
FEEDHOLD_P1_EXIT = -1, // set when p1 feedhold is due to exit
|
||||
FEEDHOLD_OFF = 0, // no feedhold in effect
|
||||
FEEDHOLD_INITIATED, // feedhold has been requested but not started yet
|
||||
// FEEDHOLD_INITIATED, // feedhold has been requested but not started yet
|
||||
FEEDHOLD_SYNC, // start hold - sync to latest aline segment
|
||||
FEEDHOLD_DECEL_CONTINUE, // in deceleration that will not end at zero
|
||||
FEEDHOLD_DECEL_TO_ZERO, // in deceleration that will go to zero
|
||||
FEEDHOLD_DECEL_COMPLETE, // feedhold deceleration has completed, but motors may not have stopped yet
|
||||
FEEDHOLD_MOTION_STOPPING, // waiting for motors to have stopped at hold point (motion stop)
|
||||
FEEDHOLD_MOTION_STOPPED, // motion has stopped at hold point
|
||||
FEEDHOLD_P2_START, // enter secondary planner and perform feedhold actions (once)
|
||||
FEEDHOLD_P2_WAIT, // wait for feedhold actions to complete
|
||||
// FEEDHOLD_P2_START, // enter secondary planner and perform feedhold actions (once)
|
||||
// FEEDHOLD_P2_WAIT, // wait for feedhold actions to complete
|
||||
|
||||
FEEDHOLD_HOLD_ACTION_START,
|
||||
FEEDHOLD_HOLD_PENDING, // wait for feedhold actions to complete
|
||||
FEEDHOLD_HOLD_DONE, //
|
||||
|
||||
FEEDHOLD_HOLD, // holding (steady state) Must be last state
|
||||
|
||||
FEEDHOLD_HOLD_EXIT_PENDING, // performing exit actions
|
||||
FEEDHOLD_HOLD_EXIT_DONE, // completed exit actions
|
||||
|
||||
FEEDHOLD_P2_EXIT // set when p2 feedhold is finishing
|
||||
} cmFeedholdState;
|
||||
|
||||
|
||||
@@ -159,10 +159,11 @@ static void _controller_HSM()
|
||||
DISPATCH(sr_status_report_callback()); // conditionally send status report
|
||||
DISPATCH(qr_queue_report_callback()); // conditionally send queue report
|
||||
|
||||
DISPATCH(cm_feedhold_sequencing_callback());// feedhold state machine runner
|
||||
DISPATCH(cm_operation_callback()); // operation action runner
|
||||
// DISPATCH(cm_feedhold_sequencing_callback());// feedhold state machine runner
|
||||
DISPATCH(mp_planner_callback()); // motion planner
|
||||
DISPATCH(cm_arc_callback(cm)); // arc generation runs as a cycle above lines
|
||||
DISPATCH(cm_operation_callback()); // operation action runner
|
||||
|
||||
DISPATCH(cm_homing_cycle_callback()); // homing cycle operation (G28.2)
|
||||
DISPATCH(cm_probing_cycle_callback()); // probing cycle operation (G38.2)
|
||||
DISPATCH(cm_jogging_cycle_callback()); // jog cycle operation
|
||||
|
||||
+259
-94
File diff suppressed because it is too large
Load Diff
@@ -73,7 +73,7 @@
|
||||
<InterfaceName>SWD</InterfaceName>
|
||||
</ToolOptions>
|
||||
<ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
|
||||
<ToolNumber>J41800036434</ToolNumber>
|
||||
<ToolNumber>J41800030015</ToolNumber>
|
||||
<ToolName>Atmel-ICE</ToolName>
|
||||
</com_atmel_avrdbg_tool_atmelice>
|
||||
<UseGdb>True</UseGdb>
|
||||
@@ -100,7 +100,7 @@
|
||||
<HWProgramCounterSampling>True</HWProgramCounterSampling>
|
||||
</PercepioTrace>
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<avrtoolserialnumber>J41800036434</avrtoolserialnumber>
|
||||
<avrtoolserialnumber>J41800030015</avrtoolserialnumber>
|
||||
<avrdeviceexpectedsignature>0x284E0A60</avrdeviceexpectedsignature>
|
||||
<avrtoolinterfaceclock>10000000</avrtoolinterfaceclock>
|
||||
<custom>
|
||||
|
||||
@@ -485,7 +485,8 @@ stat_t mp_exec_aline(mpBuf_t *bf)
|
||||
// Feedhold Processing - We need to handle the following cases (listed in rough sequence order):
|
||||
if (cm->hold_state != FEEDHOLD_OFF) {
|
||||
// if FEEDHOLD_P2_START, FEEDHOLD_P2_WAIT, FEEDHOLD HOLD or FEEDHOLD_P2_EXIT
|
||||
if (cm->hold_state >= FEEDHOLD_P2_START) { // handles _exec_aline_feedhold_processing case (7)
|
||||
// if (cm->hold_state >= FEEDHOLD_P2_START) { // handles _exec_aline_feedhold_processing case (7)
|
||||
if (cm->hold_state >= FEEDHOLD_HOLD_ACTION_START) { // handles _exec_aline_feedhold_processing case (7)
|
||||
return (STAT_NOOP); // VERY IMPORTANT to exit as a NOOP. Do not load another move
|
||||
}
|
||||
// STAT_OK terminates aline execution for this move
|
||||
@@ -1056,7 +1057,7 @@ static stat_t _exec_aline_feedhold(mpBuf_t *bf)
|
||||
st_request_forward_plan(); // replan the current bf buffer
|
||||
|
||||
// Set state to enable transition to p2 and perform entry actions in the p2 planner
|
||||
cm->hold_state = FEEDHOLD_P2_START; // executes entirely out of p2 planner
|
||||
cm->hold_state = FEEDHOLD_HOLD_ACTION_START; // signal operations runner to start actions
|
||||
}
|
||||
|
||||
sr_request_status_report(SR_REQUEST_IMMEDIATE);
|
||||
|
||||
Reference in New Issue
Block a user