From 16b9239a26088ac682a1c3683542f36a4ab573ed Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Wed, 29 May 2013 18:06:12 +0200 Subject: [PATCH 01/12] Report temperatures for all extruders --- Marlin/Marlin_main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 47202aff8..d5f43022e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1068,6 +1068,14 @@ void process_commands() SERIAL_PROTOCOL_F(degTargetBed(),1); #endif //TEMP_BED_PIN #else + for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { + SERIAL_PROTOCOLPGM(" T"); + SERIAL_PROTOCOL(cur_extruder); + SERIAL_PROTOCOLPGM(":"); + SERIAL_PROTOCOL_F(degHotend(cur_extruder),1); + SERIAL_PROTOCOLPGM(" /"); + SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); + } SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif From 01ed99143c1468afa5980708536738c5f96a8035 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Tue, 23 Jul 2013 23:34:42 +0200 Subject: [PATCH 02/12] Woops, fix logic --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index d2d1ae5d8..eb0bf554e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1210,7 +1210,6 @@ void process_commands() SERIAL_PROTOCOLPGM(" /"); SERIAL_PROTOCOL_F(degTargetBed(),1); #endif //TEMP_BED_PIN - #else for (int8_t cur_extruder = 0; cur_extruder < EXTRUDERS; ++cur_extruder) { SERIAL_PROTOCOLPGM(" T"); SERIAL_PROTOCOL(cur_extruder); @@ -1219,6 +1218,7 @@ void process_commands() SERIAL_PROTOCOLPGM(" /"); SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); } + #else SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif From 374bc99fa3873efd49346128fb127c1aee5862f2 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Wed, 24 Jul 2013 12:09:53 +0200 Subject: [PATCH 03/12] Add support of LiquidTWI2-based panels to Makefile Use LIQUID_TWI2=1 as make argument to enable this support --- Marlin/Makefile | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index a56bc1eab..5cc25ea01 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -54,6 +54,9 @@ UPLOAD_PORT ?= /dev/arduino #Directory used to build files in, contains all the build files, from object files to the final hex file. BUILD_DIR ?= applet +# This defines whether Liquid_TWI2 support will be built +LIQUID_TWI2 ?= 0 + ############################################################################ # Below here nothing should be changed... @@ -199,9 +202,19 @@ VPATH += $(HARDWARE_SRC) ifeq ($(HARDWARE_VARIANT), arduino) VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI +ifeq ($(LIQUID_TWI2), 1) +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2 +endif else VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal VPATH += $(HARDWARE_DIR)/libraries/SPI +ifeq ($(LIQUID_TWI2), 1) +VPATH += $(HARDWARE_DIR)/libraries/Wire +VPATH += $(HARDWARE_DIR)/libraries/Wire/utility +VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2 +endif endif ifeq ($(HARDWARE_VARIANT), arduino) HARDWARE_SUB_VARIANT ?= mega @@ -218,8 +231,13 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp \ SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp \ stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \ - watchdog.cpp -CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp Servo.cpp Tone.cpp + watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp +ifeq ($(LIQUID_TWI2), 0) +CXXSRC += LiquidCrystal.cpp +else +SRC += twi.c +CXXSRC += Wire.cpp LiquidTWI2.cpp +endif #Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true) From e019197b32ecf29a0ca273d3d05a6d9e58af6d5b Mon Sep 17 00:00:00 2001 From: ellensp Date: Sat, 27 Jul 2013 00:13:49 +1200 Subject: [PATCH 04/12] renamed ArduinoAddons/Arduino_1.x.x/sanguino to Sanguino. Now make works for Arduino > 1.0 on linux --- .../Arduino_1.x.x/{sanguino => Sanguino}/boards.txt | 0 .../bootloaders/atmega/ATmegaBOOT_168.c | 0 .../atmega/ATmegaBOOT_168_atmega1284p.hex | 0 .../atmega/ATmegaBOOT_168_atmega1284p_8m.hex | 0 .../atmega/ATmegaBOOT_168_atmega644p.hex | 0 .../bootloaders/atmega/Makefile | 0 .../bootloaders/atmega644p/ATmegaBOOT.c | 0 .../bootloaders/atmega644p/ATmegaBOOT.c.tst | 0 .../bootloaders/atmega644p/ATmegaBOOT_644P.elf | Bin .../bootloaders/atmega644p/ATmegaBOOT_644P.hex | 0 .../bootloaders/atmega644p/Makefile | 0 .../bootloaders/atmega644p/README.txt | 0 .../{sanguino => Sanguino}/cores/arduino/Arduino.h | 0 .../{sanguino => Sanguino}/cores/arduino/CDC.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/Client.h | 0 .../{sanguino => Sanguino}/cores/arduino/HID.cpp | 0 .../cores/arduino/HardwareSerial.cpp | 0 .../cores/arduino/HardwareSerial.h | 0 .../cores/arduino/IPAddress.cpp | 0 .../cores/arduino/IPAddress.h | 0 .../{sanguino => Sanguino}/cores/arduino/Platform.h | 0 .../{sanguino => Sanguino}/cores/arduino/Print.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/Print.h | 0 .../cores/arduino/Printable.h | 0 .../{sanguino => Sanguino}/cores/arduino/Server.h | 0 .../{sanguino => Sanguino}/cores/arduino/Stream.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/Stream.h | 0 .../{sanguino => Sanguino}/cores/arduino/Tone.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/USBAPI.h | 0 .../cores/arduino/USBCore.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/USBCore.h | 0 .../{sanguino => Sanguino}/cores/arduino/USBDesc.h | 0 .../{sanguino => Sanguino}/cores/arduino/Udp.h | 0 .../cores/arduino/WCharacter.h | 0 .../cores/arduino/WInterrupts.c | 0 .../{sanguino => Sanguino}/cores/arduino/WMath.cpp | 0 .../cores/arduino/WString.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/WString.h | 0 .../{sanguino => Sanguino}/cores/arduino/binary.h | 0 .../{sanguino => Sanguino}/cores/arduino/main.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/new.cpp | 0 .../{sanguino => Sanguino}/cores/arduino/new.h | 0 .../{sanguino => Sanguino}/cores/arduino/wiring.c | 0 .../cores/arduino/wiring_analog.c | 0 .../cores/arduino/wiring_digital.c | 0 .../cores/arduino/wiring_private.h | 0 .../cores/arduino/wiring_pulse.c | 0 .../cores/arduino/wiring_shift.c | 0 .../variants/standard/pins_arduino.h | 0 49 files changed, 0 insertions(+), 0 deletions(-) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/boards.txt (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega/ATmegaBOOT_168.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega/Makefile (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/ATmegaBOOT.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/ATmegaBOOT.c.tst (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/ATmegaBOOT_644P.elf (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/ATmegaBOOT_644P.hex (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/Makefile (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/bootloaders/atmega644p/README.txt (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Arduino.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/CDC.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Client.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/HID.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/HardwareSerial.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/HardwareSerial.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/IPAddress.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/IPAddress.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Platform.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Print.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Print.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Printable.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Server.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Stream.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Stream.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Tone.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/USBAPI.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/USBCore.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/USBCore.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/USBDesc.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/Udp.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/WCharacter.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/WInterrupts.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/WMath.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/WString.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/WString.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/binary.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/main.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/new.cpp (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/new.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring_analog.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring_digital.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring_private.h (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring_pulse.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/cores/arduino/wiring_shift.c (100%) rename ArduinoAddons/Arduino_1.x.x/{sanguino => Sanguino}/variants/standard/pins_arduino.h (100%) diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/boards.txt b/ArduinoAddons/Arduino_1.x.x/Sanguino/boards.txt similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/boards.txt rename to ArduinoAddons/Arduino_1.x.x/Sanguino/boards.txt diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p.hex diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega1284p_8m.hex diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/ATmegaBOOT_168_atmega644p.hex diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/Makefile b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/Makefile similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega/Makefile rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega/Makefile diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT.c.tst diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.elf diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/ATmegaBOOT_644P.hex diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/Makefile b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/Makefile similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/Makefile rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/Makefile diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/README.txt b/ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/README.txt similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/bootloaders/atmega644p/README.txt rename to ArduinoAddons/Arduino_1.x.x/Sanguino/bootloaders/atmega644p/README.txt diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Arduino.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Arduino.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Arduino.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Arduino.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/CDC.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/CDC.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/CDC.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/CDC.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Client.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Client.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Client.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Client.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HID.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HID.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HID.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HID.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/HardwareSerial.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/HardwareSerial.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/IPAddress.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/IPAddress.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Platform.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Platform.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Platform.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Platform.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Print.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Print.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Printable.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Printable.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Printable.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Printable.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Server.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Server.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Server.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Server.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Stream.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Stream.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Tone.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Tone.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Tone.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Tone.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBAPI.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBAPI.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBAPI.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBAPI.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBCore.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBCore.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBDesc.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBDesc.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/USBDesc.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/USBDesc.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Udp.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Udp.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/Udp.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/Udp.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WCharacter.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WCharacter.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WCharacter.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WCharacter.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WInterrupts.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WInterrupts.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WInterrupts.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WInterrupts.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WMath.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WMath.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WMath.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WMath.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/WString.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/WString.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/binary.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/binary.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/binary.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/binary.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/main.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/main.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/main.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/main.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.cpp b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.cpp similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.cpp rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.cpp diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/new.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/new.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_analog.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_analog.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_analog.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_analog.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_digital.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_digital.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_digital.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_digital.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_private.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_private.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_private.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_private.h diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_pulse.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_pulse.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_pulse.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_pulse.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_shift.c b/ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_shift.c similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/cores/arduino/wiring_shift.c rename to ArduinoAddons/Arduino_1.x.x/Sanguino/cores/arduino/wiring_shift.c diff --git a/ArduinoAddons/Arduino_1.x.x/sanguino/variants/standard/pins_arduino.h b/ArduinoAddons/Arduino_1.x.x/Sanguino/variants/standard/pins_arduino.h similarity index 100% rename from ArduinoAddons/Arduino_1.x.x/sanguino/variants/standard/pins_arduino.h rename to ArduinoAddons/Arduino_1.x.x/Sanguino/variants/standard/pins_arduino.h From eb23a68e92e5bf571287961a435a9edf23121ee0 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Sun, 28 Jul 2013 18:18:41 +0200 Subject: [PATCH 05/12] Update French translation in language.h --- Marlin/language.h | 139 ++++++++++++++++++++++------------------------ 1 file changed, 67 insertions(+), 72 deletions(-) diff --git a/Marlin/language.h b/Marlin/language.h index 17222c7cd..39e459f94 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -373,96 +373,91 @@ #if LANGUAGE_CHOICE == 3 - #define WELCOME_MSG MACHINE_NAME " Pret." + #define WELCOME_MSG MACHINE_NAME " prete." #define MSG_SD_INSERTED "Carte inseree" #define MSG_SD_REMOVED "Carte retiree" - #define MSG_MAIN " Principal \003" - #define MSG_AUTOSTART " Demarrage auto." - #define MSG_DISABLE_STEPPERS " Desactiver moteurs" - #define MSG_AUTO_HOME " Home auto." - #define MSG_SET_ORIGIN " Regler origine" + #define MSG_MAIN "Menu principal" + #define MSG_AUTOSTART "Demarrage auto" + #define MSG_DISABLE_STEPPERS "Arreter moteurs" + #define MSG_AUTO_HOME "Home auto." + #define MSG_SET_ORIGIN "Regler origine" #define MSG_PREHEAT_PLA " Prechauffage PLA" #define MSG_PREHEAT_PLA_SETTINGS " Regl. prechauffe PLA" - #define MSG_PREHEAT_ABS " Prechauffage ABS" - #define MSG_PREHEAT_ABS_SETTINGS " Regl. prechauffe ABS" - #define MSG_COOLDOWN " Refroidissement" - #define MSG_SWITCH_PS_ON "Allumer alimentation" - #define MSG_SWITCH_PS_OFF "Eteindre alimentation" - #define MSG_EXTRUDE " Extrusion" - #define MSG_RETRACT " Retractation" - #define MSG_PREHEAT_PLA " Prechauffage PLA" - #define MSG_PREHEAT_ABS " Prechauffage ABS" - #define MSG_MOVE_AXIS " Deplacer axe \x7E" - #define MSG_SPEED " Vitesse:" - #define MSG_NOZZLE " \002Buse:" - #define MSG_NOZZLE1 " \002Buse2:" - #define MSG_NOZZLE2 " \002Buse3:" - #define MSG_BED " \002Lit:" - #define MSG_FAN_SPEED " Vitesse ventilateur:" - #define MSG_FLOW " Flux:" - #define MSG_CONTROL " Controle \003" - #define MSG_MIN " \002 Min:" - #define MSG_MAX " \002 Max:" - #define MSG_FACTOR " \002 Facteur:" - #define MSG_AUTOTEMP " Temp. Auto.:" + #define MSG_PREHEAT_ABS "Prechauffage ABS" + #define MSG_PREHEAT_ABS_SETTINGS "Regl. prechauffe ABS" + #define MSG_COOLDOWN "Refroidir" + #define MSG_SWITCH_PS_ON "Allumer alim." + #define MSG_SWITCH_PS_OFF "Eteindre alim." + #define MSG_EXTRUDE "Extrusion" + #define MSG_RETRACT "Retraction" + #define MSG_PREHEAT_PLA "Prechauffage PLA" + #define MSG_PREHEAT_ABS "Prechauffage ABS" + #define MSG_MOVE_AXIS "Deplacer un axe" + #define MSG_SPEED " Vitesse" + #define MSG_NOZZLE "Buse" + #define MSG_NOZZLE1 "Buse2" + #define MSG_NOZZLE2 "Buse3" + #define MSG_BED "Plateau" + #define MSG_FAN_SPEED "Vitesse ventilateur" + #define MSG_FLOW "Flux" + #define MSG_CONTROL "Controler" + #define MSG_MIN " \002 Min" + #define MSG_MAX " \002 Max" + #define MSG_FACTOR " \002 Facteur" + #define MSG_AUTOTEMP "Temp. Auto." #define MSG_ON "Marche " #define MSG_OFF "Arret" - #define MSG_PID_P " PID-P: " - #define MSG_PID_I " PID-I: " - #define MSG_PID_D " PID-D: " - #define MSG_PID_C " PID-C: " - #define MSG_ACC " Acc:" + #define MSG_PID_P "PID-P" + #define MSG_PID_I "PID-I" + #define MSG_PID_D "PID-D" + #define MSG_PID_C "PID-C" + #define MSG_ACC "Accel" #define MSG_VXY_JERK "Vxy-jerk" #define MSG_VZ_JERK "Vz-jerk" #define MSG_VE_JERK "Ve-jerk" - #define MSG_VMAX " Vmax " - #define MSG_X "x:" - #define MSG_Y "y:" - #define MSG_Z "z:" - #define MSG_E "e:" - #define MSG_VMIN " Vmin:" - #define MSG_VTRAV_MIN " Vdepl min:" - #define MSG_AMAX " Amax " - #define MSG_A_RETRACT " A-retract:" - #define MSG_XSTEPS " Xpas/mm:" - #define MSG_YSTEPS " Ypas/mm:" - #define MSG_ZSTEPS " Zpas/mm:" - #define MSG_ESTEPS " Epas/mm:" - #define MSG_MAIN_WIDE " Principal \003" - #define MSG_RECTRACT "Rectracter" + #define MSG_VMAX "Vmax" + #define MSG_X "x" + #define MSG_Y "y" + #define MSG_Z "z" + #define MSG_E "e" + #define MSG_VMIN "Vmin" + #define MSG_VTRAV_MIN "Vdepl min" + #define MSG_AMAX "Amax " + #define MSG_A_RETRACT "A-retract" + #define MSG_XSTEPS "Xpas/mm" + #define MSG_YSTEPS "Ypas/mm" + #define MSG_ZSTEPS "Zpas/mm" + #define MSG_ESTEPS "Epas/mm" #define MSG_TEMPERATURE "Temperature" #define MSG_MOTION "Mouvement" - #define MSG_CONTRAST "LCD contrast" - #define MSG_STORE_EPROM " Sauvegarder memoire" - #define MSG_LOAD_EPROM " Lire memoire" - #define MSG_RESTORE_FAILSAFE " Restaurer memoire" - #define MSG_REFRESH "\004Actualiser" - #define MSG_WATCH " Surveiller \003" - #define MSG_PREPARE " Preparer \x7E" - #define MSG_PREPARE_ALT " Prepare \003" - #define MSG_CONTROL_ARROW " Controle \x7E" - #define MSG_RETRACT_ARROW " Retracter \x7E" - #define MSG_TUNE " Regler \x7E" - #define MSG_PAUSE_PRINT " Pause impression \x7E" - #define MSG_RESUME_PRINT " Reprendre impression \x7E" - #define MSG_STOP_PRINT " Arreter impression \x7E" - #define MSG_CARD_MENU " Menu carte \x7E" - #define MSG_NO_CARD " Pas de carte" + #define MSG_CONTRAST "Contraste LCD" + #define MSG_STORE_EPROM "Sauver config" + #define MSG_LOAD_EPROM "Lire config" + #define MSG_RESTORE_FAILSAFE "Restaurer defauts" + #define MSG_REFRESH "Actualiser" + #define MSG_WATCH "Surveiller" + #define MSG_PREPARE "Preparer" + #define MSG_TUNE "Regler" + #define MSG_PAUSE_PRINT "Interrompre impr." + #define MSG_RESUME_PRINT "Reprendre impr." + #define MSG_STOP_PRINT "Arreter impr." + #define MSG_CARD_MENU "Impr. depuis SD" + #define MSG_NO_CARD "Pas de carte" #define MSG_DWELL "Repos..." #define MSG_USERWAIT "Attente de l'utilisateur..." #define MSG_RESUMING "Reprise de l'impression" #define MSG_NO_MOVE "Aucun mouvement." #define MSG_PART_RELEASE "Relache partielle" - #define MSG_KILLED "TUE." + #define MSG_KILLED "MORT." #define MSG_STOPPED "STOPPE." #define MSG_STEPPER_RELEASED "RELACHE." - #define MSG_CONTROL_RETRACT " Retractation mm:" - #define MSG_CONTROL_RETRACTF " Retractation F:" - #define MSG_CONTROL_RETRACT_ZLIFT " Hop mm:" - #define MSG_CONTROL_RETRACT_RECOVER " UnRet +mm:" - #define MSG_CONTROL_RETRACT_RECOVERF " UnRet F:" - #define MSG_AUTORETRACT " Retract. Auto.:" - #define MSG_FILAMENTCHANGE "Change filament" + #define MSG_CONTROL_RETRACT "Retraction mm" + #define MSG_CONTROL_RETRACTF "Retraction F" + #define MSG_CONTROL_RETRACT_ZLIFT "Hop mm" + #define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm" + #define MSG_CONTROL_RETRACT_RECOVERF "UnRet F" + #define MSG_AUTORETRACT "Retract. Auto." + #define MSG_FILAMENTCHANGE "Changer filament" #define MSG_INIT_SDCARD "Init. la carte SD" #define MSG_CNG_SDCARD "Changer de carte SD" From 1902d339b0d5e9fef5fdc31456d852fa3ea436bb Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Sun, 28 Jul 2013 19:19:57 +0200 Subject: [PATCH 06/12] Add Panelolu2 pins for RAMPS1.3 --- Marlin/pins.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Marlin/pins.h b/Marlin/pins.h index 60235800a..4e53d07ac 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -485,6 +485,14 @@ #define BTN_ENC 35 #define SDCARDDETECT 49 + #elif defined(LCD_I2C_PANELOLU2) + #define BTN_EN1 47 //reverse if the encoder turns the wrong way. + #define BTN_EN2 43 + #define BTN_ENC 32 + #define SDSS 53 + #define SDCARDDETECT -1 + #define KILL_PIN 41 + #define FAN_PIN 45 #else //arduino pin which triggers an piezzo beeper #define BEEPER 33 // Beeper on AUX-4 From be2dea1dc622f9057af23e0510da773c2fc81663 Mon Sep 17 00:00:00 2001 From: Brendan-csel Date: Mon, 29 Jul 2013 20:58:09 +1200 Subject: [PATCH 07/12] Save LCD_CLICKED before it is cleared The SD card menu was refreshing so slowly that the button interrupt was clearing LCD_CLICKED before the menu items could check it. --- Marlin/ultralcd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index f6fc82d40..df17a3033 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -96,6 +96,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l if (encoderPosition > 0x8000) encoderPosition = 0; \ if (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM < currentMenuViewOffset) currentMenuViewOffset = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\ uint8_t _lineNr = currentMenuViewOffset, _menuItemNr; \ + bool wasClicked = LCD_CLICKED;\ for(uint8_t _drawLineNr = 0; _drawLineNr < LCD_HEIGHT; _drawLineNr++, _lineNr++) { \ _menuItemNr = 0; #define MENU_ITEM(type, label, args...) do { \ @@ -108,7 +109,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \ }\ }\ - if (LCD_CLICKED && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\ + if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\ lcd_quick_feedback(); \ menu_action_ ## type ( args ); \ return;\ From d80aecda0a8dea4e15c15bb221fe9508cc355a63 Mon Sep 17 00:00:00 2001 From: Brendan-csel Date: Mon, 29 Jul 2013 21:00:29 +1200 Subject: [PATCH 08/12] Skip SD menu refresh if nothing has changed --- Marlin/ultralcd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index df17a3033..f2c40575d 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -675,6 +675,8 @@ static void lcd_sd_updir() void lcd_sdcard_menu() { + if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) + return; // nothing to do (so don't thrash the SD card) uint16_t fileCnt = card.getnrfilenames(); START_MENU(); MENU_ITEM(back, MSG_MAIN, lcd_main_menu); From a504c883468829d487f63a048996fe0db037daf2 Mon Sep 17 00:00:00 2001 From: daid Date: Thu, 1 Aug 2013 14:12:30 +0200 Subject: [PATCH 09/12] Fix a bug where the PID controllers D action kicks in hard as soon as the PID controller starts. --- Marlin/temperature.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index f5df7a1e7..5cbe1b4fa 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -436,10 +436,9 @@ void manage_heater() //K1 defined in Configuration.h in the PID settings #define K2 (1.0-K1) 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); } + temp_dState[e] = pid_input; #else pid_output = constrain(target_temperature[e], 0, PID_MAX); #endif //PID_OPENLOOP From 3700f688f5eb62843c2dba02fdeffeecf92bd1e4 Mon Sep 17 00:00:00 2001 From: "hg42@gmx.net" Date: Thu, 1 Aug 2013 14:56:39 +0200 Subject: [PATCH 10/12] convert PROTOCOL macros from statements to (multiple, comma separated) expressions --- Marlin/Marlin.h | 14 +++++++------- Marlin/temperature.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index b92d81072..988170789 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -51,22 +51,22 @@ #define MYSERIAL MSerial #endif -#define SERIAL_PROTOCOL(x) MYSERIAL.print(x); -#define SERIAL_PROTOCOL_F(x,y) MYSERIAL.print(x,y); -#define SERIAL_PROTOCOLPGM(x) serialprintPGM(PSTR(x)); -#define SERIAL_PROTOCOLLN(x) {MYSERIAL.print(x);MYSERIAL.write('\n');} -#define SERIAL_PROTOCOLLNPGM(x) {serialprintPGM(PSTR(x));MYSERIAL.write('\n');} +#define SERIAL_PROTOCOL(x) (MYSERIAL.print(x)) +#define SERIAL_PROTOCOL_F(x,y) (MYSERIAL.print(x,y)) +#define SERIAL_PROTOCOLPGM(x) (serialprintPGM(PSTR(x))) +#define SERIAL_PROTOCOLLN(x) (MYSERIAL.print(x),MYSERIAL.write('\n')) +#define SERIAL_PROTOCOLLNPGM(x) (serialprintPGM(PSTR(x)),MYSERIAL.write('\n')) const char errormagic[] PROGMEM ="Error:"; 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_ERRORPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ERRORLN(x) SERIAL_PROTOCOLLN(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_ECHOPGM(x) SERIAL_PROTOCOLPGM(x) #define SERIAL_ECHOLN(x) SERIAL_PROTOCOLLN(x) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index f5df7a1e7..c732716b1 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -244,7 +244,7 @@ void PID_autotune(float temp, int extruder, int ncycles) Kp = 0.6*Ku; Ki = 2*Kp/Tu; Kd = Kp*Tu/8; - SERIAL_PROTOCOLLNPGM(" Clasic PID ") + SERIAL_PROTOCOLLNPGM(" Clasic PID "); SERIAL_PROTOCOLPGM(" Kp: "); SERIAL_PROTOCOLLN(Kp); SERIAL_PROTOCOLPGM(" Ki: "); SERIAL_PROTOCOLLN(Ki); SERIAL_PROTOCOLPGM(" Kd: "); SERIAL_PROTOCOLLN(Kd); From 2ca983568d5cc658ba00ec0b92d5fd31455c0364 Mon Sep 17 00:00:00 2001 From: "hg42@gmx.net" Date: Thu, 1 Aug 2013 15:06:39 +0200 Subject: [PATCH 11/12] separate INVERTING for MIN and MAX endstops (6 #defines instead of 3) --- Marlin/Configuration.h | 29 ++- Marlin/Marlin_main.cpp | 76 +++--- .../delta/Configuration.h | 29 ++- Marlin/stepper.cpp | 238 +++++++++--------- 4 files changed, 189 insertions(+), 183 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index db02b1d5f..bf2018674 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -141,7 +141,7 @@ #define TEMP_SENSOR_BED 0 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT +//#define TEMP_SENSOR_1_AS_REDUNDANT #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 // Actual temperature must be close to target for this long before M109 returns success @@ -278,9 +278,12 @@ #endif // 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 Y_ENDSTOPS_INVERTING = true; // set to true to invert the logic of the endstops. -const bool Z_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_MIN_ENDSTOP_INVERTING = true; // set to true to invert the logic of the endstop. +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_MIN_ENDSTOPS @@ -379,7 +382,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //#define EEPROM_CHITCHAT // Preheat Constants -#define PLA_PREHEAT_HOTEND_TEMP 180 +#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HPB_TEMP 70 #define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 @@ -464,7 +467,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th #define LCD_I2C_TYPE_PCF8575 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif // PANELOLU2 LCD with status LEDs, separate encoder and click inputs @@ -473,13 +476,13 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 ) // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file) - // Note: The PANELOLU2 encoder click input can either be directly connected to a pin - // (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). + // Note: The PANELOLU2 encoder click input can either be directly connected to a pin + // (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs @@ -489,11 +492,11 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. // Note: The pause/stop/resume LCD button pin should be connected to the Arduino // BTN_ENC pin (or set BTN_ENC to -1 if not used) - #define LCD_I2C_TYPE_MCP23017 + #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif #ifdef ULTIPANEL @@ -565,10 +568,10 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Servo Endstops -// +// // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. -// +// //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 800cc8ae2..747668392 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -431,10 +431,10 @@ void setup() lcd_init(); _delay_ms(1000); // wait 1sec to display the splash screen - + #if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan - #endif + #endif } @@ -691,15 +691,15 @@ XYZ_CONSTS_FROM_CONFIG(signed char, home_dir, HOME_DIR); #endif #if X_HOME_DIR != -1 || X2_HOME_DIR != 1 #error "Please use canonical x-carriage assignment" // the x-carriages are defined by their homing directions - #endif - + #endif + static float x_home_pos(int extruder) { if (extruder == 0) return base_home_pos(X_AXIS) + add_homeing[X_AXIS]; else // In dual carriage mode the extruder offset provides an override of the // second X-carriage offset when homed - otherwise X2_HOME_POS is used. - // This allow soft recalibration of the second extruder offset position without firmware reflash + // This allow soft recalibration of the second extruder offset position without firmware reflash // (through the M218 command). return (extruder_offset[X_AXIS][1] > 0) ? extruder_offset[X_AXIS][1] : X2_HOME_POS; } @@ -709,7 +709,7 @@ static int x_home_dir(int extruder) { } static float inactive_x_carriage_pos = X2_MAX_POS; -#endif +#endif static void axis_is_at_home(int axis) { #ifdef DUAL_X_CARRIAGE @@ -719,7 +719,7 @@ static void axis_is_at_home(int axis) { max_pos[X_AXIS] = max(extruder_offset[X_AXIS][1], X2_MAX_POS); return; } -#endif +#endif current_position[axis] = base_home_pos(axis) + add_homeing[axis]; min_pos[axis] = base_min_pos(axis) + add_homeing[axis]; max_pos[axis] = base_max_pos(axis) + add_homeing[axis]; @@ -745,7 +745,7 @@ static void homeaxis(int axis) { servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2]); } #endif - + current_position[axis] = 0; plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); destination[axis] = 1.5 * max_length(axis) * axis_home_dir; @@ -879,7 +879,7 @@ void process_commands() current_position[X_AXIS] = 0; current_position[Y_AXIS] = 0; current_position[Z_AXIS] = 0; - plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); + plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); destination[X_AXIS] = 3 * Z_MAX_LENGTH; destination[Y_AXIS] = 3 * Z_MAX_LENGTH; @@ -892,7 +892,7 @@ void process_commands() current_position[X_AXIS] = destination[X_AXIS]; current_position[Y_AXIS] = destination[Y_AXIS]; current_position[Z_AXIS] = destination[Z_AXIS]; - + // take care of back off and rehome now we are all at the top HOMEAXIS(X); HOMEAXIS(Y); @@ -921,7 +921,7 @@ void process_commands() #else int x_axis_home_dir = x_home_dir(active_extruder); #endif - + plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); destination[X_AXIS] = 1.5 * max_length(X_AXIS) * x_axis_home_dir;destination[Y_AXIS] = 1.5 * max_length(Y_AXIS) * home_dir(Y_AXIS); feedrate = homing_feedrate[X_AXIS]; @@ -954,7 +954,7 @@ void process_commands() HOMEAXIS(X); inactive_x_carriage_pos = current_position[X_AXIS]; active_extruder = tmp_extruder; - #endif + #endif HOMEAXIS(X); } @@ -988,7 +988,7 @@ void process_commands() } plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]); #endif // else DELTA - + #ifdef ENDSTOPS_ONLY_FOR_HOMING enable_endstops(false); #endif @@ -1223,9 +1223,9 @@ void process_commands() SERIAL_PROTOCOLPGM(" T"); SERIAL_PROTOCOL(cur_extruder); SERIAL_PROTOCOLPGM(":"); - SERIAL_PROTOCOL_F(degHotend(cur_extruder),1); + SERIAL_PROTOCOL_F(degHotend(cur_extruder),1); SERIAL_PROTOCOLPGM(" /"); - SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); + SERIAL_PROTOCOL_F(degTargetHotend(cur_extruder),1); } #else SERIAL_ERROR_START; @@ -1250,7 +1250,7 @@ void process_commands() #ifdef AUTOTEMP autotemp_enabled=false; #endif - if (code_seen('S')) { + if (code_seen('S')) { setTargetHotend(code_value(), tmp_extruder); CooldownNoWait = true; } else if (code_seen('R')) { @@ -1327,7 +1327,7 @@ void process_commands() case 190: // M190 - Wait for bed heater to reach target. #if defined(TEMP_BED_PIN) && TEMP_BED_PIN > -1 LCD_MESSAGEPGM(MSG_BED_HEATING); - if (code_seen('S')) { + if (code_seen('S')) { setTargetBed(code_value()); CooldownNoWait = true; } else if (code_seen('R')) { @@ -1335,9 +1335,9 @@ void process_commands() CooldownNoWait = false; } codenum = millis(); - + target_direction = isHeatingBed(); // true if heating, false if cooling - + while ( target_direction ? (isHeatingBed()) : (isCoolingBed()&&(CooldownNoWait==false)) ) { if(( millis() - codenum) > 1000 ) //Print Temp Reading every 1 second while heating up. @@ -1417,7 +1417,7 @@ void process_commands() #endif break; #endif - + case 81: // M81 - Turn off Power Supply disable_heater(); st_synchronize(); @@ -1542,27 +1542,27 @@ void process_commands() SERIAL_PROTOCOLLN(MSG_M119_REPORT); #if defined(X_MIN_PIN) && X_MIN_PIN > -1 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 #if defined(X_MAX_PIN) && X_MAX_PIN > -1 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 #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 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 #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1 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 #if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 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 #if defined(Z_MAX_PIN) && Z_MAX_PIN > -1 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 break; //TODO: update for all axis, use for loop @@ -1699,7 +1699,7 @@ void process_commands() } } break; - + #if NUM_SERVOS > 0 case 280: // M280 - set servo position absolute. P: servo index, S: angle or microseconds { @@ -1987,7 +1987,7 @@ void process_commands() delay(3); WRITE(BEEPER,LOW); delay(3); - #else + #else lcd_buzz(1000/6,100); #endif } @@ -2103,8 +2103,8 @@ void process_commands() active_extruder = tmp_extruder; axis_is_at_home(X_AXIS); //this function updates X min/max values. current_position[X_AXIS] = inactive_x_carriage_pos; - inactive_x_carriage_pos = tmp_x_pos; - #else + inactive_x_carriage_pos = tmp_x_pos; + #else // Offset extruder (only by XY) int i; for(i = 0; i < 2; i++) { @@ -2340,10 +2340,10 @@ void prepare_arc_move(char isclockwise) { #if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1 #if defined(FAN_PIN) - #if CONTROLLERFAN_PIN == FAN_PIN + #if CONTROLLERFAN_PIN == FAN_PIN #error "You cannot set CONTROLLERFAN_PIN equal to FAN_PIN" #endif -#endif +#endif unsigned long lastMotor = 0; //Save the time for when a motor was turned on last unsigned long lastMotorCheck = 0; @@ -2368,17 +2368,17 @@ void controllerFan() { lastMotor = millis(); //... set time to NOW so the fan will turn on } - - if ((millis() - lastMotor) >= (CONTROLLERFAN_SECS*1000UL) || lastMotor == 0) //If the last time any driver was enabled, is longer since than CONTROLLERSEC... + + if ((millis() - lastMotor) >= (CONTROLLERFAN_SECS*1000UL) || lastMotor == 0) //If the last time any driver was enabled, is longer since than CONTROLLERSEC... { - digitalWrite(CONTROLLERFAN_PIN, 0); - analogWrite(CONTROLLERFAN_PIN, 0); + digitalWrite(CONTROLLERFAN_PIN, 0); + analogWrite(CONTROLLERFAN_PIN, 0); } else { // allows digital or PWM fan output to be used (see M42 handling) digitalWrite(CONTROLLERFAN_PIN, CONTROLLERFAN_SPEED); - analogWrite(CONTROLLERFAN_PIN, CONTROLLERFAN_SPEED); + analogWrite(CONTROLLERFAN_PIN, CONTROLLERFAN_SPEED); } } } @@ -2445,7 +2445,7 @@ void kill() #if defined(PS_ON_PIN) && PS_ON_PIN > -1 pinMode(PS_ON_PIN,INPUT); -#endif +#endif SERIAL_ERROR_START; SERIAL_ERRORLNPGM(MSG_ERR_KILLED); LCD_ALERTMESSAGEPGM(MSG_KILLED); diff --git a/Marlin/example_configurations/delta/Configuration.h b/Marlin/example_configurations/delta/Configuration.h index 7fbb4d85a..cb9236569 100644 --- a/Marlin/example_configurations/delta/Configuration.h +++ b/Marlin/example_configurations/delta/Configuration.h @@ -141,7 +141,7 @@ #define TEMP_SENSOR_BED 0 // This makes temp sensor 1 a redundant sensor for sensor 0. If the temperatures difference between these sensors is to high the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT +//#define TEMP_SENSOR_1_AS_REDUNDANT #define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 // Actual temperature must be close to target for this long before M109 returns success @@ -278,9 +278,12 @@ #endif // 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 Y_ENDSTOPS_INVERTING = false; // set to true to invert the logic of the endstops. -const bool Z_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_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic of the endstop. +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 #define DISABLE_MIN_ENDSTOPS @@ -386,7 +389,7 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t //#define EEPROM_CHITCHAT // Preheat Constants -#define PLA_PREHEAT_HOTEND_TEMP 180 +#define PLA_PREHEAT_HOTEND_TEMP 180 #define PLA_PREHEAT_HPB_TEMP 70 #define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255 @@ -471,7 +474,7 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t #define LCD_I2C_TYPE_PCF8575 #define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif // PANELOLU2 LCD with status LEDs, separate encoder and click inputs @@ -480,13 +483,13 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t // This uses the LiquidTWI2 library v1.2.3 or later ( https://github.com/lincomatic/LiquidTWI2 ) // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. // (v1.2.3 no longer requires you to define PANELOLU in the LiquidTWI2.h library header file) - // Note: The PANELOLU2 encoder click input can either be directly connected to a pin - // (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). + // Note: The PANELOLU2 encoder click input can either be directly connected to a pin + // (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1). #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs @@ -496,11 +499,11 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t // Make sure the LiquidTWI2 directory is placed in the Arduino or Sketchbook libraries subdirectory. // Note: The pause/stop/resume LCD button pin should be connected to the Arduino // BTN_ENC pin (or set BTN_ENC to -1 if not used) - #define LCD_I2C_TYPE_MCP23017 + #define LCD_I2C_TYPE_MCP23017 #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later) #define NEWPANEL - #define ULTIPANEL + #define ULTIPANEL #endif #ifdef ULTIPANEL @@ -572,10 +575,10 @@ const bool Z_ENDSTOPS_INVERTING = false; // set to true to invert the logic of t //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command // Servo Endstops -// +// // This allows for servo actuated endstops, primary usage is for the Z Axis to eliminate calibration or bed height changes. // Use M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500. -// +// //#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1 //#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 70,0} // X,Y,Z Axis Extend and Retract angles diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 2f1d91260..0ba100139 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -48,8 +48,8 @@ block_t *current_block; // A pointer to the block currently being traced // Variables used by The Stepper Driver Interrupt static unsigned char out_bits; // The next stepping-bits to be output static long counter_x, // Counter variables for the bresenham line tracer - counter_y, - counter_z, + counter_y, + counter_z, counter_e; volatile static unsigned long step_events_completed; // The number of step events executed in the current block #ifdef ADVANCE @@ -224,27 +224,27 @@ void enable_endstops(bool check) // | BLOCK 1 | BLOCK 2 | d // // time -----> -// -// The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates -// first block->accelerate_until step_events_completed, then keeps going at constant speed until +// +// The trapezoid is the shape the speed curve over time. It starts at block->initial_rate, accelerates +// first block->accelerate_until step_events_completed, then keeps going at constant speed until // step_events_completed reaches block->decelerate_after after which it decelerates until the trapezoid generator is reset. // The slope of acceleration is calculated with the leib ramp alghorithm. void st_wake_up() { // TCNT1 = 0; - ENABLE_STEPPER_DRIVER_INTERRUPT(); + ENABLE_STEPPER_DRIVER_INTERRUPT(); } void step_wait(){ for(int8_t i=0; i < 6; i++){ } } - + FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { unsigned short timer; if(step_rate > MAX_STEP_FREQUENCY) step_rate = MAX_STEP_FREQUENCY; - + if(step_rate > 20000) { // If steprate > 20kHz >> step 4 times step_rate = (step_rate >> 2)&0x3fff; step_loops = 4; @@ -255,11 +255,11 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { } else { step_loops = 1; - } - + } + if(step_rate < (F_CPU/500000)) step_rate = (F_CPU/500000); step_rate -= (F_CPU/500000); // Correct for minimal speed - if(step_rate >= (8*256)){ // higher step rate + if(step_rate >= (8*256)){ // higher step rate unsigned short table_address = (unsigned short)&speed_lookuptable_fast[(unsigned char)(step_rate>>8)][0]; unsigned char tmp_step_rate = (step_rate & 0x00ff); unsigned short gain = (unsigned short)pgm_read_word_near(table_address+2); @@ -276,7 +276,7 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { return timer; } -// Initializes the trapezoid generator from the current block. Called whenever a new +// Initializes the trapezoid generator from the current block. Called whenever a new // block begins. FORCE_INLINE void trapezoid_generator_reset() { #ifdef ADVANCE @@ -284,7 +284,7 @@ FORCE_INLINE void trapezoid_generator_reset() { final_advance = current_block->final_advance; // Do E steps + advance steps e_steps[current_block->active_extruder] += ((advance >>8) - old_advance); - old_advance = advance >>8; + old_advance = advance >>8; #endif deceleration_time = 0; // step_rate to timer interval @@ -294,7 +294,7 @@ FORCE_INLINE void trapezoid_generator_reset() { acc_step_rate = current_block->initial_rate; acceleration_time = calc_timer(acc_step_rate); OCR1A = acceleration_time; - + // SERIAL_ECHO_START; // SERIAL_ECHOPGM("advance :"); // SERIAL_ECHO(current_block->advance/256.0); @@ -304,13 +304,13 @@ FORCE_INLINE void trapezoid_generator_reset() { // SERIAL_ECHO(current_block->initial_advance/256.0); // SERIAL_ECHOPGM("final advance :"); // SERIAL_ECHOLN(current_block->final_advance/256.0); - + } -// "The Stepper Driver Interrupt" - This timer interrupt is the workhorse. -// It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately. +// "The Stepper Driver Interrupt" - This timer interrupt is the workhorse. +// It pops blocks from the block_buffer and executes them by pulsing the stepper pins appropriately. ISR(TIMER1_COMPA_vect) -{ +{ // If there is no current block, attempt to pop one from the buffer if (current_block == NULL) { // Anything in the buffer? @@ -322,24 +322,24 @@ ISR(TIMER1_COMPA_vect) counter_y = counter_x; counter_z = counter_x; counter_e = counter_x; - step_events_completed = 0; - - #ifdef Z_LATE_ENABLE + step_events_completed = 0; + + #ifdef Z_LATE_ENABLE if(current_block->steps_z > 0) { enable_z(); OCR1A = 2000; //1ms wait return; } #endif - + // #ifdef ADVANCE // e_steps[current_block->active_extruder] = 0; // #endif - } + } else { OCR1A=2000; // 1kHz. - } - } + } + } if (current_block != NULL) { // Set directions TO DO This should be done once during init of trapezoid. Endstops -> interrupt @@ -352,7 +352,7 @@ ISR(TIMER1_COMPA_vect) if (active_extruder != 0) WRITE(X2_DIR_PIN,INVERT_X_DIR); else - #endif + #endif WRITE(X_DIR_PIN, INVERT_X_DIR); count_direction[X_AXIS]=-1; } @@ -361,7 +361,7 @@ ISR(TIMER1_COMPA_vect) if (active_extruder != 0) WRITE(X2_DIR_PIN,!INVERT_X_DIR); else - #endif + #endif WRITE(X_DIR_PIN, !INVERT_X_DIR); count_direction[X_AXIS]=1; } @@ -373,7 +373,7 @@ ISR(TIMER1_COMPA_vect) WRITE(Y_DIR_PIN, !INVERT_Y_DIR); count_direction[Y_AXIS]=1; } - + // Set direction en check limit switches #ifndef COREXY if ((out_bits & (1< -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)) { endstops_trigsteps[X_AXIS] = count_position[X_AXIS]; endstop_x_hit=true; @@ -400,15 +400,15 @@ ISR(TIMER1_COMPA_vect) } } else { // +direction - CHECK_ENDSTOPS + CHECK_ENDSTOPS { #ifdef DUAL_X_CARRIAGE // with 2 x-carriages, endstops are only checked in the homing direction for the active extruder if ((active_extruder == 0 && X_HOME_DIR == 1) || (active_extruder != 0 && X2_HOME_DIR == 1)) - #endif + #endif { #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)){ endstops_trigsteps[X_AXIS] = count_position[X_AXIS]; endstop_x_hit=true; @@ -416,7 +416,7 @@ ISR(TIMER1_COMPA_vect) } old_x_max_endstop = x_max_endstop; #endif - } + } } } @@ -428,7 +428,7 @@ ISR(TIMER1_COMPA_vect) CHECK_ENDSTOPS { #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)) { endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS]; endstop_y_hit=true; @@ -442,7 +442,7 @@ ISR(TIMER1_COMPA_vect) CHECK_ENDSTOPS { #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)){ endstops_trigsteps[Y_AXIS] = count_position[Y_AXIS]; endstop_y_hit=true; @@ -455,16 +455,16 @@ ISR(TIMER1_COMPA_vect) if ((out_bits & (1< -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)) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstop_z_hit=true; @@ -485,7 +485,7 @@ ISR(TIMER1_COMPA_vect) CHECK_ENDSTOPS { #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)) { endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; endstop_z_hit=true; @@ -506,10 +506,10 @@ ISR(TIMER1_COMPA_vect) count_direction[E_AXIS]=1; } #endif //!ADVANCE - - - for(int8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves) + + + for(int8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves) #ifndef AT90USB MSerial.checkRx(); // Check for serial chars. #endif @@ -524,7 +524,7 @@ ISR(TIMER1_COMPA_vect) else { e_steps[current_block->active_extruder]++; } - } + } #endif //ADVANCE counter_x += current_block->steps_x; @@ -533,38 +533,38 @@ ISR(TIMER1_COMPA_vect) if (active_extruder != 0) WRITE(X2_STEP_PIN,!INVERT_X_STEP_PIN); else - #endif + #endif WRITE(X_STEP_PIN, !INVERT_X_STEP_PIN); counter_x -= current_block->step_event_count; - count_position[X_AXIS]+=count_direction[X_AXIS]; + count_position[X_AXIS]+=count_direction[X_AXIS]; #ifdef DUAL_X_CARRIAGE if (active_extruder != 0) WRITE(X2_STEP_PIN,INVERT_X_STEP_PIN); else - #endif + #endif WRITE(X_STEP_PIN, INVERT_X_STEP_PIN); } - + counter_y += current_block->steps_y; if (counter_y > 0) { WRITE(Y_STEP_PIN, !INVERT_Y_STEP_PIN); - counter_y -= current_block->step_event_count; - count_position[Y_AXIS]+=count_direction[Y_AXIS]; + counter_y -= current_block->step_event_count; + count_position[Y_AXIS]+=count_direction[Y_AXIS]; WRITE(Y_STEP_PIN, INVERT_Y_STEP_PIN); } - + counter_z += current_block->steps_z; if (counter_z > 0) { WRITE(Z_STEP_PIN, !INVERT_Z_STEP_PIN); - + #ifdef Z_DUAL_STEPPER_DRIVERS WRITE(Z2_STEP_PIN, !INVERT_Z_STEP_PIN); #endif - + counter_z -= current_block->step_event_count; count_position[Z_AXIS]+=count_direction[Z_AXIS]; WRITE(Z_STEP_PIN, INVERT_Z_STEP_PIN); - + #ifdef Z_DUAL_STEPPER_DRIVERS WRITE(Z2_STEP_PIN, INVERT_Z_STEP_PIN); #endif @@ -579,17 +579,17 @@ ISR(TIMER1_COMPA_vect) WRITE_E_STEP(INVERT_E_STEP_PIN); } #endif //!ADVANCE - step_events_completed += 1; + step_events_completed += 1; if(step_events_completed >= current_block->step_event_count) break; } // Calculare new timer value unsigned short timer; unsigned short step_rate; if (step_events_completed <= (unsigned long int)current_block->accelerate_until) { - + MultiU24X24toH16(acc_step_rate, acceleration_time, current_block->acceleration_rate); acc_step_rate += current_block->initial_rate; - + // upper limit if(acc_step_rate > current_block->nominal_rate) acc_step_rate = current_block->nominal_rate; @@ -605,13 +605,13 @@ ISR(TIMER1_COMPA_vect) //if(advance > current_block->advance) advance = current_block->advance; // Do E steps + advance steps e_steps[current_block->active_extruder] += ((advance >>8) - old_advance); - old_advance = advance >>8; - + old_advance = advance >>8; + #endif - } - else if (step_events_completed > (unsigned long int)current_block->decelerate_after) { + } + else if (step_events_completed > (unsigned long int)current_block->decelerate_after) { MultiU24X24toH16(step_rate, deceleration_time, current_block->acceleration_rate); - + if(step_rate > acc_step_rate) { // Check step_rate stays positive step_rate = current_block->final_rate; } @@ -634,7 +634,7 @@ ISR(TIMER1_COMPA_vect) if(advance < final_advance) advance = final_advance; // Do E steps + advance steps e_steps[current_block->active_extruder] += ((advance >>8) - old_advance); - old_advance = advance >>8; + old_advance = advance >>8; #endif //ADVANCE } else { @@ -643,12 +643,12 @@ ISR(TIMER1_COMPA_vect) step_loops = step_loops_nominal; } - // If current block is finished, reset pointer + // If current block is finished, reset pointer if (step_events_completed >= current_block->step_event_count) { current_block = NULL; plan_discard_current_block(); - } - } + } + } } #ifdef ADVANCE @@ -667,7 +667,7 @@ ISR(TIMER1_COMPA_vect) WRITE(E0_DIR_PIN, INVERT_E0_DIR); e_steps[0]++; WRITE(E0_STEP_PIN, !INVERT_E_STEP_PIN); - } + } else if (e_steps[0] > 0) { WRITE(E0_DIR_PIN, !INVERT_E0_DIR); e_steps[0]--; @@ -681,7 +681,7 @@ ISR(TIMER1_COMPA_vect) WRITE(E1_DIR_PIN, INVERT_E1_DIR); e_steps[1]++; WRITE(E1_STEP_PIN, !INVERT_E_STEP_PIN); - } + } else if (e_steps[1] > 0) { WRITE(E1_DIR_PIN, !INVERT_E1_DIR); e_steps[1]--; @@ -696,7 +696,7 @@ ISR(TIMER1_COMPA_vect) WRITE(E2_DIR_PIN, INVERT_E2_DIR); e_steps[2]++; WRITE(E2_STEP_PIN, !INVERT_E_STEP_PIN); - } + } else if (e_steps[2] > 0) { WRITE(E2_DIR_PIN, !INVERT_E2_DIR); e_steps[2]--; @@ -712,7 +712,7 @@ void st_init() { digipot_init(); //Initialize Digipot Motor Current microstep_init(); //Initialize Microstepping Pins - + //Initialize Dir Pins #if defined(X_DIR_PIN) && X_DIR_PIN > -1 SET_OUTPUT(X_DIR_PIN); @@ -720,17 +720,17 @@ void st_init() #if defined(X2_DIR_PIN) && X2_DIR_PIN > -1 SET_OUTPUT(X2_DIR_PIN); #endif - #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1 + #if defined(Y_DIR_PIN) && Y_DIR_PIN > -1 SET_OUTPUT(Y_DIR_PIN); #endif - #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1 + #if defined(Z_DIR_PIN) && Z_DIR_PIN > -1 SET_OUTPUT(Z_DIR_PIN); #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_DIR_PIN) && (Z2_DIR_PIN > -1) SET_OUTPUT(Z2_DIR_PIN); #endif #endif - #if defined(E0_DIR_PIN) && E0_DIR_PIN > -1 + #if defined(E0_DIR_PIN) && E0_DIR_PIN > -1 SET_OUTPUT(E0_DIR_PIN); #endif #if defined(E1_DIR_PIN) && (E1_DIR_PIN > -1) @@ -757,7 +757,7 @@ void st_init() #if defined(Z_ENABLE_PIN) && Z_ENABLE_PIN > -1 SET_OUTPUT(Z_ENABLE_PIN); if(!Z_ENABLE_ON) WRITE(Z_ENABLE_PIN,HIGH); - + #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_ENABLE_PIN) && (Z2_ENABLE_PIN > -1) SET_OUTPUT(Z2_ENABLE_PIN); if(!Z_ENABLE_ON) WRITE(Z2_ENABLE_PIN,HIGH); @@ -777,67 +777,67 @@ void st_init() #endif //endstops and pullups - + #if defined(X_MIN_PIN) && X_MIN_PIN > -1 - SET_INPUT(X_MIN_PIN); + SET_INPUT(X_MIN_PIN); #ifdef ENDSTOPPULLUP_XMIN WRITE(X_MIN_PIN,HIGH); #endif #endif - + #if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 - SET_INPUT(Y_MIN_PIN); + SET_INPUT(Y_MIN_PIN); #ifdef ENDSTOPPULLUP_YMIN WRITE(Y_MIN_PIN,HIGH); #endif #endif - + #if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 - SET_INPUT(Z_MIN_PIN); + SET_INPUT(Z_MIN_PIN); #ifdef ENDSTOPPULLUP_ZMIN WRITE(Z_MIN_PIN,HIGH); #endif #endif - + #if defined(X_MAX_PIN) && X_MAX_PIN > -1 - SET_INPUT(X_MAX_PIN); + SET_INPUT(X_MAX_PIN); #ifdef ENDSTOPPULLUP_XMAX WRITE(X_MAX_PIN,HIGH); #endif #endif - + #if defined(Y_MAX_PIN) && Y_MAX_PIN > -1 - SET_INPUT(Y_MAX_PIN); + SET_INPUT(Y_MAX_PIN); #ifdef ENDSTOPPULLUP_YMAX WRITE(Y_MAX_PIN,HIGH); #endif #endif - + #if defined(Z_MAX_PIN) && Z_MAX_PIN > -1 - SET_INPUT(Z_MAX_PIN); + SET_INPUT(Z_MAX_PIN); #ifdef ENDSTOPPULLUP_ZMAX WRITE(Z_MAX_PIN,HIGH); #endif #endif - + //Initialize Step Pins - #if defined(X_STEP_PIN) && (X_STEP_PIN > -1) + #if defined(X_STEP_PIN) && (X_STEP_PIN > -1) SET_OUTPUT(X_STEP_PIN); WRITE(X_STEP_PIN,INVERT_X_STEP_PIN); disable_x(); - #endif - #if defined(X2_STEP_PIN) && (X2_STEP_PIN > -1) + #endif + #if defined(X2_STEP_PIN) && (X2_STEP_PIN > -1) SET_OUTPUT(X2_STEP_PIN); WRITE(X2_STEP_PIN,INVERT_X_STEP_PIN); disable_x(); - #endif - #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1) + #endif + #if defined(Y_STEP_PIN) && (Y_STEP_PIN > -1) SET_OUTPUT(Y_STEP_PIN); WRITE(Y_STEP_PIN,INVERT_Y_STEP_PIN); disable_y(); - #endif - #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1) + #endif + #if defined(Z_STEP_PIN) && (Z_STEP_PIN > -1) SET_OUTPUT(Z_STEP_PIN); WRITE(Z_STEP_PIN,INVERT_Z_STEP_PIN); #if defined(Z_DUAL_STEPPER_DRIVERS) && defined(Z2_STEP_PIN) && (Z2_STEP_PIN > -1) @@ -845,33 +845,33 @@ void st_init() WRITE(Z2_STEP_PIN,INVERT_Z_STEP_PIN); #endif disable_z(); - #endif - #if defined(E0_STEP_PIN) && (E0_STEP_PIN > -1) + #endif + #if defined(E0_STEP_PIN) && (E0_STEP_PIN > -1) SET_OUTPUT(E0_STEP_PIN); WRITE(E0_STEP_PIN,INVERT_E_STEP_PIN); disable_e0(); - #endif - #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1) + #endif + #if defined(E1_STEP_PIN) && (E1_STEP_PIN > -1) SET_OUTPUT(E1_STEP_PIN); WRITE(E1_STEP_PIN,INVERT_E_STEP_PIN); disable_e1(); - #endif - #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1) + #endif + #if defined(E2_STEP_PIN) && (E2_STEP_PIN > -1) SET_OUTPUT(E2_STEP_PIN); WRITE(E2_STEP_PIN,INVERT_E_STEP_PIN); disable_e2(); - #endif + #endif // waveform generation = 0100 = CTC TCCR1B &= ~(1< -1 const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT; - - SPI.begin(); - pinMode(DIGIPOTSS_PIN, OUTPUT); - for(int i=0;i<=4;i++) + + SPI.begin(); + pinMode(DIGIPOTSS_PIN, OUTPUT); + for(int i=0;i<=4;i++) //digitalPotWrite(digipot_ch[i], digipot_motor_current[i]); digipot_current(i,digipot_motor_current[i]); #endif From c0c4c97db6fe92b61f0a169a9c96c0025cc4af07 Mon Sep 17 00:00:00 2001 From: Guillaume Seguin Date: Thu, 1 Aug 2013 19:20:27 +0200 Subject: [PATCH 12/12] Detect OS in Makefile to use the correct avrdude.conf path --- Marlin/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index 5cc25ea01..59ec4d4f7 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -312,7 +312,12 @@ LDFLAGS = -lm # Programming support using avrdude. Settings and variables. AVRDUDE_PORT = $(UPLOAD_PORT) 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) \ -b $(UPLOAD_RATE)