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
Sleep feature. General re-org and bug fixes.
- New sleep safety feature. If powered components (spindle/coolant) are
enabled and if there is no motion, incoming data, or commands, Grbl
will start a short sleep countdown. Upon elapse, Grbl will depower and
enter a sleep state. If parking is enabled, sleep will also park the
machine. Only a reset will exit sleep and the job will be
unrecoverable. This is purely a safety feature to address serial
disconnection problems.

- Re-organized the cpu-map and default files and put them back into
single files. Makes it easier for OEMs to just drop in their
configuration files for a custom build.

- Introduced a single-file configuration method for OEMs. See config.h
for details. Basically just add the cpu_map and default files to the
bottom of config.h.

- Moved the control pin invert mask to config.h

- Refactored some cpu_map defines to be more descriptive of what they
belong to.

- Added invert coolant pins options to config.h

- Added a new realtime status report. Only a proposal at this time, and
the old classic report is enabled by default. Comment out the
USE_CLASSIC_REALTIME_REPORT define in config.h to use the new report.
Please note that the new report is not finalized and is subject to
change.
  • Loading branch information
chamnit authored and chamnit committed Apr 4, 2016
commit 86935340bd72f5c7273b9efb721b897b7c08ee5a
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CLOCK = 16000000L
PROGRAMMER ?= -c avrisp2 -P usb
SOURCE = main.c motion_control.c gcode.c spindle_control.c coolant_control.c serial.c \
protocol.c stepper.c eeprom.c settings.c planner.c nuts_bolts.c limits.c \
print.c probe.c report.c system.c
print.c probe.c report.c system.c sleep.c
BUILDDIR = build
SOURCEDIR = grbl
# FUSES = -U hfuse:w:0xd9:m -U lfuse:w:0x24:m
Expand Down
39 changes: 39 additions & 0 deletions doc/log/commit_log_v1.0d.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
----------------
Date: 2016-03-20
Author: chamnit
Subject: EEPROM string checks and re-added some compile options.

- Incremented version to v1.0d, but more changes to come before release.

- EEPROM strings were linked to the LINE_BUFFER_SIZE, which were
increased from 80 to 256. This caused a problem with EEPROM storage and
would corrupt any existing data there. Now fixed to preserve the data
there by limiting the size read or written to EEPROM to 80 characters.

- When EEPROM string length is exceeded, Grbl will respond with a “Line
length exceeded” error.

- Re-added a couple of compile-time options: realtime line numbers and
rate reporting. This is to ensure backward support for GUIs for the
time being. These removal options will go away eventually before they
become hard-coded in. (They will be toggle-able with the status report
mask in settings though.)


----------------
Date: 2016-03-19
Author: Sonny Jeon
Expand Down Expand Up @@ -25,3 +47,20 @@ bytes, per the g-code standard (Grbl 328p is limited to 80).

- Removed the cpu_map folder, since this version is strictly Mega2560.


----------------
Date: 2016-03-19
Author: chamnit
Subject: Update README


----------------
Date: 2016-03-19
Author: Sonny Jeon
Subject: No variable spindle and spindle speed fix.

- Soft limit errors were stuck in a feed hold without notifying the
user why it was in a hold. When resumed, the soft limit error would
kick in. Issue should be fixed to behave as intended to automatically
hold and issue a soft limit alarm once the machine has come to a stop.

51 changes: 42 additions & 9 deletions grbl/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
config.h - compile time configuration
Part of Grbl

Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2012-2016 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud

Grbl is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -30,8 +30,12 @@
#include "grbl.h" // For Arduino IDE compatibility.


// Default settings. Used when resetting EEPROM. Change to desired name in defaults.h
// Define CPU pin map and default settings.
// NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only
// one configuration file by placing their specific defaults and pin map at the bottom of this file.
// If doing so, simply comment out these two defines and see instructions below.
#define DEFAULTS_GENERIC
#define CPU_MAP_2560_INITIAL

// Serial baud rate
#define BAUD_RATE 115200
Expand Down Expand Up @@ -133,19 +137,20 @@
// have the same steps per mm internally.
// #define COREXY // Default disabled. Uncomment to enable.

// Inverts pin logic of the control command pins. This essentially means when this option is enabled
// you can use normally-closed switches, rather than the default normally-open switches.
// NOTE: If you require individual control pins inverted, keep this macro disabled and simply alter
// the CONTROL_INVERT_MASK definition in cpu_map.h files.
// #define INVERT_ALL_CONTROL_PINS // Default disabled. Uncomment to enable.
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
// normally-closed switches on the specified pins, rather than the default normally-open switches.
// NOTE: The top option will mask and invert all control pins. The bottom option is an example of
// inverting only two control pins, the safety door and reset. See cpu_map.h for other macro definitions.
// #define INVERT_CONTROL_PIN_MASK CONTROL_MASK // Default disabled. Uncomment to disable.
// #define INVERT_CONTROL_PIN_MASK ((1<<CONTROL_SAFETY_DOOR_BIT)|(CONTROL_RESET_BIT)) // Default disabled.

// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
// such as hard limits and homing. However, this is different from overall invert limits setting.
// This build option will invert only the limit pins defined here, and then the invert limits setting
// will be applied to all of them. This is useful when a user has a mixed set of limit pins with both
// normally-open(NO) and normally-closed(NC) switches installed on their machine.
// NOTE: PLEASE DO NOT USE THIS, unless you have a situation that needs it.
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) // Default disabled. Uncomment to enable.
// #define INVERT_LIMIT_PIN_MASK ((1<<X_LIMIT_BIT)|(1<<Y_LIMIT_BIT)) // Default disabled.

// Inverts the spindle enable pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
// for some pre-built electronic boards.
Expand All @@ -154,6 +159,11 @@
// uncomment the config option USE_SPINDLE_DIR_AS_ENABLE_PIN below.
// #define INVERT_SPINDLE_ENABLE_PIN // Default disabled. Uncomment to enable.

// Inverts the selected coolant pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
// for some pre-built electronic boards.
// #define INVERT_COOLANT_MIST_PIN // Default disabled. Uncomment to enable.
// #define INVERT_COOLANT_FLOOD_PIN // Default disabled. Uncomment to enable.

// Enable all pin states feedback in status reports. Configurable with Grbl settings to print only
// the desired data, which is presented as simple binary reading of each pin as (0 (low) or 1(high)).
// The fields are printed in a particular order and settings groups are separated by '|' characters.
Expand All @@ -172,6 +182,10 @@
// ---------------------------------------------------------------------------------------
// ADVANCED CONFIGURATION OPTIONS:

// Realtime reports will be altered soon, and the current proposed report may be used by commenting
// out the following define.
#define USE_CLASSIC_REALTIME_REPORT // Will be disabled in upcoming releases.

// Enables minimal reporting feedback mode for GUIs, where human-readable strings are not as important.
// This saves nearly 2KB of flash space and may allow enough space to install other/future features.
// GUIs will need to install a look-up table for the error-codes that Grbl sends back in their place.
Expand Down Expand Up @@ -390,6 +404,15 @@
#define PARKING_PULLOUT_INCREMENT 5.0 // Spindle pull-out and plunge distance in mm. Incremental distance.
// Must be positive value or equal to zero.

// Enables and configures Grbl's sleep mode feature. If the spindle or coolant are powered and Grbl
// is not actively moving or receiving any commands, a sleep timer will start. Once elasped without
// receiving any new data or commands, Grbl will execute the sleep mode by shutting down the spindle
// and coolant and entering a safe sleep state. If parking is enabled, Grbl will park the machine as
// well. While in sleep mode, only a hard/soft reset will exit it and the job will be unrecoverable.
// NOTE: Sleep mode is a safety feature, primarily to address communication disconnect problems.
// #define SLEEP_ENABLE // Default disabled. Uncomment to enable.
#define SLEEP_DURATION 5.0 // Seconds before sleep auto-park and power down procedures are executed.


// ---------------------------------------------------------------------------------------
// COMPILE-TIME ERROR CHECKING OF DEFINE VALUES:
Expand All @@ -404,7 +427,17 @@
#endif
#endif

// ---------------------------------------------------------------------------------------
/* ---------------------------------------------------------------------------------------
OEM Single File Configuration Option

Instructions: Paste the cpu_map and default setting definitions below without an enclosing
#ifdef. Comment out the CPU_MAP_xxx and DEFAULT_xxx defines at the top of this file, and
the compiler will ignore the contents of defaults.h and cpu_map.h and use the definitions
below.
*/

// Paste CPU_MAP definitions here.

// Paste default settings definitions here.

#endif
46 changes: 39 additions & 7 deletions grbl/coolant_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
coolant_control.c - coolant control methods
Part of Grbl

Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2012-2016 Sungeun K. Jeon

Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -23,16 +23,40 @@

void coolant_init()
{
COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT);
COOLANT_MIST_DDR |= (1 << COOLANT_MIST_BIT);
COOLANT_FLOOD_DDR |= (1 << COOLANT_FLOOD_BIT); // Configure as output pin.
COOLANT_MIST_DDR |= (1 << COOLANT_MIST_BIT); // Configure as output pin.
coolant_stop();
}


uint8_t coolant_is_enabled()
{
#ifdef INVERT_COOLANT_FLOOD_PIN
if (!(COOLANT_FLOOD_PORT & (1<<COOLANT_FLOOD_BIT))) { return(true); }
#else
if (COOLANT_FLOOD_PORT & (1<<COOLANT_FLOOD_BIT)) { return(true); }
#endif
#ifdef INVERT_COOLANT_MIST_PIN
if (!(COOLANT_MIST_PORT & (1<<COOLANT_MIST_BIT))) { return(true); }
#else
if (COOLANT_MIST_PORT & (1<<COOLANT_MIST_BIT)) { return(true); }
#endif
return(false);
}


void coolant_stop()
{
COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
#ifdef INVERT_COOLANT_FLOOD_PIN
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
#else
COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
#endif
#ifdef INVERT_COOLANT_MIST_PIN
COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT);
#else
COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
#endif
}


Expand All @@ -41,9 +65,17 @@ void coolant_set_state(uint8_t mode)
if (sys.abort) { return; } // Block during abort.

if (mode == COOLANT_FLOOD_ENABLE) {
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
#ifdef INVERT_COOLANT_FLOOD_PIN
COOLANT_FLOOD_PORT &= ~(1 << COOLANT_FLOOD_BIT);
#else
COOLANT_FLOOD_PORT |= (1 << COOLANT_FLOOD_BIT);
#endif
} else if (mode == COOLANT_MIST_ENABLE) {
COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT);
#ifdef INVERT_COOLANT_MIST_PIN
COOLANT_MIST_PORT &= ~(1 << COOLANT_MIST_BIT);
#else
COOLANT_MIST_PORT |= (1 << COOLANT_MIST_BIT);
#endif
} else {
coolant_stop();
}
Expand Down
1 change: 1 addition & 0 deletions grbl/coolant_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ void coolant_init();
void coolant_stop();
void coolant_set_state(uint8_t mode);
void coolant_run(uint8_t mode);
uint8_t coolant_is_enabled();

#endif
Loading