Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update text header in grblUpload.ino #1474

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b3a53a4
v1.0 Beta Release.
chamnit Aug 28, 2015
9152d14
Update README
chamnit Aug 28, 2015
9575199
Optional line number reporting bug fix.
chamnit Aug 29, 2015
965e337
Parking motion bug fix.
chamnit Sep 5, 2015
dade712
Updated G28/G30 intermediate motion behavior.
chamnit Sep 24, 2015
b9c3461
Bug fixes.
chamnit Oct 1, 2015
5eee108
Pin state reporting of all pins. Flash optimization.
chamnit Nov 10, 2015
111d28d
Applied master branch bug fixes.
chamnit Mar 4, 2016
81adc20
Soft limit error bug fix.
chamnit Mar 11, 2016
5bfc3a1
No variable spindle and spindle speed fix.
Mar 19, 2016
ff5f8da
Update README
Mar 19, 2016
061e609
Removed 328p-related code. Enabled options by default.
chamnit Mar 20, 2016
b29b960
EEPROM string checks and re-added some compile options.
Mar 20, 2016
8693534
Sleep feature. General re-org and bug fixes.
Apr 4, 2016
e87f4ea
Update readme and sleep documentation.
chamnit Apr 4, 2016
d5decf8
Alarm and safety door bug fix.
Apr 10, 2016
2b82c42
Planner and printFloat update.
May 11, 2016
be5faf6
Minor bug fix to certain safety conditions.
Sep 1, 2016
5e3048f
Grbl v1.1e port to Mega2560 branch
chamnit Dec 19, 2016
e4dd12f
Spindle PWM update for Mega2560
chamnit Dec 20, 2016
c912b82
Alarm handling bug fix.
chamnit Dec 20, 2016
795d2f6
Pulled in Grbl-328p changes.
chamnit Jan 14, 2017
dd2f156
Update README.md
chamnit Mar 19, 2017
9e96e45
Update README.md
chamnit Mar 19, 2017
e0efa4b
Moved Grbl logo files to separate repo.
chamnit Mar 19, 2017
759ff61
Add Ramps 1.4 Board Support
docwelch Jun 27, 2017
4b8e411
Syncing mainstream v1.1f
chamnit Jul 18, 2017
e16b5fb
Merge branch 'edge' into Ramps-1.4
chamnit Jul 18, 2017
576a72c
Merge pull request #28 from docwelch/Ramps-1.4
chamnit Jul 18, 2017
e321c82
Fixed RAMPS control pin conflict
chamnit Aug 1, 2017
40fd602
Fixed a very rare but critical bug when reducing override rates.
chamnit Aug 2, 2017
68d9152
fixes gremlin where changing stepper direction mask didn't work corre…
bgort Aug 10, 2018
a311e2d
Merge pull request #68 from bgort/gremlinfix
chamnit Aug 10, 2018
0f15e66
Upstream updates. Spindle/coolant rare bug fixes.
chamnit Aug 13, 2018
bc05282
Merge branch 'edge' of https://github.com/gnea/grbl-Mega into edge
chamnit Aug 13, 2018
df87b36
Updated version.
chamnit Aug 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Alarm handling bug fix.
- Applied an alarm handling bug fix that would not show the correct
alarm code, nor clear the alarm. It would occasionally go into an
infinite loop and would usually happen during a homing cycle fail.
  • Loading branch information
chamnit committed Dec 20, 2016
commit c912b8271013b2932d5c6734090fddbe9280bca7
9 changes: 9 additions & 0 deletions doc/log/commit_log_v1.1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
----------------
Date: 2016-12-19
Author: Sonny Jeon
Subject: Spindle PWM update for Mega2560

- Spindle PWM is set with a 16-bit value, rather than 8-bit on a 328p.
Updated stepper.c to reflect this change.


----------------
Date: 2016-12-19
Author: Sonny Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/

// This file contains compile-time configurations for Grbl's internal system. For the most part,
// users will not need to directly modify these, but they are here for specific needs, i.e.
// performance tuning or adjusting to non-typical machines.
Expand Down
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// Grbl versioning system
#define GRBL_VERSION "1.1e"
#define GRBL_VERSION_BUILD "20161219.2"
#define GRBL_VERSION_BUILD "20161219.3"

// Define standard libraries used by Grbl.
#include <avr/io.h>
Expand Down
17 changes: 9 additions & 8 deletions grbl/motion_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ void mc_line(float *target, plan_line_data_t *pl_data)

// NOTE: Backlash compensation may be installed here. It will need direction info to track when
// to insert a backlash line motion(s) before the intended line motion and will require its own
// plan_check_full_buffer() and check for system abort loop. Also for position reporting
// plan_check_full_buffer() and check for system abort loop. Also for position reporting
// backlash steps will need to be also tracked, which will need to be kept at a system level.
// There are likely some other things that will need to be tracked as well. However, we feel
// that backlash compensation should NOT be handled by Grbl itself, because there are a myriad
// of ways to implement it and can be effective or ineffective for different CNC machines. This
// would be better handled by the interface as a post-processor task, where the original g-code
// is translated and inserts backlash motions that best suits the machine.
// is translated and inserts backlash motions that best suits the machine.
// NOTE: Perhaps as a middle-ground, all that needs to be sent is a flag or special command that
// indicates to Grbl what is a backlash compensation motion, so that Grbl executes the move but
// doesn't update the machine position values. Since the position values used by the g-code
// parser and planner are separate from the system machine positions, this is doable.

// If the buffer is full: good! That means we are well ahead of the robot.
// If the buffer is full: good! That means we are well ahead of the robot.
// Remain in this loop until there is room in the buffer.
do {
protocol_execute_realtime(); // Check for any run-time commands
Expand All @@ -70,7 +70,7 @@ void mc_line(float *target, plan_line_data_t *pl_data)
}


// Execute an arc in offset mode format. position == current xyz, target == target xyz,
// Execute an arc in offset mode format. position == current xyz, target == target xyz,
// offset == offset from current xyz, axis_X defines circle plane in tool space, axis_linear is
// the direction of helical travel, radius == circle radius, isclockwise boolean. Used
// for vector transformation direction.
Expand All @@ -86,7 +86,7 @@ void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *of
float r_axis1 = -offset[axis_1];
float rt_axis0 = target[axis_0] - center_axis0;
float rt_axis1 = target[axis_1] - center_axis1;

// CCW angle between position and target from circle center. Only one atan2() trig computation required.
float angular_travel = atan2(r_axis0*rt_axis1-r_axis1*rt_axis0, r_axis0*rt_axis0+r_axis1*rt_axis1);
if (is_clockwise_arc) { // Correct atan2 output per direction
Expand All @@ -104,7 +104,7 @@ void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *of

if (segments) {
// Multiply inverse feed_rate to compensate for the fact that this movement is approximated
// by a number of discrete segments. The inverse feed_rate should be correct for the sum of
// by a number of discrete segments. The inverse feed_rate should be correct for the sum of
// all segments.
if (pl_data->condition & PL_COND_FLAG_INVERSE_TIME) {
pl_data->feed_rate *= segments;
Expand Down Expand Up @@ -359,8 +359,9 @@ void mc_reset()
// violated, by which, all bets are off.
if ((sys.state & (STATE_CYCLE | STATE_HOMING | STATE_JOG)) ||
(sys.step_control & (STEP_CONTROL_EXECUTE_HOLD | STEP_CONTROL_EXECUTE_SYS_MOTION))) {
if (sys.state == STATE_HOMING) { system_set_exec_alarm(EXEC_ALARM_HOMING_FAIL_RESET); }
else { system_set_exec_alarm(EXEC_ALARM_ABORT_CYCLE); }
if (sys.state == STATE_HOMING) {
if (!sys_rt_exec_alarm) {system_set_exec_alarm(EXEC_ALARM_HOMING_FAIL_RESET); }
} else { system_set_exec_alarm(EXEC_ALARM_ABORT_CYCLE); }
st_go_idle(); // Force kill steppers. Position has likely been lost.
}
}
Expand Down
6 changes: 3 additions & 3 deletions grbl/planner.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ uint8_t plan_buffer_line(float *target, plan_line_data_t *pl_data)
uint8_t idx;

// Copy position data based on type of motion being planned.
if (block->condition & PL_COND_FLAG_SYSTEM_MOTION) {
if (block->condition & PL_COND_FLAG_SYSTEM_MOTION) {
#ifdef COREXY
position_steps[X_AXIS] = system_convert_corexy_to_x_axis_steps(sys_position);
position_steps[Y_AXIS] = system_convert_corexy_to_y_axis_steps(sys_position);
Expand Down Expand Up @@ -383,8 +383,8 @@ uint8_t plan_buffer_line(float *target, plan_line_data_t *pl_data)
block->millimeters = convert_delta_vector_to_unit_vector(unit_vec);
block->acceleration = limit_value_by_axis_maximum(settings.acceleration, unit_vec);
block->rapid_rate = limit_value_by_axis_maximum(settings.max_rate, unit_vec);
// Store programmed rate.

// Store programmed rate.
if (block->condition & PL_COND_FLAG_RAPID_MOTION) { block->programmed_rate = block->rapid_rate; }
else {
block->programmed_rate = pl_data->feed_rate;
Expand Down
12 changes: 6 additions & 6 deletions grbl/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static char line[LINE_BUFFER_SIZE]; // Line to be executed. Zero-terminated.
static void protocol_exec_rt_suspend();


/*
/*
GRBL PRIMARY LOOP:
*/
void protocol_main_loop()
Expand Down Expand Up @@ -197,13 +197,13 @@ void protocol_auto_cycle_start()


// This function is the general interface to Grbl's real-time command execution system. It is called
// from various check points in the main program, primarily where there may be a while loop waiting
// for a buffer to clear space or any point where the execution time from the last check point may
// be more than a fraction of a second. This is a way to execute realtime commands asynchronously
// from various check points in the main program, primarily where there may be a while loop waiting
// for a buffer to clear space or any point where the execution time from the last check point may
// be more than a fraction of a second. This is a way to execute realtime commands asynchronously
// (aka multitasking) with grbl's g-code parsing and planning functions. This function also serves
// as an interface for the interrupts to set the system realtime flags, where only the main program
// handles them, removing the need to define more computationally-expensive volatile variables. This
// also provides a controlled way to execute certain tasks without having two or more instances of
// also provides a controlled way to execute certain tasks without having two or more instances of
// the same task, such as the planner recalculating the buffer upon a feedhold or overrides.
// NOTE: The sys_rt_exec_state variable flags are set by any process, step or serial interrupts, pinouts,
// limit switches, or the main program.
Expand Down Expand Up @@ -239,7 +239,7 @@ void protocol_exec_rt_system()
// lost, continued streaming could cause a serious crash if by chance it gets executed.
} while (bit_isfalse(sys_rt_exec_state,EXEC_RESET));
}
system_clear_exec_alarm_flag(0xFF); // Clear all alarm flags
system_clear_exec_alarm(); // Clear alarm
}

rt_exec = sys_rt_exec_state; // Copy volatile sys_rt_exec_state.
Expand Down
14 changes: 7 additions & 7 deletions grbl/report.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/

/*
This file functions as the primary feedback interface for Grbl. Any outgoing data, such
/*
This file functions as the primary feedback interface for Grbl. Any outgoing data, such
as the protocol status messages, feedback messages, and status reports, are stored here.
For the most part, these functions primarily are called from protocol.c methods. If a
different style feedback is desired (i.e. JSON), then a user can change these following
For the most part, these functions primarily are called from protocol.c methods. If a
different style feedback is desired (i.e. JSON), then a user can change these following
methods to accomodate their needs.
*/

Expand Down Expand Up @@ -104,8 +104,8 @@ static void report_util_float_setting(uint8_t n, float val, uint8_t n_decimal) {


// Handles the primary confirmation protocol response for streaming interfaces and human-feedback.
// For every incoming line, this method responds with an 'ok' for a successful command or an
// 'error:' to indicate some error event with the line or some critical system error during
// For every incoming line, this method responds with an 'ok' for a successful command or an
// 'error:' to indicate some error event with the line or some critical system error during
// operation. Errors events can originate from the g-code parser, settings module, or asynchronously
// from a critical error, such as a triggered hard limit. Interface should always monitor for these
// responses.
Expand All @@ -122,7 +122,7 @@ void report_status_message(uint8_t status_code)
}

// Prints alarm messages.
void report_alarm_message(int8_t alarm_code)
void report_alarm_message(uint8_t alarm_code)
{
printPgmString(PSTR("ALARM:"));
print_uint8_base10(alarm_code);
Expand Down
2 changes: 1 addition & 1 deletion grbl/report.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
void report_status_message(uint8_t status_code);

// Prints system alarm messages.
void report_alarm_message(int8_t alarm_code);
void report_alarm_message(uint8_t alarm_code);

// Prints miscellaneous feedback messages.
void report_feedback_message(uint8_t message_code);
Expand Down
Loading