Commit 65f6f7d7 authored by MagoKimbra's avatar MagoKimbra

FIX

parent 601175ac
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/*
* This configuration file contains mechanism settings for cartesian printer.
*
......@@ -30,7 +29,7 @@
*/
/*****************************************************************************************
************************************* Machine name **************************************
*********************************** Machine name ****************************************
*****************************************************************************************
* *
* This to set a custom name for your generic Mendel. *
......@@ -67,20 +66,23 @@
/*****************************************************************************************
****************************** Endstop pullup resistors *********************************
************************* Endstop pullup resistors **************************************
*****************************************************************************************
* *
* Comment this out (using // at the start of the line) to *
* disable the endstop pullup resistors *
* *
*****************************************************************************************/
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_XMIN // open pin, inverted
#define ENDSTOPPULLUP_YMIN // open pin, inverted
//#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_Z2MIN
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_Z2MAX
#define ENDSTOPPULLUP_ZMAX // open pin, inverted
//#define ENDSTOPPULLUP_ZPROBE
//#define ENDSTOPPULLUP_EMIN
#endif
......@@ -182,7 +184,8 @@
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false // For all extruder
#define DISABLE_INACTIVE_EXTRUDER false //disable only inactive extruder and keep active extruder enabled
// Disable only inactive extruder and keep active extruder enabled
#define DISABLE_INACTIVE_EXTRUDER false
/*****************************************************************************************/
......@@ -197,7 +200,7 @@
#define X_MIN_POS 0
#define Y_MAX_POS 200
#define Y_MIN_POS 0
#define Z_MAX_POS 200
#define Z_MAX_POS 225
#define Z_MIN_POS MANUAL_Z_HOME_POS
#define E_MIN_POS 0
/*****************************************************************************************/
......@@ -210,30 +213,8 @@
/*****************************************************************************************/
/*****************************************************************************************
************************************** MBL or ABL ***************************************
/*****************************************************************************************
* *
* Manual Bed Leveling (MBL) or Auto Bed Leveling (ABL) settings *
* Set the rectangle in which to probe in MBL or ABL. *
* *
*****************************************************************************************/
#define LEFT_PROBE_BED_POSITION 20
#define RIGHT_PROBE_BED_POSITION 180
#define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180
#define XY_TRAVEL_SPEED 10000 // X and Y axis travel speed between probes, in mm/min
/*****************************************************************************************/
/*****************************************************************************************
******************************** Manual home positions **********************************
/*****************************************************************************************
* *
* Manual Bed Leveling (MBL) or Auto Bed Leveling (ABL) settings *
* Set the rectangle in which to probe in MBL or ABL. *
* *
*****************************************************************************************/
// The position of the homing switches
#define MANUAL_HOME_POSITIONS // If defined, MANUAL_*_HOME_POS below will be used
......@@ -249,14 +230,16 @@
/*****************************************************************************************
******************************* Axis steps per unit *************************************
*****************************************************************************************/
#define DEFAULT_AXIS_STEPS_PER_UNIT {103.69,103.69,200/1.25,625,625,625,625} // X, Y, Z, E0...(per extruder). Default steps per unit
// Default steps per unit X, Y, Z, E0...(per extruder)
#define DEFAULT_AXIS_STEPS_PER_UNIT {104, 104, 160, 625, 625, 625, 625}
/*****************************************************************************************/
/*****************************************************************************************
********************************** Axis feedrate ****************************************
*****************************************************************************************/
#define DEFAULT_MAX_FEEDRATE {300,300,4,45,45,45,45} // X, Y, Z, E0...(per extruder). (mm/sec)
// X, Y, Z, E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_FEEDRATE {300, 300, 4, 45, 45, 45, 45}
#define MANUAL_FEEDRATE {50*60, 50*60, 4*60, 60} // Feedrates for manual moves along X, Y, Z, E from panel
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0
......@@ -270,10 +253,14 @@
/*****************************************************************************************
******************************** Axis accelleration *************************************
*****************************************************************************************/
#define DEFAULT_MAX_ACCELERATION {5000,5000,50,5000,5000,5000,5000} // X, Y, Z, E0...(per extruder). Maximum start speed for accelerated moves.
#define DEFAULT_RETRACT_ACCELERATION {10000,10000,10000,10000} // E0... (per extruder) max acceleration in mm/s^2 for retracts
#define DEFAULT_ACCELERATION 400 // X, Y, Z and E* max acceleration in mm/s^2 for printing moves
#define DEFAULT_TRAVEL_ACCELERATION 400 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// Maximum start speed for accelerated moves. X, Y, Z, E0...(per extruder)
#define DEFAULT_MAX_ACCELERATION {3000, 3000, 50, 1000, 1000, 1000, 1000}
// Maximum acceleration in mm/s^2 for retracts E0... (per extruder)
#define DEFAULT_RETRACT_ACCELERATION {10000, 10000, 10000, 10000}
// X, Y, Z and E* maximum acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION 400
// X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION 400
/*****************************************************************************************/
......@@ -287,7 +274,8 @@
*****************************************************************************************/
#define DEFAULT_XYJERK 10.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK {5.0,5.0,5.0,5.0} // E0... (mm/sec) per extruder, max initial speed for retract moves
// max initial speed for retract moves E0... (mm/sec) per extruder
#define DEFAULT_EJERK {5.0, 5.0, 5.0, 5.0}
/*****************************************************************************************/
......@@ -296,7 +284,7 @@
*****************************************************************************************/
#define HOMING_FEEDRATE {40*60, 40*60, 10*60, 0} // set the homing speeds (mm/min)
//homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
// homing hits the endstop, then retracts by this distance, before it tries to slowly bump again:
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2
......
#ifndef BOARD_H
#define BOARD_H
// Macros for board type
#define BOARD_UNKNOWN -1
#define BOARD_GEN7_CUSTOM 10 // Gen7 custom (Alfons3 Version) "https://github.com/Alfons3/Generation_7_Electronics"
#define BOARD_GEN7_12 11 // Gen7 v1.1, v1.2
#define BOARD_GEN7_13 12 // Gen7 v1.3
#define BOARD_GEN7_14 13 // Gen7 v1.4
#define BOARD_CHEAPTRONIC 2 // Cheaptronic v1.0
#define BOARD_SETHI 20 // Sethi 3D_1
#define BOARD_ELEFU_3 21 // Elefu Ra Board (v3)
#define BOARD_GEN3_MONOLITHIC 22 // Gen3 Monolithic Electronics
#define BOARD_RAMPS_OLD 3 // MEGA/RAMPS up to 1.2
#define BOARD_RAMPS_13_EFB 33 // RAMPS 1.3 / 1.4 (Power outputs: Hotend, Fan, Bed)
#define BOARD_RAMPS_13_EEB 34 // RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Bed)
#define BOARD_RAMPS_13_EFF 35 // RAMPS 1.3 / 1.4 (Power outputs: Hotend, Fan, Fan)
#define BOARD_RAMPS_13_EEF 36 // RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Fan)
#define BOARD_RAMPS_13_EEE 37 // RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Hotend2)
#define BOARD_RAMBO 301 // Rambo
#define BOARD_MINIRAMBO 302 // Mini-Rambo
#define BOARD_DUEMILANOVE_328P 4 // Duemilanove w/ ATMega328P pin assignments
#define BOARD_RADDS 402 // RADDS
#define BOARD_RAMPS_FDV1 403 // RAMPS-FD V1
#define BOARD_RAMPS_FDV2 404 // RAMPS-FD V2
#define BOARD_RAMPS4DUE 433 // RAMPS4DUE with AndrewBCN's RAMPS mods (http://forums.reprap.org/read.php?219,479626,page=1)
#define BOARD_GEN6 5 // Gen6
#define BOARD_GEN6_DELUXE 51 // Gen6 deluxe
#define BOARD_ALLIGATOR 502 // ALLIGATOR R2 ARM 32
#define BOARD_SANGUINOLOLU_11 6 // Sanguinololu < 1.2
#define BOARD_SANGUINOLOLU_12 62 // Sanguinololu 1.2 and above
#define BOARD_MELZI 63 // Melzi
#define BOARD_STB_11 64 // STB V1.1
#define BOARD_AZTEEG_X1 65 // Azteeg X1
#define BOARD_MELZI_MAKR3D 66 // Melzi with ATmega1284 (MaKr3d version)
#define BOARD_AZTEEG_X3 67 // Azteeg X3
#define BOARD_AZTEEG_X3_PRO 68 // Azteeg X3 Pro
#define BOARD_ULTIMAKER 7 // Ultimaker
#define BOARD_MEGATRONICS 70 // Megatronics
#define BOARD_MEGATRONICS_2 701 // Megatronics v2.0
#define BOARD_MINITRONICS 702 // Minitronics v1.0
#define BOARD_MEGATRONICS_3 703 // Megatronics v3.0
#define BOARD_ULTIMAKER_OLD 71 // Ultimaker (Older electronics. Pre 1.5.4. This is rare)
#define BOARD_ULTIMAIN_2 72 // Ultimainboard 2.x (Uses TEMP_SENSOR 20)
#define BOARD_3DRAG 77 // 3Drag Controller
#define BOARD_K8200 78 // Vellemann K8200 Controller (derived from 3Drag Controller)
#define BOARD_TEENSYLU 8 // Teensylu
#define BOARD_RUMBA 80 // Rumba
#define BOARD_PRINTRBOARD 81 // Printrboard (AT90USB1286)
#define BOARD_BRAINWAVE 82 // Brainwave (AT90USB646)
#define BOARD_SAV_MKI 83 // SAV Mk-I (AT90USB1286)
#define BOARD_TEENSY2 84 // Teensy++2.0 (AT90USB1286)
#define BOARD_5DPRINT 88 // 5DPrint D8 Driver Board
#define BOARD_GEN3_PLUS 9 // Gen3+
#define BOARD_OMCA_A 90 // Alpha OMCA board
#define BOARD_OMCA 91 // Final OMCA board
#define BOARD_LEAPFROG 999 // Leapfrog
#define BOARD_99 99 // This is in pins.h but...?
#define MB(board) (MOTHERBOARD==BOARD_##board)
#endif
This diff is collapsed.
This diff is collapsed.
......@@ -28,6 +28,9 @@
// Function macro
#define FORCE_INLINE __attribute__((always_inline)) inline
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
#if DISABLED(CRITICAL_SECTION_START)
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
#define CRITICAL_SECTION_END SREG = _sreg;
#endif
#endif //__MACROS_H
......@@ -14,11 +14,11 @@
* 22 BOARD_GEN3_MONOLITHIC - Gen3 Monolithic Electronics
*
* 3 BOARD_RAMPS_OLD - MEGA/RAMPS up to 1.2
* 33 BOARD_RAMPS_13_EFB - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Fan, Bed)
* 34 BOARD_RAMPS_13_EEB - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Bed)
* 35 BOARD_RAMPS_13_EFF - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Fan, Fan)
* 36 BOARD_RAMPS_13_EEF - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Fan)
* 37 BOARD_RAMPS_13_EEE - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Hotend2)
* 33 BOARD_RAMPS_13_HFB - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Fan, Bed)
* 34 BOARD_RAMPS_13_HHB - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Bed)
* 35 BOARD_RAMPS_13_HFF - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Fan, Fan)
* 36 BOARD_RAMPS_13_HHF - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Fan)
* 37 BOARD_RAMPS_13_HHH - RAMPS 1.3 / 1.4 (Power outputs: Hotend0, Hotend1, Hotend2)
*
*301 BOARD_RAMBO - Rambo
*302 BOARD_MINIRAMBO - Mini Rambo
......@@ -186,7 +186,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#if NOTEXIST(GEN7_VERSION)
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
......@@ -261,7 +261,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#if NOTEXIST(GEN7_VERSION)
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 13 // v1.x
#endif
......@@ -502,7 +502,7 @@
#error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
#endif
#if NOTEXIST(GEN7_VERSION)
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
......@@ -843,10 +843,10 @@
/****************************************************************************************
* 33
* RAMPS 1.3 / 1.4
* RAMPS_13_EFB (Extruder, Fan, Bed)
* RAMPS_13_HFB (Hotend0, Fan, Bed)
****************************************************************************************/
#if MB(RAMPS_13_EFB)
#if MB(RAMPS_13_HFB)
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
......@@ -1044,7 +1044,7 @@
#define MAX6675_SS 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // RAMPS_13_EFB
#endif // RAMPS_13_HFB
/****************************************************************************************/
......@@ -1052,10 +1052,10 @@
/****************************************************************************************
* 34
* RAMPS 1.3 / 1.4
* RAMPS_13_EEB (Extruder, Extruder, Bed)
* RAMPS_13_HHB (Hotend0, Hotend1, Bed)
****************************************************************************************/
#if MB(RAMPS_13_EEB)
#if MB(RAMPS_13_HHB)
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
......@@ -1255,10 +1255,10 @@
/****************************************************************************************
* 35
* RAMPS 1.3 / 1.4
* RAMPS_13_EFF (Extruder, Fan, Fan)
* RAMPS_13_HFF (Hotend0, Fan, Fan)
****************************************************************************************/
#if MB(RAMPS_13_EFF)
#if MB(RAMPS_13_HFF)
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
......@@ -1450,7 +1450,7 @@
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // RAMPS_13_EFF
#endif // RAMPS_13_HFF
/****************************************************************************************/
......@@ -1458,10 +1458,10 @@
/****************************************************************************************
* 36
* RAMPS 1.3 / 1.4
* RAMPS_13_EEF (Extruder, Extruder, Fan)
* RAMPS_13_HHF (Hotend0, Hotend1, Fan)
****************************************************************************************/
#if MB(RAMPS_13_EEF)
#if MB(RAMPS_13_HHF)
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
......@@ -1653,7 +1653,7 @@
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // RAMPS_13_EEF
#endif // RAMPS_13_HHF
/****************************************************************************************/
......@@ -1661,10 +1661,10 @@
/****************************************************************************************
* 37
* RAMPS 1.3 / 1.4
* RAMPS_13_EEF (Hotend0, Hotend1, Hotend2)
* RAMPS_13_HHH (Hotend0, Hotend1, Hotend2)
****************************************************************************************/
#if MB(RAMPS_13_EEE)
#if MB(RAMPS_13_HHH)
#define KNOWN_BOARD 1
#if !defined(__AVR_ATmega1280__) && !defined(__AVR_ATmega2560__)
......@@ -1856,7 +1856,7 @@
#define MAX6675_SS 66 // Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif
#endif // RAMPS_13_EEE
#endif // RAMPS_13_HHH
/****************************************************************************************/
......
......@@ -51,14 +51,12 @@
#include "base.h"
#include "Marlin_main.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h"
#endif
#include "planner.h"
#include "stepper_indirection.h"
#include "stepper.h"
#include "temperature.h"
#include "ultralcd.h"
#include "language.h"
//===========================================================================
//============================= public variables ============================
......
......@@ -82,6 +82,8 @@ FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h"
// Transform required to compensate for bed level
extern matrix_3x3 plan_bed_level_matrix;
......
......@@ -1450,9 +1450,7 @@
#if !PIN_EXISTS(Z_PROBE)
#error DEPENDENCY ERROR: You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP
#endif
#if DISABLED(ENABLE_SERVOS)
#error DEPENDENCY ERROR: You must enable ENABLE_SERVOS and must have NUM_SERVOS EXIST and there must be at least 1 configured to use Z_PROBE_ENDSTOP.
#endif
#if ENABLED(ENABLE_SERVOS)
#if NUM_SERVOS < 1
#error DEPENDENCY ERROR: You must have at least 1 servo EXIST for NUM_SERVOS to use Z_PROBE_ENDSTOP.
#endif
......@@ -1463,6 +1461,7 @@
#error DEPENDENCY ERROR: You must have SERVO_ENDSTOP_ANGLES EXIST for Z Extend and Retract to use Z_PROBE_ENDSTOP.
#endif
#endif
#endif
/**
* Check if Probe_Offset * Grid Points is greater than Probing Range
*/
......
......@@ -227,7 +227,7 @@ static boolean isTimerActive(timer16_Sequence_t timer) {
/****************** end of static functions ******************************/
Servo::Servo() {
if ( ServoCount < MAX_SERVOS) {
if (ServoCount < MAX_SERVOS) {
this->servoIndex = ServoCount++; // assign a servo index to this instance
servo_info[this->servoIndex].ticks = usToTicks(DEFAULT_PULSE_WIDTH); // store default values - 12 Aug 2009
}
......@@ -265,7 +265,8 @@ void Servo::detach() {
}
void Servo::write(int value) {
if (value < MIN_PULSE_WIDTH) { // treat values less than 544 as angles in degrees (valid values in microseconds are handled as microseconds)
// treat values less than 544 as angles in degrees (valid values in microseconds are handled as microseconds)
if (value < MIN_PULSE_WIDTH) {
if (value < 0) value = 0;
if (value > 180) value = 180;
value = map(value, 0, 180, SERVO_MIN(), SERVO_MAX());
......
......@@ -1136,7 +1136,6 @@ long st_get_position(uint8_t axis) {
float st_get_position_mm(AxisEnum axis) { return st_get_position(axis) / axis_steps_per_unit[axis]; }
void enable_all_steppers() {
enable_x();
enable_y();
......
......@@ -21,6 +21,8 @@
#ifndef STEPPER_H
#define STEPPER_H
#include "planner.h"
#include "stepper_indirection.h"
/**
* Axis indices as enumerated constants
......
......@@ -152,5 +152,4 @@ void setExtruderAutoFanState(int pin, bool state);
void checkExtruderAutoFans();
extern void autotempShutdown();
#endif // TEMPERATURE_H
This diff is collapsed.
......@@ -46,11 +46,6 @@
FORCE_INLINE void lcd_buttons_update() {}
#endif
#if ENABLED(SDSUPPORT) && ENABLED(SD_SETTINGS)
extern void set_sd_dot();
extern void unset_sd_dot();
#endif
extern int plaPreheatHotendTemp;
extern int plaPreheatHPBTemp;
extern int plaPreheatFanSpeed;
......@@ -116,7 +111,7 @@
#elif ENABLED(NEXTION)
#define LCD_UPDATE_INTERVAL 100
#define LCD_UPDATE_INTERVAL 200
void setpagePopCallback(void *ptr);
void hotPopCallback(void *ptr);
......@@ -152,6 +147,11 @@
#endif //ULTRA_LCD
#if ENABLED(SDSUPPORT) && ENABLED(SD_SETTINGS)
extern void set_sd_dot();
extern void unset_sd_dot();
#endif
char *itostr2(const uint8_t &x);
char *itostr31(const int &xx);
char *itostr3(const int &xx);
......
......@@ -16,7 +16,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <math.h>
#include "base.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE)
......
......@@ -57,4 +57,4 @@ struct matrix_3x3
void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
#endif // AUTO_BED_LEVELING_FEATURE
#endif // VECTOR_3_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment