Merge branch 'master' into more-axis
This commit is contained in:
commit
83c1b57c41
22
README.md
22
README.md
@ -1,7 +1,8 @@
|
||||
![GitHub Logo](https://github.com/gnea/gnea-Media/blob/master/Grbl%20Logo/Grbl%20Logo%20250px.png?raw=true)
|
||||
|
||||
***
|
||||
_Click the `Release` tab to download pre-compiled `.bin` files or just [click here](https://github.com/cprezzi/grbl-LPC/releases)_
|
||||
Old releases are in the `Release` tab. See [cprezzi's branch](https://github.com/cprezzi/grbl-LPC) for more recent releases.
|
||||
Note: cprezzi's branch disables current control and has defaults more suitable for other boards.
|
||||
***
|
||||
This is GRBL 1.1 ported to the LPC1769. It can run on Smoothieboard.
|
||||
|
||||
@ -12,24 +13,21 @@ Usage notes:
|
||||
* Only tested with lasers with PWM. Non-PWM spindle control not ported.
|
||||
* These are defaults for easy-to-change config values.
|
||||
* WPos enabled for LaserWeb compatability ($10=0)
|
||||
* Maximum S value: 1000.0 ($30)
|
||||
* Laser mode: ON ($32)
|
||||
* Minimum S value: 0.0 ($31)
|
||||
* Laser mode: 1 ($32)
|
||||
* New configuration settings
|
||||
* Maximum S value: 1.0 ($30)
|
||||
* Hard limits not yet ported
|
||||
* Control inputs not yet ported (e.g. Cycle Start and Safety Door switches)
|
||||
|
||||
New configuration settings
|
||||
* $33 is PWM frequency in Hz
|
||||
* $34 is PWM off value in %
|
||||
* $35 is PWM min value in %
|
||||
* $36 is PWM max value in %
|
||||
* $140 is X current (amps)
|
||||
* $141 is Y current (amps)
|
||||
* $142 is Z current (amps)
|
||||
* Currents default to 0.0 amps to avoid burning out your motors/drivers
|
||||
* $140, $141, $142 are X, Y, Z current (amps)
|
||||
* Default to 0.0 A to avoid burning out your motors
|
||||
* Your motors will likely stall if you don't set these!
|
||||
|
||||
* Hard limits not yet ported
|
||||
* Control inputs not yet ported (e.g. Cycle Start and Safety Door switches)
|
||||
|
||||
|
||||
Build notes:
|
||||
* Include ```make``` and the ```arm-none-eabi-*``` tools in your path.
|
||||
* Run ```git submodule init``` and ```git submodule update``` before building.
|
||||
|
@ -37,6 +37,7 @@
|
||||
// If doing so, simply comment out these two defines and see instructions below.
|
||||
#define CPU_MAP_LPC1769 // NXP LPC1769 boards (like Smoothieboard, Cohesion3D, MKS SBase)
|
||||
#define BOARD_C3D // For boards without i2c stepper current chip (like Cohesion3D).
|
||||
|
||||
//#define DEFAULTS_GENERIC
|
||||
#define DEFAULTS_K40
|
||||
//#define DEFAULTS_FABKIT
|
||||
@ -133,6 +134,9 @@
|
||||
// define to force Grbl to always set the machine origin at the homed location despite switch orientation.
|
||||
// #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.
|
||||
|
||||
// Uncomment this define to force Grbl to always set the machine origin at bottom left.
|
||||
#define HOMING_FORCE_POSITIVE_SPACE // Uncomment to enable.
|
||||
|
||||
// Number of blocks Grbl executes upon startup. These blocks are stored in EEPROM, where the size
|
||||
// and addresses are defined in settings.h. With the current settings, up to 2 startup blocks may
|
||||
// be stored and executed in order. These startup blocks would typically be used to set the g-code
|
||||
|
@ -307,9 +307,17 @@ void limits_go_home(uint8_t cycle_mask)
|
||||
set_axis_position = 0;
|
||||
#else
|
||||
if ( bit_istrue(settings.homing_dir_mask,bit(idx)) ) {
|
||||
set_axis_position = lround((settings.max_travel[idx]+settings.homing_pulloff)*settings.steps_per_mm[idx]);
|
||||
#ifdef HOMING_FORCE_POSITIVE_SPACE
|
||||
set_axis_position = 0; //lround(settings.homing_pulloff*settings.steps_per_mm[idx]);
|
||||
#else
|
||||
set_axis_position = lround((settings.max_travel[idx]-settings.homing_pulloff)*settings.steps_per_mm[idx]);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef HOMING_FORCE_POSITIVE_SPACE
|
||||
set_axis_position = lround(-settings.max_travel[idx]*settings.steps_per_mm[idx]);
|
||||
#else
|
||||
set_axis_position = lround(-settings.homing_pulloff*settings.steps_per_mm[idx]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,6 @@ static void report_util_setting_string(uint8_t n) {
|
||||
case 30: printPgmString(PSTR("rpm max")); break;
|
||||
case 31: printPgmString(PSTR("rpm min")); break;
|
||||
case 32: printPgmString(PSTR("laser")); break;
|
||||
case 33: printPgmString(PSTR("spindle_pwm_freq")); break;
|
||||
default:
|
||||
n -= AXIS_SETTINGS_START_VAL;
|
||||
uint8_t idx = 0;
|
||||
@ -97,11 +96,6 @@ static void report_util_uint8_setting(uint8_t n, int val) {
|
||||
print_uint8_base10(val);
|
||||
report_util_line_feed(); // report_util_setting_string(n);
|
||||
}
|
||||
static void report_util_uint32_setting(uint8_t n, int val) {
|
||||
report_util_setting_prefix(n);
|
||||
print_uint32_base10(val);
|
||||
report_util_line_feed(); // report_util_setting_string(n);
|
||||
}
|
||||
static void report_util_float_setting(uint8_t n, float val, uint8_t n_decimal) {
|
||||
report_util_setting_prefix(n);
|
||||
printFloat(val,n_decimal);
|
||||
|
@ -345,8 +345,12 @@ uint8_t system_check_travel_limits(float *target)
|
||||
}
|
||||
#else
|
||||
// NOTE: max_travel is stored as negative
|
||||
#ifdef HOMING_FORCE_POSITIVE_SPACE
|
||||
if (target[idx] < 0 || target[idx] > -settings.max_travel[idx]) { return(true); }
|
||||
#else
|
||||
if (target[idx] > 0 || target[idx] < settings.max_travel[idx]) { return(true); }
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user