Commit c1a72f44 authored by MagoKimbra's avatar MagoKimbra

update

parent 6b6d626f
......@@ -109,13 +109,14 @@
* *
***********************************************************************/
//#define NPR2
#if defined(NPR2)
#define COLOR_STEP {120,25,-65,-155} // CARTER ANGLE
#define COLOR_SLOWRATE 170 // MICROSECOND delay for carter motor routine (Carter Motor Feedrate: upper value-slow feedrate)
#define COLOR_HOMERATE 4 // FEEDRATE for carter home
#define MOTOR_ANGLE 1.8 // Nema angle for single step
#define DRIVER_MICROSTEP 4 // Microstep moltiplicator driver (set jumper MS1-2-3) off-on-off 1/4 microstepping.
#define CARTER_MOLTIPLICATOR 14.22 // CARTER MOLTIPLICATOR (gear ratio 13/31-10/31)
#endif
//**********************************************************************
......@@ -225,7 +226,7 @@
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#ifdef PIDTEMP
#if defined(PIDTEMP)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
......@@ -264,7 +265,7 @@
//#define PID_BED_DEBUG // Sends debug data to the serial port.
#ifdef PIDTEMPBED
#if defined(PIDTEMPBED)
#define PID_BED_INTEGRAL_DRIVE_MAX MAX_BED_POWER // limit for the integral term
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
......@@ -309,7 +310,7 @@
* the firmware will halt as a safety precaution.
*/
//#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
//#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all hotends
//#define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed
//===========================================================================
......@@ -321,9 +322,9 @@
// Choose ONE of these 3 charsets. This has to match your hardware. Ignored for full graphic display.
// To find out what type you have - compile with (test) - upload - click to get the menu. You'll see two typical lines from the upper half of the charset.
// See also documentation/LCDLanguageFont.md
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
#define DISPLAY_CHARSET_HD44780_JAPAN // this is the most common hardware
//#define DISPLAY_CHARSET_HD44780_WESTERN
//#define DISPLAY_CHARSET_HD44780_CYRILLIC
//#define ULTRA_LCD //general LCD support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
......@@ -476,7 +477,7 @@
//==================== Bowden Filament management ===========================
//#define EASY_LOAD
#if defined(EASY_LOAD)
#define BOWDEN_LENGTH 250 // mm
#define LCD_PURGE_LENGTH 3 // mm
#define LCD_RETRACT_LENGTH 3 // mm
......@@ -484,6 +485,7 @@
#define LCD_RETRACT_FEEDRATE 10 // mm/s
#define LCD_LOAD_FEEDRATE 8 // mm/s
#define LCD_UNLOAD_FEEDRATE 8 // mm/s
#endif //EASY_LOAD
//===========================================================================
......
......@@ -145,9 +145,9 @@
#define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
// Be sure you have this distance over your Z_MAX_POS in case
#define Z_RAISE_BEFORE_PROBING 10 //How much the extruder will be raised before travelling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 //How much the extruder will be raised when travelling from between next probing points
#define Z_RAISE_AFTER_PROBING 5 //How much the extruder will be raised after the last probing point.
#define Z_RAISE_BEFORE_PROBING 10 // How much the extruder will be raised before travelling to the first probing point.
#define Z_RAISE_BETWEEN_PROBINGS 5 // How much the extruder will be raised when travelling from between next probing points
#define Z_RAISE_AFTER_PROBING 5 // How much the extruder will be raised after the last probing point.
//#define Z_PROBE_SLED // turn on if you have a z-probe mounted on a sled like those designed by Charles Bell
//#define SLED_DOCKING_OFFSET 5 // the extra distance the X axis must travel to pick up the sled. 0 should be fine but you can push it further if you'd like.
......
......@@ -381,7 +381,7 @@
#define MM_PER_ARC_SEGMENT 1
#define N_ARC_CORRECTION 25
// Defines the number of memory slots for saving/restoring position (M331/M332)
// Defines the number of memory slots for saving/restoring position (G60/G61)
// The values should not be less than 1
#define NUM_POSITON_SLOTS 2
......
......@@ -131,7 +131,7 @@
* The '#' is necessary when calling from within sd files, as it stops buffer prereading
* M33 - Get the longname version of a path
* M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
* M49 - Measure Z_Probe repeatability. M49 [P # of points] [X position] [Y position] [V_erboseness #] [E_ngage Probe] [L # of legs of travel]
* M48 - Measure Z_Probe repeatability. M48 [P # of points] [X position] [Y position] [V_erboseness #] [E_ngage Probe] [L # of legs of travel]
* M80 - Turn on Power Supply
* M81 - Turn off Power Supply
* M82 - Set E codes absolute (default)
......@@ -876,19 +876,22 @@ void get_command() {
char *npos = strchr(command, 'N');
char *apos = strchr(command, '*');
if (npos) {
boolean M110 = strstr_P(command, PSTR("M110")) != NULL;
if (M110) {
char *n2pos = strchr(command + 4, 'N');
if (n2pos) npos = n2pos;
}
gcode_N = strtol(npos + 1, NULL, 10);
if (gcode_N != gcode_LastN + 1) {
if (strstr_P(command, PSTR("M110")) == NULL) {
gcode_line_error(PSTR(MSG_ERR_LINE_NO));
return;
}
else {
npos = strchr(npos, 'N');
gcode_N = strtol(npos + 1, NULL, 10);
gcode_LastN = gcode_N;
}
if (gcode_N != gcode_LastN + 1 && !M110) {
gcode_line_error(PSTR(MSG_ERR_LINE_NO));
return;
}
gcode_LastN = gcode_N;
if (apos) {
byte checksum = 0, count = 0;
while (command[count] != '*') checksum ^= command[count++];
......@@ -899,13 +902,10 @@ void get_command() {
}
// if no errors, continue parsing
}
else {
else if (npos == command) {
gcode_line_error(PSTR(MSG_ERR_NO_CHECKSUM));
return;
}
gcode_LastN = gcode_N;
// if no errors, continue parsing
}
else if (apos) { // No '*' without 'N'
gcode_line_error(PSTR(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM), false);
......@@ -4040,10 +4040,10 @@ inline void gcode_M42() {
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST)
/**
* M49: Z-Probe repeatability measurement function.
* M48: Z-Probe repeatability measurement function.
*
* Usage:
* M49 <P#> <X#> <Y#> <V#> <E> <L#>
* M48 <P#> <X#> <Y#> <V#> <E> <L#>
* P = Number of sampled points (4-50, default 10)
* X = Sample X position
* Y = Sample Y position
......@@ -4052,11 +4052,11 @@ inline void gcode_M42() {
* L = Number of legs of movement before probe
*
* This function assumes the bed has been homed. Specifically, that a G28 command
* as been issued prior to invoking the M49 Z-Probe repeatability measurement function.
* as been issued prior to invoking the M48 Z-Probe repeatability measurement function.
* Any information generated by a prior G29 Bed leveling command will be lost and need to be
* regenerated.
*/
inline void gcode_M49() {
inline void gcode_M48() {
double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
uint8_t verbose_level = 1, n_samples = 10, n_legs = 0;
......@@ -4070,7 +4070,7 @@ inline void gcode_M42() {
}
if (verbose_level > 0)
ECHO_LM(DB, "M49 Z-Probe Repeatability test");
ECHO_LM(DB, "M48 Z-Probe Repeatability test");
if (code_seen('P') || code_seen('p')) {
n_samples = code_value_short();
......@@ -4227,7 +4227,7 @@ inline void gcode_M42() {
if (verbose_level > 1) {
ECHO_SV(DB, n + 1);
ECHO_MV(" of ", n_samples);
ECHO_MV(" of ", (int)n_samples);
ECHO_EM(" samples");
ECHO_SMV(DB, "z: ", current_position[Z_AXIS], 6);
if (verbose_level > 2) {
......@@ -5772,7 +5772,7 @@ inline void gcode_M503() {
//M666: Set delta endstop and geometry adjustment
inline void gcode_M666() {
if ( !(code_seen('P'))) {
for(int8_t i=0; i < 3; i++) {
for(int8_t i = 0; i < 3; i++) {
if (code_seen(axis_codes[i])) endstop_adj[i] = code_value();
}
}
......@@ -6347,8 +6347,8 @@ void process_next_command() {
gcode_M42(); break;
#if defined(ENABLE_AUTO_BED_LEVELING) && defined(Z_PROBE_REPEATABILITY_TEST)
case 49: // M49 Z-Probe repeatability
gcode_M49(); break;
case 48: // M48 Z-Probe repeatability
gcode_M48(); break;
#endif
#if HAS_POWER_SWITCH
......
......@@ -857,50 +857,50 @@
#define LARGE_FLASH true
//X axis pins
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define X_MIN_PIN 3
#define X_MAX_PIN 2
#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define X_MIN_PIN 3
#define X_MAX_PIN 2
//Y axis pins
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define Y_MIN_PIN 14
#define Y_MAX_PIN 15
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
#define Y2_STEP_PIN 36
#define Y2_DIR_PIN 34
#define Y2_ENABLE_PIN 30
//Z axis pins
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define Z_PROBE_PIN 18
#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define Z_PROBE_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
#define Z2_ENABLE_PIN 30
//E axis pins
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E0_STEP_PIN 26
#define ORIG_E0_DIR_PIN 28
#define ORIG_E0_ENABLE_PIN 24
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define ORIG_E1_STEP_PIN 36
#define ORIG_E1_DIR_PIN 34
#define ORIG_E1_ENABLE_PIN 30
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define SDPOWER -1
#define SDSS 53
#define LED_PIN 13
#define ORIG_FAN_PIN 9
#define PS_ON_PIN 12
#define PS_ON_PIN 12
#define HEATER_0_PIN 10 // Hotend 1
#define HEATER_1_PIN -1
......@@ -1089,7 +1089,7 @@
#define ORIG_Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define Z_PROBE_PIN 18
#define Z_PROBE_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
......@@ -1292,7 +1292,7 @@
#define ORIG_Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define Z_PROBE_PIN 18
#define Z_PROBE_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
......@@ -1495,7 +1495,7 @@
#define ORIG_Z_ENABLE_PIN 62
#define Z_MIN_PIN 18
#define Z_MAX_PIN 19
#define Z_PROBE_PIN 18
#define Z_PROBE_PIN 19
#define Z2_STEP_PIN 36
#define Z2_DIR_PIN 34
......@@ -2283,7 +2283,7 @@
#define Z_MIN_PIN 38 // PC6
#define Z_MAX_PIN 39 // PC7
#define Z_MS1_PIN 44 // PC19
#define Z_PROBE_PIN 38 // PC6
#define Z_PROBE_PIN 39 // PC7
// E AXIS
#define ORIG_E0_STEP_PIN 5 // PC25
......
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