From 2b4c936c1a479911b7cf25a99fce4dabfcc3c7c5 Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Mon, 1 Apr 2019 21:24:06 +0200 Subject: [PATCH] Add config option for new board revision --- Marlin/Configuration.h | 14 +++++++++++++ Marlin/pins_TRIGORILLA_14.h | 42 ++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6bcdb9c..ce5b81c 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1949,6 +1949,20 @@ // Only power servos during movement, otherwise leave off to prevent jitter //#define DEACTIVATE_SERVOS_AFTER_MOVE +/** + * Select your version of the Trigorilla (RAMPS1.4) board here. + * + * 0 = Default Trigorilla + * 1 = Newer Trigorilla v1.1 (first seen late 2018) + * + * The only major difference is a slight change on the servo pin mapping. + * This setting only is relevant if you want to use BLtouch or similar + * mods to be used via servo pins. + * The new version is to be identified by a "TRIGORILLA1.1" lettering + * on the upper left of the PCB silkscreen. + */ +#define TRIGORILLA_VERSION 0 + // Enable Anycubic TFT #define ANYCUBIC_TFT_MODEL #define ANYCUBIC_FILAMENT_RUNOUT_SENSOR diff --git a/Marlin/pins_TRIGORILLA_14.h b/Marlin/pins_TRIGORILLA_14.h index adf7576..1581e4f 100644 --- a/Marlin/pins_TRIGORILLA_14.h +++ b/Marlin/pins_TRIGORILLA_14.h @@ -95,21 +95,39 @@ #define TEMP_BED_PIN 14 // Servos -#ifdef NUM_SERVOS - #define SERVO0_PIN 11 +#if TRIGORILLA_VERSION == 0 // Default Trigorilla + #ifdef NUM_SERVOS + #define SERVO0_PIN 11 - #if NUM_SERVOS > 1 - #define SERVO1_PIN 6 - #endif + #if NUM_SERVOS > 1 + #define SERVO1_PIN 6 + #endif - #if NUM_SERVOS > 2 - #define SERVO2_PIN 5 - #endif + #if NUM_SERVOS > 2 + #define SERVO2_PIN 5 + #endif - #if NUM_SERVOS > 3 - #define SERVO3_PIN 4 - #endif -#endif + #if NUM_SERVOS > 3 + #define SERVO3_PIN 4 + #endif + #endif +#else // Trigorilla 1.1 + #ifdef NUM_SERVOS + #define SERVO0_PIN 5 + + #if NUM_SERVOS > 1 + #define SERVO1_PIN 4 + #endif + + #if NUM_SERVOS > 2 + #define SERVO2_PIN 11 + #endif + + #if NUM_SERVOS > 3 + #define SERVO3_PIN 6 + #endif + #endif +#endif // #if TRIGORILLA_VERSION #if defined(ANYCUBIC_TFT_MODEL) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) #define BEEPER_PIN 31