Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pins.h & ui.h: Improve support for UltiMaker - SD Detect and LCD #430

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eebaf03
Fixed CoreXY for Arduino Due
repetier Jul 8, 2014
4f8a7c8
RADDS display, GLCD display fix
repetier Jul 28, 2014
3999279
Fit to use extruder motor pins E3-5 in config tool
repetier Jul 30, 2014
af1c0b5
Fixed PID auto tune bug, ditto printing with up to 4 extruder
repetier Aug 9, 2014
8f0ce0c
French translation by Doudou
repetier Aug 10, 2014
0d60ecb
Fixed TEMP_X pin definition for azteeg x3 pro
repetier Aug 11, 2014
6895137
Fixed M401/M402 memory position bug
repetier Aug 16, 2014
ba42357
Improved pause handling, Rumba fan 2 fix, virtual eeprom for due
repetier Aug 20, 2014
0137c4d
Fixed pins for due causing eeprom problems
repetier Aug 21, 2014
7b08d27
Fixed delta ui menu, due hangs fixed, RAMPS-FD V2
repetier Aug 24, 2014
1b5dc10
czech translation - UI_LANGUAGE=8
majklovec Aug 27, 2014
31e4d62
avr - czech translation - UI_LANGUAGE=8
majklovec Aug 27, 2014
96a01ec
Merge pull request #309 from majklovec/master
repetier Aug 27, 2014
d03331c
french Correction
Aug 28, 2014
2503ed7
Merge pull request #310 from Doudou14/patch-4
repetier Aug 31, 2014
8d20015
New languages french and Czech
repetier Aug 31, 2014
3bc3cff
Fixed echo command call
repetier Oct 4, 2014
bbac01a
Fixed due hang, but due users should still use 0.92 with watchdog sup…
repetier Oct 11, 2014
cb53d0c
Fix compile error with SOFTWARE_LEVELING
repetier Oct 18, 2014
8824cff
Simplified the bulding of the transformation matrix for autoleveling.…
Jantek Mar 5, 2015
8d985a5
Merge pull request #372 from Jantek/master
repetier Mar 5, 2015
dd9155d
Update README.md
mkile Jul 13, 2015
6f8b0f4
Merge pull request #412 from mkile/patch-1
repetier Jul 13, 2015
c52fb92
pins.h & ui.h: Improve support for UltiMaker - SD Detect and LCD
ezrec Oct 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Also you can control the firmware with any reprap compatible host, you will only
the full benefits with the following products, which have special code for this
firmware:

* [Repetier-Host for Windos/Linux](http://www.repetier.com/download/)
* [Repetier-Host for Windows/Linux](http://www.repetier.com/download/)
* [Repetier-Host for Mac](http://www.repetier.com/download/)
* [Repetier-Server](http://www.repetier.com/repetier-server-download/)

Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 0.91.8
New languages french and Czech

Version 0.91.7 15-03-2014
Babystepping.
Z-Calib allows Z < 0.
Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoAVR/Repetier/Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ void Commands::executeGCode(GCode *com)
break;
#if FEATURE_DITTO_PRINTING
case 280:
if(com->hasS()) // Set ditto mode S: 0 = off, 1 = on
if(com->hasS()) // Set ditto mode S: 0 = off, 1 = 1 extra extruder, 2 = 2 extra extruder, 3 = 3 extra extruders
{
Extruder::dittoMode = com->S;
}
Expand Down
2 changes: 2 additions & 0 deletions src/ArduinoAVR/Repetier/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,8 @@ Select the language to use.
4 = Italian
5 = Spanish
6 = Swedish
7 = French
8 = Czech
*/
#define UI_LANGUAGE 1

Expand Down
26 changes: 25 additions & 1 deletion src/ArduinoAVR/Repetier/Extruder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,22 @@ void Extruder::setTemperatureForExtruder(float temperatureInCelsius,uint8_t extr
TemperatureController *tc2 = tempController[1];
tc2->setTargetTemperature(temperatureInCelsius);
if(temperatureInCelsius>=EXTRUDER_FAN_COOL_TEMP) extruder[1].coolerPWM = extruder[1].coolerSpeed;
#if NUM_EXTRUDER > 2
if(Extruder::dittoMode > 1 && extr == 0)
{
TemperatureController *tc2 = tempController[2];
tc2->setTargetTemperature(temperatureInCelsius);
if(temperatureInCelsius>=EXTRUDER_FAN_COOL_TEMP) extruder[2].coolerPWM = extruder[2].coolerSpeed;
}
#endif
#if NUM_EXTRUDER > 3
if(Extruder::dittoMode > 2 && extr == 0)
{
TemperatureController *tc2 = tempController[3];
tc2->setTargetTemperature(temperatureInCelsius);
if(temperatureInCelsius>=EXTRUDER_FAN_COOL_TEMP) extruder[3].coolerPWM = extruder[3].coolerSpeed;
}
#endif
}
#endif // FEATURE_DITTO_PRINTING
bool alloff = true;
Expand Down Expand Up @@ -456,6 +472,14 @@ void Extruder::disableCurrentExtruderMotor()
{
if(extruder[1].enablePin > -1)
digitalWrite(extruder[1].enablePin,!extruder[1].enableOn);
#if NUM_EXTRUDER > 2
if(Extruder::dittoMode > 1 && extruder[2].enablePin > -1)
digitalWrite(extruder[2].enablePin,!extruder[2].enableOn);
#endif
#if NUM_EXTRUDER > 3
if(Extruder::dittoMode > 2 && extruder[3].enablePin > -1)
digitalWrite(extruder[3].enablePin,!extruder[3].enableOn);
#endif
}
#endif
}
Expand Down Expand Up @@ -1021,7 +1045,7 @@ void TemperatureController::autotunePID(float temp,uint8_t controllerId,bool sto
Extruder::disableAllHeater();
if(storeValues)
{
pidDGain = Kp;
pidPGain = Kp;
pidIGain = Ki;
pidDGain = Kd;
heatManager = 1;
Expand Down
28 changes: 28 additions & 0 deletions src/ArduinoAVR/Repetier/Extruder.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ class Extruder // Size: 12*1 Byte+12*4 Byte+4*2Byte = 68 Byte
#if FEATURE_DITTO_PRINTING
if(Extruder::dittoMode) {
WRITE(EXT1_STEP_PIN,HIGH);
#if NUM_EXTRUDER > 2
if(Extruder::dittoMode > 1) {
WRITE(EXT2_STEP_PIN,HIGH);
}
#endif
#if NUM_EXTRUDER > 3
if(Extruder::dittoMode > 2) {
WRITE(EXT3_STEP_PIN,HIGH);
}
#endif
}
#endif
#endif
Expand Down Expand Up @@ -163,6 +173,16 @@ class Extruder // Size: 12*1 Byte+12*4 Byte+4*2Byte = 68 Byte
#if FEATURE_DITTO_PRINTING
if(Extruder::dittoMode) {
WRITE(EXT1_STEP_PIN,LOW);
#if NUM_EXTRUDER > 2
if(Extruder::dittoMode > 1) {
WRITE(EXT2_STEP_PIN,LOW);
}
#endif
#if NUM_EXTRUDER > 3
if(Extruder::dittoMode > 2) {
WRITE(EXT3_STEP_PIN,LOW);
}
#endif
}
#endif
#endif
Expand Down Expand Up @@ -278,6 +298,14 @@ class Extruder // Size: 12*1 Byte+12*4 Byte+4*2Byte = 68 Byte
if(Extruder::dittoMode) {
if(extruder[1].enablePin > -1)
digitalWrite(extruder[1].enablePin,extruder[1].enableOn);
#if NUM_EXTRUDER > 2
if(Extruder::dittoMode > 1 && extruder[2].enablePin > -1)
digitalWrite(extruder[2].enablePin,extruder[2].enableOn);
#endif
#if NUM_EXTRUDER > 3
if(Extruder::dittoMode > 2 && extruder[3].enablePin > -1)
digitalWrite(extruder[3].enablePin,extruder[3].enableOn);
#endif
}
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoAVR/Repetier/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ All known arduino boards use 64. This value is needed for the extruder timing. *

#define ANALOG_PRESCALER _BV(ADPS0)|_BV(ADPS1)|_BV(ADPS2)

#if MOTHERBOARD==8 || MOTHERBOARD==9 || CPU_ARCH!=ARCH_AVR
#if MOTHERBOARD==8 || MOTHERBOARD==88 || MOTHERBOARD==9 || CPU_ARCH!=ARCH_AVR
#define EXTERNALSERIAL
#endif
//#define EXTERNALSERIAL // Force using arduino serial
Expand Down
22 changes: 12 additions & 10 deletions src/ArduinoAVR/Repetier/Printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ float Printer::memoryX;
float Printer::memoryY;
float Printer::memoryZ;
float Printer::memoryE;
float Printer::memoryF;
#endif
#ifdef XY_GANTRY
char Printer::motorX;
char Printer::motorY;
int8_t Printer::motorX;
int8_t Printer::motorY;
#endif
#ifdef DEBUG_SEGMENT_LENGTH
float Printer::maxRealSegmentLength = 0;
Expand Down Expand Up @@ -842,18 +843,18 @@ void Printer::MemoryPosition()
updateCurrentPosition(false);
realPosition(memoryX,memoryY,memoryZ);
memoryE = currentPositionSteps[E_AXIS]*axisStepsPerMM[E_AXIS];
memoryF = feedrate;
}

void Printer::GoToMemoryPosition(bool x,bool y,bool z,bool e,float feed)
{
bool all = !(x || y || z);
float oldFeedrate = feedrate;
moveToReal((all || x ? memoryX : IGNORE_COORDINATE)
,(all || y ? memoryY : IGNORE_COORDINATE)
,(all || z ? memoryZ : IGNORE_COORDINATE)
moveToReal((all || x ? (lastCmdPos[X_AXIS] = memoryX) : IGNORE_COORDINATE)
,(all || y ?(lastCmdPos[Y_AXIS] = memoryY) : IGNORE_COORDINATE)
,(all || z ? (lastCmdPos[Z_AXIS] = memoryZ) : IGNORE_COORDINATE)
,(e ? memoryE:IGNORE_COORDINATE),
feed);
feedrate = oldFeedrate;
feedrate = memoryF;
}
#endif

Expand Down Expand Up @@ -1391,10 +1392,11 @@ void Printer::buildTransformationMatrix(float h1,float h2,float h3)
autolevelTransformation[5] = -autolevelTransformation[7];
// cross(y,z)
autolevelTransformation[0] = autolevelTransformation[4]*autolevelTransformation[8]-autolevelTransformation[5]*autolevelTransformation[7];
autolevelTransformation[1] = autolevelTransformation[5]*autolevelTransformation[6]-autolevelTransformation[3]*autolevelTransformation[8];
autolevelTransformation[2] = autolevelTransformation[3]*autolevelTransformation[7]-autolevelTransformation[4]*autolevelTransformation[6];
len = sqrt(autolevelTransformation[0]*autolevelTransformation[0]+autolevelTransformation[2]*autolevelTransformation[2]);
autolevelTransformation[1] = autolevelTransformation[5]*autolevelTransformation[6]/*-autolevelTransformation[3]*autolevelTransformation[8]*/; //autolevelTransformation[3] == 0 !
autolevelTransformation[2] = /*autolevelTransformation[3]*autolevelTransformation[7]*/-autolevelTransformation[4]*autolevelTransformation[6];
len = sqrt(autolevelTransformation[0]*autolevelTransformation[0]+autolevelTransformation[1]*autolevelTransformation[1]+autolevelTransformation[2]*autolevelTransformation[2]); //Shouldn't autolevelTransformation[1] also get normed?!?
autolevelTransformation[0] /= len;
autolevelTransformation[1] /= len;
autolevelTransformation[2] /= len;
len = sqrt(autolevelTransformation[4]*autolevelTransformation[4]+autolevelTransformation[5]*autolevelTransformation[5]);
autolevelTransformation[4] /= len;
Expand Down
5 changes: 3 additions & 2 deletions src/ArduinoAVR/Repetier/Printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ class Printer
static float memoryY;
static float memoryZ;
static float memoryE;
static float memoryF;
#endif
#ifdef XY_GANTRY
static char motorX;
static char motorY;
static int8_t motorX;
static int8_t motorY;
#endif
#ifdef DEBUG_SEGMENT_LENGTH
static float maxRealSegmentLength;
Expand Down
4 changes: 2 additions & 2 deletions src/ArduinoAVR/Repetier/Repetier.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ extern void linear_move(long steps_remaining[]);
#ifndef FEATURE_DITTO_PRINTING
#define FEATURE_DITTO_PRINTING false
#endif
#if FEATURE_DITTO_PRINTING && NUM_EXTRUDER!=2
#error Ditto printing requires exactly 2 extruder.
#if FEATURE_DITTO_PRINTING && (NUM_EXTRUDER > 4 || NUM_EXTRUDER < 2)
#error Ditto printing requires 2 - 4 extruder.
#endif


Expand Down
2 changes: 1 addition & 1 deletion src/ArduinoAVR/Repetier/Repetier.ino
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Custom M Codes
- M232 - Read and reset max. advance values
- M233 X<AdvanceK> Y<AdvanceL> - Set temporary advance K-value to X and linear term advanceL to Y
- M251 Measure Z steps from homing stop (Delta printers). S0 - Reset, S1 - Print, S2 - Store to Z length (also EEPROM if enabled)
- M280 S<mode> - Set ditto printing mode. mode: 0 = off, 1 = on
- M280 S<mode> - Set ditto printing mode. mode: 0 = off, 1 = 2 extruder, 2 = 3 extruder, 3 = 4 extruder printing
- M300 S<Frequency> P<DurationMillis> play frequency
- M303 P<extruder/bed> S<printTemerature> X0 - Autodetect pid values. Use P<NUM_EXTRUDER> for heated bed. X0 saves result in EEPROM.
- M320 - Activate autolevel
Expand Down
8 changes: 4 additions & 4 deletions src/ArduinoAVR/Repetier/SDCard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ void SDCard::pausePrint(bool intern)
Commands::waitUntilEndOfAllBuffers();
Printer::MemoryPosition();
#if DRIVE_SYSTEM==3
Printer::moveToReal(0,0.9*EEPROM::deltaMaxRadius(),IGNORE_COORDINATE,IGNORE_COORDINATE,Printer::maxFeedrate[X_AXIS]);
Printer::moveToReal(0,0.9*EEPROM::deltaMaxRadius(),IGNORE_COORDINATE,IGNORE_COORDINATE,0.5*Printer::maxFeedrate[Z_AXIS]);
#else
Printer::moveToReal(Printer::xMin,Printer::yMin+Printer::yLength,IGNORE_COORDINATE,IGNORE_COORDINATE,Printer::maxFeedrate[X_AXIS]);
Printer::moveToReal(Printer::xMin,Printer::yMin+Printer::yLength,IGNORE_COORDINATE,IGNORE_COORDINATE,0.5*Printer::maxFeedrate[X_AXIS]);
#endif
}
#endif
Expand All @@ -147,8 +147,8 @@ void SDCard::continuePrint(bool intern)
Printer::setMenuMode(MENU_MODE_SD_PAUSED,false);
#if FEATURE_MEMORY_POSITION
if(intern) {
Printer::GoToMemoryPosition(true,true,false,true,Printer::maxFeedrate[X_AXIS]);
Printer::GoToMemoryPosition(false,false,true,false,Printer::maxFeedrate[Z_AXIS]);
Printer::GoToMemoryPosition(true,true,false,true,0.5*Printer::maxFeedrate[X_AXIS]);
Printer::GoToMemoryPosition(false,false,true,false,0.8*Printer::maxFeedrate[Z_AXIS]);
}
#endif
sdmode = true;
Expand Down
6 changes: 3 additions & 3 deletions src/ArduinoAVR/Repetier/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ void GCode::checkAndPushCommand()
}
void GCode::pushCommand()
{
bufferWriteIndex = (bufferWriteIndex+1) % GCODE_BUFFER_SIZE;
bufferLength++;
#ifndef ECHO_ON_EXECUTE
echoCommand();
commandsBuffered[bufferWriteIndex].echoCommand();
#endif
bufferWriteIndex = (bufferWriteIndex+1) % GCODE_BUFFER_SIZE;
bufferLength++;
}
/**
Get the next buffered command. Returns 0 if no more commands are buffered. For each
Expand Down
43 changes: 25 additions & 18 deletions src/ArduinoAVR/Repetier/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,12 +477,12 @@ STEPPER_CURRENT_CONTROL
#define TEMP_0_PIN 13 // ANALOG NUMBERING
#define TEMP_1_PIN 14 // BED , ANALOG NUMBERING
#define TEMP_2_PIN 15
#define TEMP_4_PIN 12 // ANALOG NUMBERING
#define TEMP_5_PIN 11 // ANALOG NUMBERING
#define TEMP_6_PIN 10
#define TEMP_3_PIN 12 // ANALOG NUMBERING
#define TEMP_4_PIN 11 // ANALOG NUMBERING
#define TEMP_5_PIN 10

#define TEMP_7_PIN 4 // Thermocouple 1
#define TEMP_8_PIN 5 // Thermocouple 2
#define TEMP_6_PIN 4 // Thermocouple 1
#define TEMP_7_PIN 5 // Thermocouple 2


#define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
Expand Down Expand Up @@ -555,10 +555,11 @@ STEPPER_CURRENT_CONTROL
#define MOSI_PIN 51
#define SDPOWER -1
#define SDSS 53
#define SDCARDETECT 38

#define E0_PINS ORIG_E0_STEP_PIN,ORIG_E0_DIR_PIN,ORIG_E0_ENABLE_PIN,
#define E1_PINS ORIG_E1_STEP_PIN,ORIG_E1_DIR_PIN,ORIG_E1_ENABLE_PIN,
#define E2_PINS ORIG_E2_STEP_PIN,ORIG_E2_DIR_PIN,ORIG_E2_ENABLE_PIN,
#define E3_PINS E3_STEP_PIN,E3_DIR_PIN,E3_ENABLE_PIN,
#define E2_PINS

#endif

Expand Down Expand Up @@ -606,7 +607,7 @@ STEPPER_CURRENT_CONTROL
#define LED_PIN 13

#define ORIG_FAN_PIN 7
#define FAN1 PIN 8 // (e.g. useful for electronics fan or light on/off) on PIN 8
#define ORIG_FAN2_PIN 8 // (e.g. useful for electronics fan or light on/off) on PIN 8

#define PS_ON_PIN 45

Expand Down Expand Up @@ -2196,14 +2197,6 @@ S3(ext)=9
#define FAN_BOARD_PIN -1
#endif

#if NUM_EXTRUDER==1
#define E1_PINS
#endif

#if NUM_EXTRUDER<3
#define E2_PINS
#endif

#ifndef HEATER_PINS_INVERTED
#define HEATER_PINS_INVERTED 0
#endif
Expand Down Expand Up @@ -2239,11 +2232,25 @@ S3(ext)=9
#define E2_DIR_PIN ORIG_E2_DIR_PIN
#define E2_ENABLE_PIN ORIG_E2_ENABLE_PIN

#define E3_STEP_PIN ORIG_E3_STEP_PIN
#define E3_DIR_PIN ORIG_E3_DIR_PIN
#define E3_ENABLE_PIN ORIG_E3_ENABLE_PIN

#define E4_STEP_PIN ORIG_E4_STEP_PIN
#define E4_DIR_PIN ORIG_E4_DIR_PIN
#define E4_ENABLE_PIN ORIG_E4_ENABLE_PIN

#define E5_STEP_PIN ORIG_E5_STEP_PIN
#define E5_DIR_PIN ORIG_E5_DIR_PIN
#define E5_ENABLE_PIN ORIG_E5_ENABLE_PIN

#define FAN_PIN ORIG_FAN_PIN
#define FAN2_PIN ORIG_FAN2_PIN


#define SENSITIVE_PINS {0, 1, X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, ORIG_X_MIN_PIN, X_MAX_PIN, Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, LED_PIN, PS_ON_PIN, \
HEATER_0_PIN, HEATER_1_PIN, ORIG_FAN_PIN, E0_PINS E1_PINS E2_PINS TEMP_0_PIN, TEMP_1_PIN,SDSS }
#define SENSITIVE_PINS {0, 1, ORIG_X_STEP_PIN, ORIG_X_DIR_PIN, ORIG_X_ENABLE_PIN, ORIG_X_MIN_PIN, ORIG_X_MAX_PIN, \
ORIG_Y_STEP_PIN, ORIG_Y_DIR_PIN, ORIG_Y_ENABLE_PIN, ORIG_Y_MIN_PIN, ORIG_Y_MAX_PIN, ORIG_Z_STEP_PIN,\
ORIG_Z_DIR_PIN, ORIG_Z_ENABLE_PIN, ORIG_Z_MIN_PIN, ORIG_Z_MAX_PIN, LED_PIN, PS_ON_PIN, \
HEATER_0_PIN, HEATER_1_PIN, ORIG_FAN_PIN, E0_PINS E1_PINS E2_PINS TEMP_0_PIN, TEMP_1_PIN,SDSS }
#endif

Loading