How to disable servo movement between probing point ? May 15, 2014 12:30PM |
Registered: 10 years ago Posts: 101 |
Re: How to disable servo movement between probing point ? May 15, 2014 06:06PM |
Registered: 10 years ago Posts: 101 |
Re: How to disable servo movement between probing point ? May 18, 2014 11:43AM |
Registered: 10 years ago Posts: 272 |
Re: How to disable servo movement between probing point ? May 19, 2014 10:32AM |
Registered: 11 years ago Posts: 253 |
Re: How to disable servo movement between probing point ? May 19, 2014 04:40PM |
Registered: 10 years ago Posts: 101 |
case 281: // M281 - M281 P RUN - Fonction Perso dual extruder - Met le servo en bonne position en fonction de l'extruder actif { int servo_index = -1; int servo_position = 0; if (code_seen('P')) servo_index = code_value(); // ##################################################### Modif section ################################### if (code_seen('RUN')) { if (active_extruder != 1) { servo_position = 30; goto out; } else if (active_extruder != 0) { servo_position = 0; } out: // ##################################################### Modif section ################################### if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) { #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) servos[servo_index].attach(0); #endif servos[servo_index].write(servo_position); #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0) delay(PROBE_SERVO_DEACTIVATION_DELAY); servos[servo_index].detach(); #endif } else { SERIAL_ECHO_START; SERIAL_ECHO("Servo "); SERIAL_ECHO(servo_index); SERIAL_ECHOLN(" out of range"); } } else if (servo_index >= 0) { SERIAL_PROTOCOL(MSG_OK); SERIAL_PROTOCOL(" Servo "); SERIAL_PROTOCOL(servo_index); SERIAL_PROTOCOL(": "); SERIAL_PROTOCOL(servos[servo_index].read()); SERIAL_PROTOCOLLN(""); } } break; #endif // NUM_SERVOS > 0 // ################################## #if (LARGE_FLASH == true && ( BEEPER > 0 || defined(ULTRALCD) || defined(LCD_USE_I2C_BUZZER)))