Commit 6fc9e2b9 authored by MagoKimbra's avatar MagoKimbra

Update code

parent e9f8ac39
......@@ -433,16 +433,16 @@ void Config_PrintSettings()
SERIAL_ECHOLNPGM("Maximum feedrates (mm/s):");
SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M203 X ",max_feedrate[X_AXIS]);
SERIAL_ECHOPAIR(" Y ",max_feedrate[Y_AXIS] );
SERIAL_ECHOPAIR(" Z ", max_feedrate[Z_AXIS] );
SERIAL_ECHOPAIR(" E0 ", max_feedrate[E_AXIS + 0]);
SERIAL_ECHOPAIR(" M203 X",max_feedrate[X_AXIS]);
SERIAL_ECHOPAIR(" Y",max_feedrate[Y_AXIS] );
SERIAL_ECHOPAIR(" Z", max_feedrate[Z_AXIS] );
SERIAL_ECHOPAIR(" E0 S", max_feedrate[E_AXIS + 0]);
#if EXTRUDERS > 1
SERIAL_ECHOPAIR(" E1 ", max_feedrate[E_AXIS + 1]);
SERIAL_ECHOPAIR(" E1 S", max_feedrate[E_AXIS + 1]);
#if EXTRUDERS > 2
SERIAL_ECHOPAIR(" E2 ", max_feedrate[E_AXIS + 2]);
SERIAL_ECHOPAIR(" E2 S", max_feedrate[E_AXIS + 2]);
#if EXTRUDERS > 3
SERIAL_ECHOPAIR(" E3 ", max_feedrate[E_AXIS + 3]);
SERIAL_ECHOPAIR(" E3 S", max_feedrate[E_AXIS + 3]);
#endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1
......@@ -464,16 +464,16 @@ void Config_PrintSettings()
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM("Maximum Acceleration (mm/s2):");
SERIAL_ECHO_START;
SERIAL_ECHOPAIR(" M201 X " ,max_acceleration_units_per_sq_second[X_AXIS] );
SERIAL_ECHOPAIR(" Y " , max_acceleration_units_per_sq_second[Y_AXIS] );
SERIAL_ECHOPAIR(" Z " ,max_acceleration_units_per_sq_second[Z_AXIS] );
SERIAL_ECHOPAIR(" E0 " ,max_acceleration_units_per_sq_second[E_AXIS]);
SERIAL_ECHOPAIR(" M201 X" ,max_acceleration_units_per_sq_second[X_AXIS] );
SERIAL_ECHOPAIR(" Y" , max_acceleration_units_per_sq_second[Y_AXIS] );
SERIAL_ECHOPAIR(" Z" ,max_acceleration_units_per_sq_second[Z_AXIS] );
SERIAL_ECHOPAIR(" E0 S" ,max_acceleration_units_per_sq_second[E_AXIS]);
#if EXTRUDERS > 1
SERIAL_ECHOPAIR(" E1 " ,max_acceleration_units_per_sq_second[E_AXIS+1]);
SERIAL_ECHOPAIR(" E1 S" ,max_acceleration_units_per_sq_second[E_AXIS+1]);
#if EXTRUDERS > 2
SERIAL_ECHOPAIR(" E2 " ,max_acceleration_units_per_sq_second[E_AXIS+2]);
SERIAL_ECHOPAIR(" E2 S" ,max_acceleration_units_per_sq_second[E_AXIS+2]);
#if EXTRUDERS > 3
SERIAL_ECHOPAIR(" E3 " ,max_acceleration_units_per_sq_second[E_AXIS+3]);
SERIAL_ECHOPAIR(" E3 S" ,max_acceleration_units_per_sq_second[E_AXIS+3]);
#endif //EXTRUDERS > 3
#endif //EXTRUDERS > 2
#endif //EXTRUDERS > 1
......
......@@ -225,7 +225,7 @@
#ifdef CONFIG_STEPPERS_TOSHIBA
#define MAX_STEP_FREQUENCY 10000 // Max step frequency for Toshiba Stepper Controllers
#else
#define MAX_STEP_FREQUENCY 40000 // Max step frequency for Ultimaker (5000 pps / half step)
#define MAX_STEP_FREQUENCY 40000
#endif
//By default pololu step drivers require an active high signal. However, some high power drivers require an active low signal as step.
#define INVERT_X_STEP_PIN false
......
......@@ -54,7 +54,7 @@
#include "Servo.h"
#endif
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#if HAS_DIGIPOTSS
#include <SPI.h>
#endif
......@@ -5693,7 +5693,7 @@ void process_commands()
case 907: // M907 Set digital trim pot motor current using axis codes.
{
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#if HAS_DIGIPOTSS
for(int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_current(i,code_value());
if(code_seen('B')) digipot_current(4,code_value());
if(code_seen('S')) for(int i=0;i<=4;i++) digipot_current(i,code_value());
......@@ -5717,7 +5717,7 @@ void process_commands()
break;
case 908: // M908 Control digital trimpot directly.
{
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#if HAS_DIGIPOTSS
uint8_t channel,current;
if(code_seen('P')) channel=code_value();
if(code_seen('S')) current=code_value();
......
......@@ -13,8 +13,7 @@
*/
#ifndef MASK
/// MASKING- returns \f$2^PIN\f$
#define MASK(PIN) (1 << PIN)
#define MASK(PIN) (1 << PIN)
#endif
/*
......
......@@ -63,7 +63,7 @@
#include "boards.h"
#if !MB(5DPRINT)
// Preset optional pins
#define X_MS1_PIN -1
#define X_MS2_PIN -1
#define Y_MS1_PIN -1
......@@ -75,7 +75,6 @@
#define E1_MS1_PIN -1
#define E1_MS2_PIN -1
#define DIGIPOTSS_PIN -1
#endif
/******************************************************************************
......@@ -4418,6 +4417,18 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
/****************************************************************************************/
#ifndef HEATER_1_PIN
#define HEATER_1_PIN -1
#endif
#ifndef TEMP_1_PIN
#define TEMP_1_PIN -1
#endif
#ifndef HEATER_2_PIN
#define HEATER_2_PIN -1
#endif
#ifndef TEMP_2_PIN
#define TEMP_2_PIN -1
#endif
#ifndef HEATER_3_PIN
#define HEATER_3_PIN -1
#endif
......@@ -4456,27 +4467,21 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif
#if X_HOME_DIR > 0 //Home X to MAX
#undef X_MIN_PIN
#define X_MIN_PIN -1
#elif X_HOME_DIR < 0 //Home X to MIN
#undef X_MAX_PIN
#define X_MAX_PIN -1
#endif //X_HOME_DIR > 0
#if Y_HOME_DIR > 0 //Home Y to MAX
#undef Y_MIN_PIN
#define Y_MIN_PIN -1
#elif Y_HOME_DIR < 0 //Home Y to MIN
#undef Y_MAX_PIN
#define Y_MAX_PIN -1
#endif //Y_HOME_DIR > 0
#ifndef DELTA
#if Z_HOME_DIR > 0 //Home Z to MAX
#undef Z_MIN_PIN
#define Z_MIN_PIN -1
#elif Z_HOME_DIR < 0 //Home Z to MIN
#undef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif //Z_HOME_DIR > 0
#endif //!DELTA
......@@ -4501,8 +4506,11 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define _E3_PINS
#endif
#define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
#define SENSITIVE_PINS { 0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, PS_ON_PIN, \
HEATER_BED_PIN, FAN_PIN, \
_E0_PINS _E1_PINS _E2_PINS _E3_PINS \
analogInputToDigitalPin(TEMP_0_PIN), analogInputToDigitalPin(TEMP_1_PIN), analogInputToDigitalPin(TEMP_2_PIN), analogInputToDigitalPin(TEMP_3_PIN), analogInputToDigitalPin(TEMP_BED_PIN) }
#define HAS_DIGIPOTSS (DIGIPOTSS_PIN >= 0)
#endif //__PINS_H
......@@ -59,7 +59,7 @@
#include "language.h"
//===========================================================================
//=============================public variables ============================
//============================= public variables ============================
//===========================================================================
unsigned long minsegmenttime;
......
......@@ -1511,11 +1511,11 @@ void lcd_buttons_update() {
#ifdef NEWPANEL
uint8_t newbutton = 0;
#ifdef INVERT_ROTARY_SWITCH
if (READ(BTN_EN1) == 0) newbutton|= EN_B;
if (READ(BTN_EN2) == 0) newbutton|= EN_A;
if (READ(BTN_EN1) == 0) newbutton |= EN_B;
if (READ(BTN_EN2) == 0) newbutton |= EN_A;
#else
if (READ(BTN_EN1) == 0) newbutton|= EN_A;
if (READ(BTN_EN2) == 0) newbutton|= EN_B;
if (READ(BTN_EN1) == 0) newbutton |= EN_A;
if (READ(BTN_EN2) == 0) newbutton |= EN_B;
#endif
#if BTN_ENC > 0
if (millis() > blocking_enc && READ(BTN_ENC) == 0) newbutton |= EN_C;
......
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