From 50c13a18682945aabd030e1f7b76677f2e054e78 Mon Sep 17 00:00:00 2001 From: cprezzi Date: Thu, 18 May 2017 23:10:44 +0200 Subject: [PATCH] Moved homing origin to bottom/left instead of top/right --- README.md | 26 ++++++++++++-------------- grbl/config.h | 37 ++++++++++++++++++++----------------- grbl/defaults.h | 44 -------------------------------------------- grbl/limits.c | 12 ++++++++++-- grbl/report.c | 6 ------ grbl/system.c | 6 +++++- 6 files changed, 47 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 02d983f..24a28c7 100644 --- a/README.md +++ b/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,23 +13,20 @@ 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 - * $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 - * Your motors will likely stall if you don't set these! - + * 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, $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! Build notes: * Include ```make``` and the ```arm-none-eabi-*``` tools in your path. diff --git a/grbl/config.h b/grbl/config.h index 460a361..2637640 100644 --- a/grbl/config.h +++ b/grbl/config.h @@ -129,6 +129,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 @@ -661,7 +664,7 @@ #define X_LIMIT_BIT 24 // X-MIN=24, X-MAX=25 #define Y_LIMIT_BIT 26 // Y-MIN=26, Y-MAX=27 #define Z_LIMIT_BIT 29 // Z-MIN=28, Z-MAX=29 -#define LIMIT_MASK ((1<FIODIR +#define PROBE_PIN NotUsed // LPC_GPIO1->FIOPIN +#define PROBE_PORT NotUsed // LPC_GPIO1->FIOPIN +#define PROBE_BIT 5 #define PROBE_MASK (1< 0 || target[idx] < settings.max_travel[idx]) { return(true); } + #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);