Merge remote-tracking branch 'upstream/Marlin_v1' into Marlin_v1
This commit is contained in:
@ -49,7 +49,11 @@
|
||||
#define MOTHERBOARD 7
|
||||
#endif
|
||||
|
||||
//// The following define selects which power supply you have. Please choose the one that matches your setup
|
||||
// 1 = ATX
|
||||
// 2 = X-Box 360 203Watts (the blue wire connected to PS_ON and the red wire to VCC)
|
||||
|
||||
#define POWER_SUPPLY 1
|
||||
|
||||
//===========================================================================
|
||||
//=============================Thermal Settings ============================
|
||||
@ -112,7 +116,7 @@
|
||||
// PID settings:
|
||||
// Comment the following line to disable PID and enable bang-bang.
|
||||
#define PIDTEMP
|
||||
#define PID_MAX 255 // limits current to nozzle; 255=full current
|
||||
#define PID_MAX 256 // limits current to nozzle; 256=full current
|
||||
#ifdef PIDTEMP
|
||||
//#define PID_DEBUG // Sends debug data to the serial port.
|
||||
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
|
||||
@ -155,9 +159,9 @@
|
||||
|
||||
// This sets the max power delived to the bed, and replaces the HEATER_BED_DUTY_CYCLE_DIVIDER option.
|
||||
// all forms of bed control obey this (PID, bang-bang, bang-bang with hysteresis)
|
||||
// setting this to anything other than 255 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
||||
// setting this to anything other than 256 enables a form of PWM to the bed just like HEATER_BED_DUTY_CYCLE_DIVIDER did,
|
||||
// so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED)
|
||||
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current
|
||||
#define MAX_BED_POWER 256 // limits duty cycle to bed; 256=full current
|
||||
|
||||
#ifdef PIDTEMPBED
|
||||
//120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
|
||||
@ -309,13 +313,16 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
|
||||
//#define ULTIMAKERCONTROLLER //as available from the ultimaker online store.
|
||||
//#define ULTIPANEL //the ultipanel as on thingiverse
|
||||
|
||||
// The RepRapDiscount Smart Controller
|
||||
// The RepRapDiscount Smart Controller (white PCB)
|
||||
// http://reprap.org/wiki/RepRapDiscount_Smart_Controller
|
||||
//#define REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
|
||||
|
||||
// The GADGETS3D G3D LCD/SD Controller (blue PCB)
|
||||
// http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
|
||||
//#define G3D_PANEL
|
||||
|
||||
//automatic expansion
|
||||
#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||
#if defined(ULTIMAKERCONTROLLER) || defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
|
||||
#define ULTIPANEL
|
||||
#define NEWPANEL
|
||||
#endif
|
||||
|
@ -15,7 +15,7 @@
|
||||
// If the temperature has not increased at the end of that period, the target temperature is set to zero.
|
||||
// It can be reset with another M104/M109. This check is also only triggered if the target temperature and the current temperature
|
||||
// differ by at least 2x WATCH_TEMP_INCREASE
|
||||
//#define WATCH_TEMP_PERIOD 20000 //20 seconds
|
||||
//#define WATCH_TEMP_PERIOD 40000 //40 seconds
|
||||
//#define WATCH_TEMP_INCREASE 10 //Heat up at least 10 degree in 20 seconds
|
||||
|
||||
// Wait for Cooldown
|
||||
@ -66,6 +66,11 @@
|
||||
//#define CONTROLLERFAN_PIN 23 //Pin used for the fan to cool controller, comment out to disable this function
|
||||
#define CONTROLLERFAN_SEC 60 //How many seconds, after all motors were disabled, the fan should run
|
||||
|
||||
// When first starting the main fan, run it at full speed for the
|
||||
// given number of milliseconds. This gets the fan spinning reliably
|
||||
// before setting a PWM value. (Does not work with software PWM for fan on Sanguinololu)
|
||||
//#define FAN_KICKSTART_TIME 100
|
||||
|
||||
//===========================================================================
|
||||
//=============================Mechanical Settings===========================
|
||||
//===========================================================================
|
||||
@ -193,7 +198,6 @@
|
||||
//=============================Additional Features===========================
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#define SD_FINISHED_STEPPERRELEASE true //if sd support and the file is finished: disable steppers?
|
||||
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
|
||||
|
||||
@ -206,6 +210,9 @@
|
||||
// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
|
||||
//#define WATCHDOG_RESET_MANUAL
|
||||
#endif
|
||||
|
||||
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
|
||||
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
|
||||
// extruder advance constant (s2/mm3)
|
||||
//
|
||||
@ -241,6 +248,23 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#ifdef ULTIPANEL
|
||||
#undef SDCARDDETECTINVERTED
|
||||
#endif
|
||||
|
||||
// Power Signal Control Definitions
|
||||
// By default use ATX definition
|
||||
#ifndef POWER_SUPPLY
|
||||
#define POWER_SUPPLY 1
|
||||
#endif
|
||||
// 1 = ATX
|
||||
#if (POWER_SUPPLY == 1)
|
||||
#define PS_ON_AWAKE LOW
|
||||
#define PS_ON_ASLEEP HIGH
|
||||
#endif
|
||||
// 2 = X-Box 360 203W
|
||||
#if (POWER_SUPPLY == 2)
|
||||
#define PS_ON_AWAKE HIGH
|
||||
#define PS_ON_ASLEEP LOW
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//=============================Buffers ============================
|
||||
//===========================================================================
|
||||
@ -252,7 +276,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
|
||||
#else
|
||||
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//The ASCII buffer for recieving from the serial:
|
||||
#define MAX_CMD_SIZE 96
|
||||
|
@ -171,15 +171,15 @@ F_CPU ?= 16000000
|
||||
# that derives from that, and their source are present in
|
||||
# the main Marlin source directory
|
||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||
HARDWARE_SRC = $(ARDUINO_INSTALL_DIR)/hardware/arduino/cores/arduino
|
||||
HARDWARE_DIR = $(ARDUINO_INSTALL_DIR)/hardware
|
||||
else
|
||||
ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)
|
||||
HARDWARE_SRC = ../ArduinoAddons/Arduino_1.x.x/$(HARDWARE_VARIANT)/cores/arduino
|
||||
HARDWARE_DIR = ../ArduinoAddons/Arduino_1.x.x
|
||||
else
|
||||
HARDWARE_SRC = ../ArduinoAddons/Arduino_0.xx/$(HARDWARE_VARIANT)/cores/arduino
|
||||
HARDWARE_DIR = ../ArduinoAddons/Arduino_0.xx
|
||||
endif
|
||||
endif
|
||||
|
||||
HARDWARE_SRC = $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/cores/arduino
|
||||
|
||||
TARGET = $(notdir $(CURDIR))
|
||||
|
||||
@ -190,11 +190,19 @@ TARGET = $(notdir $(CURDIR))
|
||||
VPATH = .
|
||||
VPATH += $(BUILD_DIR)
|
||||
VPATH += $(HARDWARE_SRC)
|
||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
|
||||
else
|
||||
VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal
|
||||
VPATH += $(HARDWARE_DIR)/libraries/SPI
|
||||
endif
|
||||
ifeq ($(HARDWARE_VARIANT), arduino)
|
||||
HARDWARE_SUB_VARIANT ?= mega
|
||||
VPATH += $(ARDUINO_INSTALL_DIR)/hardware/arduino/variants/$(HARDWARE_SUB_VARIANT)
|
||||
else
|
||||
HARDWARE_SUB_VARIANT ?= standard
|
||||
VPATH += $(HARDWARE_DIR)/$(HARDWARE_VARIANT)/variants/$(HARDWARE_SUB_VARIANT)
|
||||
endif
|
||||
SRC = wiring.c \
|
||||
wiring_analog.c wiring_digital.c \
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define HardwareSerial_h // trick to disable the standard HWserial
|
||||
#endif
|
||||
|
||||
#if (ARDUINO >= 100) && !defined(__AVR_ATmega644P__)
|
||||
#if (ARDUINO >= 100)
|
||||
# include "Arduino.h"
|
||||
#else
|
||||
# include "WProgram.h"
|
||||
|
@ -124,7 +124,8 @@
|
||||
// M500 - stores paramters in EEPROM
|
||||
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
|
||||
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
|
||||
// M503 - print the current settings (from memory not from eeprom)
|
||||
// M503 - print the current settings (from memory not from eeprom)
|
||||
// M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
|
||||
// M907 - Set digital trimpot motor current using axis codes.
|
||||
// M908 - Control digital trimpot directly.
|
||||
// M350 - Set microstepping mode.
|
||||
@ -294,6 +295,10 @@ void setup_powerhold()
|
||||
WRITE(SUICIDE_PIN, HIGH);
|
||||
#endif
|
||||
#endif
|
||||
#if (PS_ON_PIN > -1)
|
||||
SET_OUTPUT(PS_ON_PIN);
|
||||
WRITE(PS_ON_PIN, PS_ON_AWAKE);
|
||||
#endif
|
||||
}
|
||||
|
||||
void suicide()
|
||||
@ -1136,7 +1141,7 @@ void process_commands()
|
||||
#if (PS_ON_PIN > -1)
|
||||
case 80: // M80 - ATX Power On
|
||||
SET_OUTPUT(PS_ON_PIN); //GND
|
||||
WRITE(PS_ON_PIN, LOW);
|
||||
WRITE(PS_ON_PIN, PS_ON_AWAKE);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@ -1147,7 +1152,7 @@ void process_commands()
|
||||
suicide();
|
||||
#elif (PS_ON_PIN > -1)
|
||||
SET_OUTPUT(PS_ON_PIN);
|
||||
WRITE(PS_ON_PIN, HIGH);
|
||||
WRITE(PS_ON_PIN, PS_ON_ASLEEP);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@ -1493,7 +1498,14 @@ void process_commands()
|
||||
{
|
||||
Config_PrintSettings();
|
||||
}
|
||||
break;
|
||||
break;
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
case 540:
|
||||
{
|
||||
if(code_seen('S')) abort_on_endstop_hit = code_value() > 0;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 907: // M907 Set digital trimpot motor current using axis codes.
|
||||
{
|
||||
#if DIGIPOTSS_PIN > -1
|
||||
|
@ -15,6 +15,7 @@
|
||||
// 6 Russian
|
||||
// 7 Italian
|
||||
// 8 Portuguese
|
||||
// 9 Finnish
|
||||
|
||||
#ifndef LANGUAGE_CHOICE
|
||||
#define LANGUAGE_CHOICE 1 // Pick your language from the list above
|
||||
@ -1282,4 +1283,158 @@
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if LANGUAGE_CHOICE == 9
|
||||
|
||||
// Finnish
|
||||
|
||||
// LCD Menu Messages
|
||||
#define WELCOME_MSG MACHINE_NAME " valmis"
|
||||
#define MSG_SD_INSERTED "Kortti asetettu"
|
||||
#define MSG_SD_REMOVED "Kortti poistettu"
|
||||
#define MSG_MAIN "Palaa"
|
||||
#define MSG_AUTOSTART "Automaatti"
|
||||
#define MSG_DISABLE_STEPPERS "Vapauta moottorit"
|
||||
#define MSG_AUTO_HOME "Aja referenssiin"
|
||||
#define MSG_SET_ORIGIN "Aseta origo"
|
||||
#define MSG_PREHEAT_PLA "Esilammita PLA"
|
||||
#define MSG_PREHEAT_PLA_SETTINGS "Esilammita PLA konf"
|
||||
#define MSG_PREHEAT_ABS "Esilammita ABS"
|
||||
#define MSG_PREHEAT_ABS_SETTINGS "Esilammita ABS konf"
|
||||
#define MSG_COOLDOWN "Jaahdyta"
|
||||
#define MSG_EXTRUDE "Pursota"
|
||||
#define MSG_RETRACT "Veda takaisin"
|
||||
#define MSG_MOVE_AXIS "Liikuta akseleita"
|
||||
#define MSG_SPEED "Nopeus"
|
||||
#define MSG_NOZZLE "Suutin"
|
||||
#define MSG_NOZZLE1 "Suutin2"
|
||||
#define MSG_NOZZLE2 "Suutin3"
|
||||
#define MSG_BED "Alusta"
|
||||
#define MSG_FAN_SPEED "Tuul. nopeus"
|
||||
#define MSG_FLOW "Virtaus"
|
||||
#define MSG_CONTROL "Kontrolli"
|
||||
#define MSG_MIN " \002 Min"
|
||||
#define MSG_MAX " \002 Max"
|
||||
#define MSG_FACTOR " \002 Kerr"
|
||||
#define MSG_AUTOTEMP "Autotemp"
|
||||
#define MSG_ON "On "
|
||||
#define MSG_OFF "Off"
|
||||
#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 "Kiihtyv"
|
||||
#define MSG_VXY_JERK "Vxy-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 "VLiike min"
|
||||
#define MSG_AMAX "Amax "
|
||||
#define MSG_A_RETRACT "A-peruuta"
|
||||
#define MSG_XSTEPS "Xsteps/mm"
|
||||
#define MSG_YSTEPS "Ysteps/mm"
|
||||
#define MSG_ZSTEPS "Zsteps/mm"
|
||||
#define MSG_ESTEPS "Esteps/mm"
|
||||
#define MSG_RECTRACT "Veda takaisin"
|
||||
#define MSG_TEMPERATURE "Lampotila"
|
||||
#define MSG_MOTION "Liike"
|
||||
#define MSG_STORE_EPROM "Tallenna muistiin"
|
||||
#define MSG_LOAD_EPROM "Lataa muistista"
|
||||
#define MSG_RESTORE_FAILSAFE "Palauta oletus"
|
||||
#define MSG_REFRESH "Paivita"
|
||||
#define MSG_WATCH "Seuraa"
|
||||
#define MSG_PREPARE "Valmistele"
|
||||
#define MSG_TUNE "Saada"
|
||||
#define MSG_PAUSE_PRINT "Keskeyta tulostus"
|
||||
#define MSG_RESUME_PRINT "Jatka tulostusta"
|
||||
#define MSG_STOP_PRINT "Pysayta tulostus"
|
||||
#define MSG_CARD_MENU "Korttivalikko"
|
||||
#define MSG_NO_CARD "Ei korttia"
|
||||
#define MSG_DWELL "Nukkumassa..."
|
||||
#define MSG_USERWAIT "Odotetaan valintaa..."
|
||||
#define MSG_RESUMING "Jatketaan tulostusta"
|
||||
#define MSG_NO_MOVE "Ei liiketta."
|
||||
#define MSG_KILLED "KILLED. "
|
||||
#define MSG_STOPPED "STOPPED. "
|
||||
#define MSG_CONTROL_RETRACT "Veda mm"
|
||||
#define MSG_CONTROL_RETRACTF "Veda F"
|
||||
#define MSG_CONTROL_RETRACT_ZLIFT "Z mm"
|
||||
#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
|
||||
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet F"
|
||||
#define MSG_AUTORETRACT "AutoVeto."
|
||||
|
||||
// Serial Console Messages
|
||||
|
||||
#define MSG_Enqueing "jonoon \""
|
||||
#define MSG_POWERUP "Kaynnistys"
|
||||
#define MSG_EXTERNAL_RESET " Ulkoinen Reset"
|
||||
#define MSG_BROWNOUT_RESET " Alajannite Reset"
|
||||
#define MSG_WATCHDOG_RESET " Vahtikoira Reset"
|
||||
#define MSG_SOFTWARE_RESET " Ohjelmisto Reset"
|
||||
#define MSG_MARLIN "Marlin "
|
||||
#define MSG_AUTHOR " | Author: "
|
||||
#define MSG_CONFIGURATION_VER " Paivitetty viimeksi: "
|
||||
#define MSG_FREE_MEMORY " Vapaata muistia: "
|
||||
#define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: "
|
||||
#define MSG_OK "ok"
|
||||
#define MSG_FILE_SAVED "Tiedosto tallennettu."
|
||||
#define MSG_ERR_LINE_NO "Rivinumero ei ole Viimeisin rivi+1, Viimeisin rivi: "
|
||||
#define MSG_ERR_CHECKSUM_MISMATCH "Tarkistesummassa virhe, Viimeisin rivi: "
|
||||
#define MSG_ERR_NO_CHECKSUM "Rivilla ei tarkistesummaa, Viimeisin rivi: "
|
||||
#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Ei rivinumeroa tarkistesumman kanssa, Viimeisin rivi: "
|
||||
#define MSG_FILE_PRINTED "Tiedoston tulostus valmis"
|
||||
#define MSG_BEGIN_FILE_LIST "Tiedostolistauksen alku"
|
||||
#define MSG_END_FILE_LIST "Tiedostolistauksen loppu"
|
||||
#define MSG_M104_INVALID_EXTRUDER "M104 Virheellinen suutin "
|
||||
#define MSG_M105_INVALID_EXTRUDER "M105 Virheellinen suutin "
|
||||
#define MSG_ERR_NO_THERMISTORS "Ei termistoreja - ei lampotiloja"
|
||||
#define MSG_M109_INVALID_EXTRUDER "M109 Virheellinen suutin "
|
||||
#define MSG_HEATING "Lammitan..."
|
||||
#define MSG_HEATING_COMPLETE "Lammitys valmis."
|
||||
#define MSG_BED_HEATING "Alusta lampiaa."
|
||||
#define MSG_BED_DONE "Alusta valmis."
|
||||
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
|
||||
#define MSG_COUNT_X " Laskuri X: "
|
||||
#define MSG_ERR_KILLED "Tulostin pysaytetty. kill():ia kutsuttu!"
|
||||
#define MSG_ERR_STOPPED "Tulostin pysaytetty virheiden vuoksi. Korjaa virheet ja kayta M999 kaynnistaaksesi uudelleen. (Lampotila nollattiin. Aseta lampotila sen jalkeen kun jatkat.)"
|
||||
#define MSG_RESEND "Uudelleenlahetys: "
|
||||
#define MSG_UNKNOWN_COMMAND "Tuntematon komento: \""
|
||||
#define MSG_ACTIVE_EXTRUDER "Aktiivinen suutin: "
|
||||
#define MSG_INVALID_EXTRUDER "Virheellinen suutin"
|
||||
#define MSG_X_MIN "x_min: "
|
||||
#define MSG_X_MAX "x_max: "
|
||||
#define MSG_Y_MIN "y_min: "
|
||||
#define MSG_Y_MAX "y_max: "
|
||||
#define MSG_Z_MIN "z_min: "
|
||||
#define MSG_Z_MAX "z_max: "
|
||||
#define MSG_M119_REPORT "Rajakytkimien tilaraportti"
|
||||
#define MSG_ENDSTOP_HIT "AKTIIVISENA"
|
||||
#define MSG_ENDSTOP_OPEN "avoinna"
|
||||
|
||||
#define MSG_SD_CANT_OPEN_SUBDIR "Alihakemistoa ei voitu avata"
|
||||
#define MSG_SD_INIT_FAIL "SD alustus epaonnistui"
|
||||
#define MSG_SD_VOL_INIT_FAIL "volume.init epaonnistui"
|
||||
#define MSG_SD_OPENROOT_FAIL "openRoot epaonnistui"
|
||||
#define MSG_SD_CARD_OK "SD kortti ok"
|
||||
#define MSG_SD_WORKDIR_FAIL "workDir open epaonnistui"
|
||||
#define MSG_SD_OPEN_FILE_FAIL "avaus epaonnistui, Tiedosto: "
|
||||
#define MSG_SD_FILE_OPENED "Tiedosto avattu: "
|
||||
#define MSG_SD_SIZE " Koko: "
|
||||
#define MSG_SD_FILE_SELECTED "Tiedosto valittu"
|
||||
#define MSG_SD_WRITE_TO_FILE "Kirjoitetaan tiedostoon: "
|
||||
#define MSG_SD_PRINTING_BYTE "SD tulostus byte "
|
||||
#define MSG_SD_NOT_PRINTING "Ei SD tulostus"
|
||||
#define MSG_SD_ERR_WRITE_TO_FILE "virhe kirjoitettaessa tiedostoon"
|
||||
#define MSG_SD_CANT_ENTER_SUBDIR "Alihakemistoon ei voitu siirtya: "
|
||||
|
||||
#define MSG_STEPPER_TO_HIGH "Askellustaajuus liian suuri: "
|
||||
#define MSG_ENDSTOPS_HIT "paatyrajat aktivoitu: "
|
||||
#define MSG_ERR_COLD_EXTRUDE_STOP " kylmana pursotus estetty"
|
||||
#define MSG_ERR_LONG_EXTRUDE_STOP " liian pitka pursotus estetty"
|
||||
|
||||
#endif
|
||||
#endif // ifndef LANGUAGE_H
|
||||
|
@ -362,7 +362,7 @@
|
||||
#endif
|
||||
#define PS_ON_PIN 12
|
||||
|
||||
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
|
||||
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
|
||||
#define KILL_PIN 41
|
||||
#else
|
||||
#define KILL_PIN -1
|
||||
@ -418,7 +418,11 @@
|
||||
#define BTN_EN2 35
|
||||
#define BTN_ENC 31 //the click
|
||||
|
||||
#define SDCARDDETECT -1 // Ramps does not use this port
|
||||
#ifdef G3D_PANEL
|
||||
#define SDCARDDETECT 49
|
||||
#else
|
||||
#define SDCARDDETECT -1 // Ramps does not use this port
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else //old style panel with shift register
|
||||
@ -719,6 +723,39 @@
|
||||
#define SDSS 24
|
||||
#endif
|
||||
|
||||
#ifdef ULTRA_LCD
|
||||
#ifdef NEWPANEL
|
||||
//we have no buzzer installed
|
||||
#define BEEPER -1
|
||||
//LCD Pins
|
||||
#define LCD_PINS_RS 4
|
||||
#define LCD_PINS_ENABLE 17
|
||||
#define LCD_PINS_D4 30
|
||||
#define LCD_PINS_D5 29
|
||||
#define LCD_PINS_D6 28
|
||||
#define LCD_PINS_D7 27
|
||||
|
||||
//The encoder and click button
|
||||
#define BTN_EN1 11 //must be a hardware interrupt pin
|
||||
#define BTN_EN2 10 //must be hardware interrupt pin
|
||||
#define BTN_ENC 16 //the switch
|
||||
//not connected to a pin
|
||||
#define SDCARDDETECT -1
|
||||
|
||||
//from the same bit in the RAMPS Newpanel define
|
||||
//encoder rotation values
|
||||
#define encrot0 0
|
||||
#define encrot1 2
|
||||
#define encrot2 3
|
||||
#define encrot3 1
|
||||
|
||||
#define BLEN_C 2
|
||||
#define BLEN_B 1
|
||||
#define BLEN_A 0
|
||||
|
||||
#endif //Newpanel
|
||||
#endif //Ultipanel
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -438,8 +438,7 @@ void check_axes_activity()
|
||||
unsigned char y_active = 0;
|
||||
unsigned char z_active = 0;
|
||||
unsigned char e_active = 0;
|
||||
unsigned char fan_speed = 0;
|
||||
unsigned char tail_fan_speed = 0;
|
||||
unsigned char tail_fan_speed = fanSpeed;
|
||||
block_t *block;
|
||||
|
||||
if(block_buffer_tail != block_buffer_head)
|
||||
@ -453,20 +452,9 @@ void check_axes_activity()
|
||||
if(block->steps_y != 0) y_active++;
|
||||
if(block->steps_z != 0) z_active++;
|
||||
if(block->steps_e != 0) e_active++;
|
||||
if(block->fan_speed != 0) fan_speed++;
|
||||
block_index = (block_index+1) & (BLOCK_BUFFER_SIZE - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if FAN_PIN > -1
|
||||
#ifndef FAN_SOFT_PWM
|
||||
if (fanSpeed != 0){
|
||||
analogWrite(FAN_PIN,fanSpeed); // If buffer is empty use current fan speed
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
if((DISABLE_X) && (x_active == 0)) disable_x();
|
||||
if((DISABLE_Y) && (y_active == 0)) disable_y();
|
||||
if((DISABLE_Z) && (z_active == 0)) disable_z();
|
||||
@ -478,17 +466,23 @@ void check_axes_activity()
|
||||
}
|
||||
#if FAN_PIN > -1
|
||||
#ifndef FAN_SOFT_PWM
|
||||
if((fanSpeed == 0) && (fan_speed ==0))
|
||||
{
|
||||
analogWrite(FAN_PIN, 0);
|
||||
}
|
||||
|
||||
if (fanSpeed != 0 && tail_fan_speed !=0)
|
||||
{
|
||||
#ifdef FAN_KICKSTART_TIME
|
||||
static unsigned long fan_kick_end;
|
||||
if (tail_fan_speed) {
|
||||
if (fan_kick_end == 0) {
|
||||
// Just starting up fan - run at full power.
|
||||
fan_kick_end = millis() + FAN_KICKSTART_TIME;
|
||||
tail_fan_speed = 255;
|
||||
} else if (fan_kick_end > millis())
|
||||
// Fan still spinning up.
|
||||
tail_fan_speed = 255;
|
||||
} else {
|
||||
fan_kick_end = 0;
|
||||
}
|
||||
#endif//FAN_KICKSTART_TIME
|
||||
analogWrite(FAN_PIN,tail_fan_speed);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif//!FAN_SOFT_PWM
|
||||
#endif//FAN_PIN > -1
|
||||
#ifdef AUTOTEMP
|
||||
getHighESpeed();
|
||||
#endif
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "temperature.h"
|
||||
#include "ultralcd.h"
|
||||
#include "language.h"
|
||||
#include "cardreader.h"
|
||||
#include "speed_lookuptable.h"
|
||||
#if DIGIPOTSS_PIN > -1
|
||||
#include <SPI.h>
|
||||
@ -67,6 +68,9 @@ volatile long endstops_stepsTotal,endstops_stepsDone;
|
||||
static volatile bool endstop_x_hit=false;
|
||||
static volatile bool endstop_y_hit=false;
|
||||
static volatile bool endstop_z_hit=false;
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
bool abort_on_endstop_hit = false;
|
||||
#endif
|
||||
|
||||
static bool old_x_min_endstop=false;
|
||||
static bool old_x_max_endstop=false;
|
||||
@ -169,17 +173,31 @@ void checkHitEndstops()
|
||||
SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
|
||||
if(endstop_x_hit) {
|
||||
SERIAL_ECHOPAIR(" X:",(float)endstops_trigsteps[X_AXIS]/axis_steps_per_unit[X_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "X");
|
||||
}
|
||||
if(endstop_y_hit) {
|
||||
SERIAL_ECHOPAIR(" Y:",(float)endstops_trigsteps[Y_AXIS]/axis_steps_per_unit[Y_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Y");
|
||||
}
|
||||
if(endstop_z_hit) {
|
||||
SERIAL_ECHOPAIR(" Z:",(float)endstops_trigsteps[Z_AXIS]/axis_steps_per_unit[Z_AXIS]);
|
||||
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT "Z");
|
||||
}
|
||||
SERIAL_ECHOLN("");
|
||||
SERIAL_ECHOLN("");
|
||||
endstop_x_hit=false;
|
||||
endstop_y_hit=false;
|
||||
endstop_z_hit=false;
|
||||
endstop_z_hit=false;
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
if (abort_on_endstop_hit)
|
||||
{
|
||||
card.sdprinting = false;
|
||||
card.closefile();
|
||||
quickStop();
|
||||
setTargetHotend0(0);
|
||||
setTargetHotend1(0);
|
||||
setTargetHotend2(0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,9 @@
|
||||
#define REV_E_DIR() WRITE(E0_DIR_PIN, INVERT_E0_DIR)
|
||||
#endif
|
||||
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
extern bool abort_on_endstop_hit;
|
||||
#endif
|
||||
|
||||
// Initialize and start the stepper motor subsystem
|
||||
void st_init();
|
||||
|
@ -221,10 +221,7 @@ void lcd_preheat_pla()
|
||||
setTargetHotend1(plaPreheatHotendTemp);
|
||||
setTargetHotend2(plaPreheatHotendTemp);
|
||||
setTargetBed(plaPreheatHPBTemp);
|
||||
#if FAN_PIN > -1
|
||||
fanSpeed = plaPreheatFanSpeed;
|
||||
analogWrite(FAN_PIN, fanSpeed);
|
||||
#endif
|
||||
lcd_return_to_status();
|
||||
}
|
||||
|
||||
@ -234,10 +231,7 @@ void lcd_preheat_abs()
|
||||
setTargetHotend1(absPreheatHotendTemp);
|
||||
setTargetHotend2(absPreheatHotendTemp);
|
||||
setTargetBed(absPreheatHPBTemp);
|
||||
#if FAN_PIN > -1
|
||||
fanSpeed = absPreheatFanSpeed;
|
||||
analogWrite(FAN_PIN, fanSpeed);
|
||||
#endif
|
||||
lcd_return_to_status();
|
||||
}
|
||||
|
||||
@ -518,6 +512,9 @@ static void lcd_control_motion_menu()
|
||||
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
|
||||
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
|
||||
MENU_ITEM_EDIT(float51, MSG_ESTEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);
|
||||
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
||||
MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
|
||||
#endif
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
@ -888,14 +885,18 @@ char *ftostr31(const float &x)
|
||||
|
||||
char *ftostr32(const float &x)
|
||||
{
|
||||
long xx=x*100;
|
||||
conv[0]=(xx>=0)?'+':'-';
|
||||
long xx=x*100;
|
||||
if (xx >= 0)
|
||||
conv[0]=(xx/10000)%10+'0';
|
||||
else
|
||||
conv[0]='-';
|
||||
xx=abs(xx);
|
||||
conv[1]=(xx/100)%10+'0';
|
||||
conv[2]='.';
|
||||
conv[3]=(xx/10)%10+'0';
|
||||
conv[4]=(xx)%10+'0';
|
||||
conv[5]=0;
|
||||
conv[1]=(xx/1000)%10+'0';
|
||||
conv[2]=(xx/100)%10+'0';
|
||||
conv[3]='.';
|
||||
conv[4]=(xx/10)%10+'0';
|
||||
conv[5]=(xx)%10+'0';
|
||||
conv[6]=0;
|
||||
return conv;
|
||||
}
|
||||
|
||||
|
@ -256,9 +256,9 @@ static void lcd_implementation_status_screen()
|
||||
lcd.print(ftostr3(current_position[Y_AXIS]));
|
||||
# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
|
||||
# endif//LCD_WIDTH > 19
|
||||
lcd.setCursor(LCD_WIDTH - 7, 1);
|
||||
lcd.setCursor(LCD_WIDTH - 8, 1);
|
||||
lcd.print('Z');
|
||||
lcd.print(ftostr31(current_position[Z_AXIS]));
|
||||
lcd.print(ftostr32(current_position[Z_AXIS]));
|
||||
#endif//LCD_HEIGHT > 2
|
||||
|
||||
#if LCD_HEIGHT > 3
|
||||
|
Reference in New Issue
Block a user