LAT Hologramm-Software 2.0
Loading...
Searching...
No Matches
jog.c
Go to the documentation of this file.
1/*
2 jog.h - Jogging methods
3 Part of Grbl
4
5 Copyright (c) 2016 Sungeun K. Jeon for Gnea Research LLC
6
7 Grbl is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Grbl is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Grbl. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#include "grbl.h"
22
23
24// Sets up valid jog motion received from g-code parser, checks for soft-limits, and executes the jog.
26{
27 // Initialize planner data struct for jogging motions.
28 // NOTE: Spindle and coolant are allowed to fully function with overrides during a jog.
29 pl_data->feed_rate = gc_block->values.f;
31 #ifdef USE_LINE_NUMBERS
32 pl_data->line_number = gc_block->values.n;
33 #endif
34
37 }
38
39 // Valid jog command. Plan, set state, and execute.
40 mc_line(gc_block->values.xyz,pl_data);
41 if (sys.state == STATE_IDLE) {
42 if (plan_get_current_block() != NULL) { // Check if there is a block to execute.
45 st_wake_up(); // NOTE: Manual start. No state machine required.
46 }
47 }
48
49 return(STATUS_OK);
50}
parser_block_t gc_block
Definition: gcode.c:37
uint8_t jog_execute(plan_line_data_t *pl_data, parser_block_t *gc_block)
Definition: jog.c:25
system_t sys
Definition: main.c:26
void mc_line(float *target, plan_line_data_t *pl_data)
#define bit_istrue(x, mask)
Definition: nuts_bolts.h:64
plan_block_t * plan_get_current_block()
Definition: planner.c:234
#define PL_COND_FLAG_NO_FEED_OVERRIDE
Definition: planner.h:42
#define STATUS_OK
Definition: report.h:24
#define STATUS_TRAVEL_EXCEEDED
Definition: report.h:39
settings_t settings
Definition: settings.c:24
#define BITFLAG_SOFT_LIMIT_ENABLE
Definition: settings.h:47
void st_prep_buffer()
Definition: stepper.c:668
void st_wake_up()
Definition: stepper.c:224
float f
Definition: gcode.h:200
float xyz[3]
Definition: gcode.h:209
int32_t n
Definition: gcode.h:203
gc_values_t values
Definition: gcode.h:235
uint8_t condition
Definition: planner.h:93
float feed_rate
Definition: planner.h:91
uint8_t flags
Definition: settings.h:106
uint8_t state
Definition: system.h:128
uint8_t system_check_travel_limits(float *target)
Definition: system.c:334
#define STATE_JOG
Definition: system.h:82
#define STATE_IDLE
Definition: system.h:76