Browse Source

Merge branch 'Marlin_v1' of https://github.com/ErikZalm/Marlin.git into Marlin_v1

Conflicts:
	Marlin/Marlin_main.cpp
pull/1/head
Nicolas Rossi 11 years ago
parent
commit
a54fe2d73c
  1. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/boards.txt
  2. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168.c
  3. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex
  4. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex
  5. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex
  6. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/Makefile
  7. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c
  8. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst
  9. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf
  10. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex
  11. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/Makefile
  12. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/README.txt
  13. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Arduino.h
  14. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/CDC.cpp
  15. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Client.h
  16. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HID.cpp
  17. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.cpp
  18. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.h
  19. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.cpp
  20. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.h
  21. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Platform.h
  22. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.cpp
  23. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.h
  24. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Printable.h
  25. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Server.h
  26. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.cpp
  27. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.h
  28. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Tone.cpp
  29. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBAPI.h
  30. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.cpp
  31. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.h
  32. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBDesc.h
  33. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Udp.h
  34. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WCharacter.h
  35. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WInterrupts.c
  36. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WMath.cpp
  37. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.cpp
  38. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.h
  39. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/binary.h
  40. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/main.cpp
  41. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.cpp
  42. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.h
  43. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring.c
  44. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_analog.c
  45. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_digital.c
  46. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_private.h
  47. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_pulse.c
  48. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_shift.c
  49. 0
      ArduinoAddons/Arduino_1.x.x/Sanguino/variants/standard/pins_arduino.h
  50. 9
      Marlin/Configuration.h
  51. 7
      Marlin/Makefile
  52. 14
      Marlin/Marlin.h
  53. 12
      Marlin/Marlin_main.cpp
  54. 9
      Marlin/example_configurations/delta/Configuration.h
  55. 12
      Marlin/stepper.cpp
  56. 5
      Marlin/temperature.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/boards.txt → ArduinoAddons/Arduino_1.x.x/Sanguino/boards.txt

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168.c → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/Makefile → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/Makefile

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/Makefile → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/Makefile

0
ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/README.txt → ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/README.txt

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Arduino.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Arduino.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/CDC.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/CDC.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Client.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Client.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HID.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HID.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Platform.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Platform.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Printable.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Printable.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Server.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Server.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Tone.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Tone.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBAPI.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBAPI.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBDesc.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBDesc.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Udp.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Udp.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WCharacter.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WCharacter.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WInterrupts.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WInterrupts.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WMath.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WMath.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/binary.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/binary.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/main.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/main.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.cpp → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.cpp

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_analog.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_analog.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_digital.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_digital.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_private.h → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_private.h

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_pulse.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_pulse.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_shift.c → ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_shift.c

0
ArduinoAddons/Arduino_1.x.x/sanguino/variants/standard/pins_arduino.h → ArduinoAddons/Arduino_1.x.x/Sanguino/variants/standard/pins_arduino.h

9
Marlin/Configuration.h

@ -282,9 +282,12 @@
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. const bool X_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. const bool Y_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. const bool Z_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop.
//#define DISABLE_MAX_ENDSTOPS //#define DISABLE_MAX_ENDSTOPS
//#define DISABLE_MIN_ENDSTOPS //#define DISABLE_MIN_ENDSTOPS

7
Marlin/Makefile

@ -312,7 +312,12 @@ LDFLAGS = -lm
# Programming support using avrdude. Settings and variables. # Programming support using avrdude. Settings and variables.
AVRDUDE_PORT = $(UPLOAD_PORT) AVRDUDE_PORT = $(UPLOAD_PORT)
AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i
AVRDUDE_FLAGS = -D -C $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf \ ifeq ($(shell uname -s), Linux)
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
else
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
endif
AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \
-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \ -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
-b $(UPLOAD_RATE) -b $(UPLOAD_RATE)

14
Marlin/Marlin.h

@ -51,22 +51,22 @@
#define MYSERIAL MSerial #define MYSERIAL MSerial
#endif #endif
#define SERIAL_PROTOCOL(x) MYSERIAL.print(x); #define SERIAL_PROTOCOL(x) (MYSERIAL.print(x))
#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y); #define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y))
#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x)); #define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x)))
#define SERIAL_PROTOCOLLN(x) {MYSERIAL.print(x);MYSERIAL.write('\n');} #define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n'))
#define SERIAL_PROTOCOLLNPGM(x) {serialprintPGM(PSTR(x));MYSERIAL.write('\n');} #define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n'))
const char errormagic[] PROGMEM ="Error:"; const char errormagic[] PROGMEM ="Error:";
const char echomagic[] PROGMEM ="echo:"; const char echomagic[] PROGMEM ="echo:";
#define SERIAL_ERROR_START serialprintPGM(errormagic); #define SERIAL_ERROR_START (serialprintPGM(errormagic))
#define SERIAL_ERROR(x) SERIAL_PROTOCOL(x) #define SERIAL_ERROR(x) SERIAL_PROTOCOL(x)
#define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ERRORPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x) #define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(x)
#define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x) #define SERIAL_ERRORLNPGM(x) SERIAL_PROTOCOLLNPGM(x)
#define SERIAL_ECHO_START serialprintPGM(echomagic); #define SERIAL_ECHO_START (serialprintPGM(echomagic))
#define SERIAL_ECHO(x) SERIAL_PROTOCOL(x) #define SERIAL_ECHO(x) SERIAL_PROTOCOL(x)
#define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ECHOPGM(x) SERIAL_PROTOCOLPGM(x)
#define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x)

12
Marlin/Marlin_main.cpp

@ -1542,27 +1542,27 @@ void process_commands()
SERIAL_PROTOCOLLN(MSG_M119_REPORT); SERIAL_PROTOCOLLN(MSG_M119_REPORT);
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 #if defined(X_MIN_PIN) && X_MIN_PIN > -1
SERIAL_PROTOCOLPGM(MSG_X_MIN); SERIAL_PROTOCOLPGM(MSG_X_MIN);
SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(X_MAX_PIN) && X_MAX_PIN > -1 #if defined(X_MAX_PIN) && X_MAX_PIN > -1
SERIAL_PROTOCOLPGM(MSG_X_MAX); SERIAL_PROTOCOLPGM(MSG_X_MAX);
SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
SERIAL_PROTOCOLPGM(MSG_Y_MIN); SERIAL_PROTOCOLPGM(MSG_Y_MIN);
SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(Y_MAX_PIN) && Y_MAX_PIN > -1 #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1
SERIAL_PROTOCOLPGM(MSG_Y_MAX); SERIAL_PROTOCOLPGM(MSG_Y_MAX);
SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 #if defined(Z_MIN_PIN) && Z_MIN_PIN > -1
SERIAL_PROTOCOLPGM(MSG_Z_MIN); SERIAL_PROTOCOLPGM(MSG_Z_MIN);
SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
#if defined(Z_MAX_PIN) && Z_MAX_PIN > -1 #if defined(Z_MAX_PIN) && Z_MAX_PIN > -1
SERIAL_PROTOCOLPGM(MSG_Z_MAX); SERIAL_PROTOCOLPGM(MSG_Z_MAX);
SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN)); SERIAL_PROTOCOLLN(((READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING)?MSG_ENDSTOP_HIT:MSG_ENDSTOP_OPEN));
#endif #endif
break; break;
//TODO: update for all axis, use for loop //TODO: update for all axis, use for loop

9
Marlin/example_configurations/delta/Configuration.h

@ -278,9 +278,12 @@
#endif #endif
// The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins. // The pullups are needed if you directly connect a mechanical endswitch between the signal and ground pins.
const bool X_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. const bool X_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. const bool Y_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool X_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Y_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
const bool Z_MAX_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop.
// deltas never have min endstops // deltas never have min endstops
#define DISABLE_MIN_ENDSTOPS #define DISABLE_MIN_ENDSTOPS

12
Marlin/stepper.cpp

@ -388,7 +388,7 @@ ISR(TIMER1_COMPA_vect)
#endif #endif
{ {
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 #if defined(X_MIN_PIN) && X_MIN_PIN > -1
bool x_min_endstop=(READ(X_MIN_PIN) != X_ENDSTOPS_INVERTING); bool x_min_endstop=(READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING);
if(x_min_endstop && old_x_min_endstop && (current_block->steps_x > 0)) { if(x_min_endstop && old_x_min_endstop && (current_block->steps_x > 0)) {
endstops_trigsteps[X_AXIS] = count_position[X_AXIS]; endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
endstop_x_hit=true; endstop_x_hit=true;
@ -408,7 +408,7 @@ ISR(TIMER1_COMPA_vect)
#endif #endif
{ {
#if defined(X_MAX_PIN) && X_MAX_PIN > -1 #if defined(X_MAX_PIN) && X_MAX_PIN > -1
bool x_max_endstop=(READ(X_MAX_PIN) != X_ENDSTOPS_INVERTING); bool x_max_endstop=(READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING);
if(x_max_endstop && old_x_max_endstop && (current_block->steps_x > 0)){ if(x_max_endstop && old_x_max_endstop && (current_block->steps_x > 0)){
endstops_trigsteps[X_AXIS] = count_position[X_AXIS]; endstops_trigsteps[X_AXIS] = count_position[X_AXIS];
endstop_x_hit=true; endstop_x_hit=true;
@ -428,7 +428,7 @@ ISR(TIMER1_COMPA_vect)
CHECK_ENDSTOPS CHECK_ENDSTOPS
{ {
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1
bool y_min_endstop=(READ(Y_MIN_PIN) != Y_ENDSTOPS_INVERTING); bool y_min_endstop=(READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING);
if(y_min_endstop && old_y_min_endstop && (current_block->steps_y > 0)) { if(y_min_endstop && old_y_min_endstop && (current_block->steps_y > 0)) {
endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS]; endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
endstop_y_hit=true; endstop_y_hit=true;
@ -442,7 +442,7 @@ ISR(TIMER1_COMPA_vect)
CHECK_ENDSTOPS CHECK_ENDSTOPS
{ {
#if defined(Y_MAX_PIN) && Y_MAX_PIN > -1 #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1
bool y_max_endstop=(READ(Y_MAX_PIN) != Y_ENDSTOPS_INVERTING); bool y_max_endstop=(READ(Y_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING);
if(y_max_endstop && old_y_max_endstop && (current_block->steps_y > 0)){ if(y_max_endstop && old_y_max_endstop && (current_block->steps_y > 0)){
endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS]; endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS];
endstop_y_hit=true; endstop_y_hit=true;
@ -464,7 +464,7 @@ ISR(TIMER1_COMPA_vect)
CHECK_ENDSTOPS CHECK_ENDSTOPS
{ {
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 #if defined(Z_MIN_PIN) && Z_MIN_PIN > -1
bool z_min_endstop=(READ(Z_MIN_PIN) != Z_ENDSTOPS_INVERTING); bool z_min_endstop=(READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING);
if(z_min_endstop && old_z_min_endstop && (current_block->steps_z > 0)) { if(z_min_endstop && old_z_min_endstop && (current_block->steps_z > 0)) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true; endstop_z_hit=true;
@ -485,7 +485,7 @@ ISR(TIMER1_COMPA_vect)
CHECK_ENDSTOPS CHECK_ENDSTOPS
{ {
#if defined(Z_MAX_PIN) && Z_MAX_PIN > -1 #if defined(Z_MAX_PIN) && Z_MAX_PIN > -1
bool z_max_endstop=(READ(Z_MAX_PIN) != Z_ENDSTOPS_INVERTING); bool z_max_endstop=(READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING);
if(z_max_endstop && old_z_max_endstop && (current_block->steps_z > 0)) { if(z_max_endstop && old_z_max_endstop && (current_block->steps_z > 0)) {
endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];
endstop_z_hit=true; endstop_z_hit=true;

5
Marlin/temperature.cpp

@ -244,7 +244,7 @@ void PID_autotune(float temp, int extruder, int ncycles)
Kp = 0.6*Ku; Kp = 0.6*Ku;
Ki = 2*Kp/Tu; Ki = 2*Kp/Tu;
Kd = Kp*Tu/8; Kd = Kp*Tu/8;
SERIAL_PROTOCOLLNPGM(" Clasic PID ") SERIAL_PROTOCOLLNPGM(" Clasic PID ");
SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp); SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp);
SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki); SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki);
SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd); SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd);
@ -436,10 +436,9 @@ void manage_heater()
//K1 defined in Configuration.h in the PID settings //K1 defined in Configuration.h in the PID settings
#define K2 (1.0-K1) #define K2 (1.0-K1)
dTerm[e] = (Kd * (pid_input - temp_dState[e]))*K2 + (K1 * dTerm[e]); dTerm[e] = (Kd * (pid_input - temp_dState[e]))*K2 + (K1 * dTerm[e]);
temp_dState[e] = pid_input;
pid_output = constrain(pTerm[e] + iTerm[e] - dTerm[e], 0, PID_MAX); pid_output = constrain(pTerm[e] + iTerm[e] - dTerm[e], 0, PID_MAX);
} }
temp_dState[e] = pid_input;
#else #else
pid_output = constrain(target_temperature[e], 0, PID_MAX); pid_output = constrain(target_temperature[e], 0, PID_MAX);
#endif //PID_OPENLOOP #endif //PID_OPENLOOP

Loading…
Cancel
Save