adding edits made by akukan

This commit is contained in:
PavelSindler 2017-04-30 17:08:00 +02:00
parent f28252f563
commit 032f2637a7
4 changed files with 75 additions and 12 deletions

View File

@ -5109,11 +5109,35 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
}
else
{
#ifdef FILAMENTCHANGE_FINALRETRACT
target[E_AXIS]+= FILAMENTCHANGE_FINALRETRACT ;
#endif
#ifdef SNMM
#else
#ifdef FILAMENTCHANGE_FINALRETRACT
target[E_AXIS] += FILAMENTCHANGE_FINALRETRACT;
#endif
#endif // SNMM
}
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], FILAMENTCHANGE_RFEED, active_extruder);
#ifdef SNMM
target[E_AXIS] += 12;
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 3500, active_extruder);
target[E_AXIS] += 6;
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5000, active_extruder);
target[E_AXIS] += (FIL_LOAD_LENGTH * -1);
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 5000, active_extruder);
st_synchronize();
target[E_AXIS] += (FIL_COOLING);
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 50, active_extruder);
target[E_AXIS] += (FIL_COOLING*-1);
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 50, active_extruder);
target[E_AXIS] += (BOWDEN_LENGTH*-1);
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], 3000, active_extruder);
st_synchronize();
#else
plan_buffer_line(target[X_AXIS], target[Y_AXIS], target[Z_AXIS], target[E_AXIS], FILAMENTCHANGE_RFEED, active_extruder);
#endif // SNMM
//finish moves
st_synchronize();
@ -5389,6 +5413,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
else {
tmp_extruder = code_value();
#ifdef SNMM
snmm_extruder = tmp_extruder;
st_synchronize();
delay(100);

View File

@ -515,14 +515,39 @@ ISR(TIMER1_COMPA_vect)
}
#endif
if ((out_bits & (1<<E_AXIS)) != 0) { // -direction
REV_E_DIR();
count_direction[E_AXIS]=-1;
}
else { // +direction
NORM_E_DIR();
count_direction[E_AXIS]=1;
}
if ((out_bits & (1 << E_AXIS)) != 0)
{ // -direction
//AKU
#ifdef SNMM
if (snmm_extruder == 0 || snmm_extruder == 2)
{
NORM_E_DIR();
}
else
{
REV_E_DIR();
}
#else
REV_E_DIR();
#endif // SNMM
count_direction[E_AXIS] = -1;
}
else
{ // +direction
#ifdef SNMM
if (snmm_extruder == 0 || snmm_extruder == 2)
{
REV_E_DIR();
}
else
{
NORM_E_DIR();
}
#else
NORM_E_DIR();
#endif // SNMM
count_direction[E_AXIS] = 1;
}
for(uint8_t i=0; i < step_loops; i++) { // Take multiple steps per interrupt (For high speed moves)
#ifndef AT90USB

View File

@ -96,6 +96,10 @@ int8_t SDscrool = 0;
int8_t SilentModeMenu = 0;
#ifdef SNMM
uint8_t snmm_extruder = 0;
#endif
int lcd_commands_type=LCD_COMMAND_IDLE;
int lcd_commands_step=0;
bool isPrintPaused = false;
@ -2949,9 +2953,14 @@ void change_extr(int extr) { //switches multiplexer for extruders
disable_e1();
disable_e2();
#ifdef SNMM
snmm_extruder = extr;
#endif
pinMode(E_MUX0_PIN, OUTPUT);
pinMode(E_MUX1_PIN, OUTPUT);
pinMode(E_MUX2_PIN, OUTPUT);
switch (extr) {
case 1:
WRITE(E_MUX0_PIN, HIGH);

View File

@ -103,6 +103,10 @@ void lcd_mylang();
extern int farm_timer;
extern int farm_status;
#ifdef SNMM
extern uint8_t snmm_extruder;
#endif // SNMM
extern bool cancel_heatup;
extern bool isPrintPaused;