Set selected work offset when running program.
This commit is contained in:
+8
-3
@@ -96,10 +96,16 @@ void grbl::machine::check_program(const grbl::program& pgm) {
|
||||
switch_to_state(grbl_machine_state::check_program);
|
||||
}
|
||||
|
||||
void grbl::machine::run_program(const grbl::program& pgm) {
|
||||
void grbl::machine::run_program(const grbl::program& pgm, std::string work_offset) {
|
||||
running_program = pgm;
|
||||
std::cout << "running program (" << running_program.filename << ") with " << running_program.number_of_instructions() << " instructions"
|
||||
<< std::endl;
|
||||
<< " on work offset " << work_offset << std::endl;
|
||||
|
||||
// set desired offset
|
||||
while (awaiting_responses > 0);
|
||||
pipe->send(work_offset);
|
||||
while (awaiting_responses > 0);
|
||||
|
||||
switch_to_state(grbl_machine_state::run_program);
|
||||
}
|
||||
|
||||
@@ -821,7 +827,6 @@ void grbl::machine_state_run_program::on_enter(grbl::machine *m) {
|
||||
}
|
||||
|
||||
void grbl::machine_state_run_program::on_exit(grbl::machine *m) {
|
||||
|
||||
}
|
||||
|
||||
void grbl::machine_state_run_program::move_to_next_run_stage() {
|
||||
|
||||
Reference in New Issue
Block a user