Commit b27d10ff authored by Franco (nextime) Lanza's avatar Franco (nextime) Lanza

Merge remote-tracking branch 'upstream/dev' into dev

parents 5709b356 66125af0
### Version 4.2.82
* Add DONDOLO_DUAL_MOTOR for DONDOLO bowden and dual extruder
### Version 4.2.81 ### Version 4.2.81
* Fix serial protocol for Repetier Host * Fix serial protocol for Repetier Host
* Bug fix * Bug fix
......
...@@ -114,8 +114,8 @@ ...@@ -114,8 +114,8 @@
* * * *
***********************************************************************/ ***********************************************************************/
//#define HOTEND_WATTS (12.0*12.0/6.7) // P=I^2/R //#define HOTEND_WATTS (12.0*12.0/6.7) // P=I^2/R
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R //#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
//#define COOLER_WATTS 52 // Commonly available TEC wattage
/***********************************************************************/ /***********************************************************************/
...@@ -546,6 +546,8 @@ ...@@ -546,6 +546,8 @@
*********************************************************************** ***********************************************************************
* * * *
* Setting for multiextruder DONDOLO 1.0b by Gianni Franci * * Setting for multiextruder DONDOLO 1.0b by Gianni Franci *
* Enable DONDOLO SINGLE MOTOR for original DONDOLO by Gianni Franci *
* Enable DONDOLO DUAL MOTOR for bowden and dual EXTRUDER *
* http://www.thingiverse.com/thing:673816 * * http://www.thingiverse.com/thing:673816 *
* For function set NUM_SERVOS +1 if you use for endstop or probe * * For function set NUM_SERVOS +1 if you use for endstop or probe *
* Set DONDOLO SERVO INDEX for servo you use for DONDOLO * * Set DONDOLO SERVO INDEX for servo you use for DONDOLO *
...@@ -554,7 +556,9 @@ ...@@ -554,7 +556,9 @@
* Remember set HOTEND OFFSET X Y Z * * Remember set HOTEND OFFSET X Y Z *
* * * *
***********************************************************************/ ***********************************************************************/
//#define DONDOLO //#define DONDOLO_SINGLE_MOTOR
//#define DONDOLO_DUAL_MOTOR
#define DONDOLO_SERVO_INDEX 0 #define DONDOLO_SERVO_INDEX 0
#define DONDOLO_SERVOPOS_E0 120 #define DONDOLO_SERVOPOS_E0 120
#define DONDOLO_SERVOPOS_E1 10 #define DONDOLO_SERVOPOS_E1 10
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#define CONFIGURATION_VERSION_H #define CONFIGURATION_VERSION_H
#define FIRMWARE_NAME "MK" #define FIRMWARE_NAME "MK"
#define SHORT_BUILD_VERSION "4.2.81_dev" #define SHORT_BUILD_VERSION "4.2.82_dev"
#define BUILD_VERSION FIRMWARE_NAME "_" SHORT_BUILD_VERSION #define BUILD_VERSION FIRMWARE_NAME "_" SHORT_BUILD_VERSION
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time #define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found // It might also be appropriate to define a location where additional information can be found
......
...@@ -583,7 +583,7 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { ...@@ -583,7 +583,7 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
servo[3].detach(); servo[3].detach();
#endif #endif
#if ENABLED(DONDOLO) #if HAS(DONDOLO)
servo[DONDOLO_SERVO_INDEX].attach(0); servo[DONDOLO_SERVO_INDEX].attach(0);
servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E0); servo[DONDOLO_SERVO_INDEX].write(DONDOLO_SERVOPOS_E0);
delay_ms(DONDOLO_SERVO_DELAY); delay_ms(DONDOLO_SERVO_DELAY);
...@@ -592,7 +592,7 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) { ...@@ -592,7 +592,7 @@ bool enqueue_and_echo_command(const char* cmd, bool say_ok/*=false*/) {
// Set position of Servo Endstops that are defined // Set position of Servo Endstops that are defined
#if HAS(SERVO_ENDSTOPS) #if HAS(SERVO_ENDSTOPS)
#if ENABLED(DONDOLO) #if HAS(DONDOLO)
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
if (servo_endstop_id[i] >= 0 && servo_endstop_id[i] != DONDOLO_SERVO_INDEX) if (servo_endstop_id[i] >= 0 && servo_endstop_id[i] != DONDOLO_SERVO_INDEX)
servo[servo_endstop_id[i]].write(servo_endstop_angle[i][1]); servo[servo_endstop_id[i]].write(servo_endstop_angle[i][1]);
...@@ -1945,6 +1945,8 @@ inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_positio ...@@ -1945,6 +1945,8 @@ inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_positio
static void deploy_z_probe() { static void deploy_z_probe() {
if (DEBUGGING(INFO)) DEBUG_POS("deploy_z_probe", current_position);
if (endstops.z_probe_enabled) return; if (endstops.z_probe_enabled) return;
#if HAS(SERVO_ENDSTOPS) #if HAS(SERVO_ENDSTOPS)
...@@ -1980,6 +1982,8 @@ inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_positio ...@@ -1980,6 +1982,8 @@ inline void do_blocking_move_to_z(float z) { do_blocking_move_to(current_positio
static void retract_z_probe() { static void retract_z_probe() {
if (DEBUGGING(INFO)) DEBUG_POS("retract_z_probe", current_position);
if (!endstops.z_probe_enabled) return; if (!endstops.z_probe_enabled) return;
#if HAS(SERVO_ENDSTOPS) #if HAS(SERVO_ENDSTOPS)
...@@ -6499,7 +6503,7 @@ inline void gcode_M226() { ...@@ -6499,7 +6503,7 @@ inline void gcode_M226() {
inline void gcode_M280() { inline void gcode_M280() {
int servo_index = code_seen('P') ? code_value_short() : -1; int servo_index = code_seen('P') ? code_value_short() : -1;
int servo_position = 0; int servo_position = 0;
#if ENABLED(DONDOLO) #if HAS(DONDOLO)
if (code_seen('S')) { if (code_seen('S')) {
servo_position = code_value_short(); servo_position = code_value_short();
if (servo_index >= 0 && servo_index < NUM_SERVOS && servo_index != DONDOLO_SERVO_INDEX) { if (servo_index >= 0 && servo_index < NUM_SERVOS && servo_index != DONDOLO_SERVO_INDEX) {
...@@ -8032,7 +8036,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -8032,7 +8036,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
old_color = active_extruder = target_extruder; old_color = active_extruder = target_extruder;
active_driver = 0; active_driver = 0;
ECHO_LMV(DB, SERIAL_ACTIVE_COLOR, (int)active_extruder); ECHO_LMV(DB, SERIAL_ACTIVE_COLOR, (int)active_extruder);
#elif ENABLED(DONDOLO) #elif HAS(DONDOLO)
st_synchronize(); st_synchronize();
servo[DONDOLO_SERVO_INDEX].attach(0); servo[DONDOLO_SERVO_INDEX].attach(0);
if (target_extruder == 0) { if (target_extruder == 0) {
...@@ -8044,8 +8048,12 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -8044,8 +8048,12 @@ inline void gcode_T(uint8_t tmp_extruder) {
delay_ms(DONDOLO_SERVO_DELAY); delay_ms(DONDOLO_SERVO_DELAY);
servo[DONDOLO_SERVO_INDEX].detach(); servo[DONDOLO_SERVO_INDEX].detach();
previous_extruder = active_extruder; previous_extruder = active_extruder;
active_extruder = target_extruder; #if ENABLED(DONDOLO_SINGLE_MOTOR)
active_driver = 0; active_extruder = target_extruder;
active_driver = 0;
#elif ENABLED(DONDOLO_DUAL_MOTOR)
active_driver = active_extruder = target_extruder;
#endif
set_stepper_direction(true); set_stepper_direction(true);
ECHO_LMV(DB, SERIAL_ACTIVE_DRIVER, (int)active_driver); ECHO_LMV(DB, SERIAL_ACTIVE_DRIVER, (int)active_driver);
ECHO_LMV(DB, SERIAL_ACTIVE_EXTRUDER, (int)active_extruder); ECHO_LMV(DB, SERIAL_ACTIVE_EXTRUDER, (int)active_extruder);
......
...@@ -267,12 +267,16 @@ ...@@ -267,12 +267,16 @@
/** /**
* DONDOLO * DONDOLO
*/ */
#if ENABLED(DONDOLO) #if ENABLED(DONDOLO_SINGLE_MOTOR)
#undef SINGLENOZZLE #undef SINGLENOZZLE
#undef ADVANCE #undef ADVANCE
#undef DRIVER_EXTRUDERS #undef DRIVER_EXTRUDERS
#define DRIVER_EXTRUDERS 1 #define DRIVER_EXTRUDERS 1
#endif #endif
#if ENABLED(DONDOLO_DUAL_MOTOR)
#undef SINGLENOZZLE
#undef ADVANCE
#endif
/** /**
* SINGLENOZZLE * SINGLENOZZLE
...@@ -289,7 +293,7 @@ ...@@ -289,7 +293,7 @@
/** /**
* DRIVER_EXTRUDERS * DRIVER_EXTRUDERS
*/ */
#if DISABLED(MKR4) && DISABLED(NPR2) && DISABLED(DONDOLO) && DISABLED(COLOR_MIXING_EXTRUDER) #if DISABLED(MKR4) && DISABLED(NPR2) && DISABLED(DONDOLO_SINGLE_MOTOR) && DISABLED(COLOR_MIXING_EXTRUDER)
#undef DRIVER_EXTRUDERS #undef DRIVER_EXTRUDERS
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder #define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder
#endif #endif
...@@ -763,6 +767,8 @@ ...@@ -763,6 +767,8 @@
#define HAS_MOTOR_CURRENT_PWM_XY (PIN_EXISTS(MOTOR_CURRENT_PWM_XY)) #define HAS_MOTOR_CURRENT_PWM_XY (PIN_EXISTS(MOTOR_CURRENT_PWM_XY))
#define HAS_SDSUPPORT (ENABLED(SDSUPPORT)) #define HAS_SDSUPPORT (ENABLED(SDSUPPORT))
#define HAS_DONDOLO (ENABLED(DONDOLO_SINGLE_MOTOR) || ENABLED(DONDOLO_DUAL_MOTOR))
#define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS))
#define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675))
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
#define MSG_AUTOSTART "Autostart" #define MSG_AUTOSTART "Autostart"
#define MSG_DISABLE_STEPPERS "Disable steppers" #define MSG_DISABLE_STEPPERS "Disable steppers"
#define MSG_AUTO_HOME "Auto home" #define MSG_AUTO_HOME "Auto home"
#define MSG_AUTO_HOME_X "Home X"
#define MSG_AUTO_HOME_Y "Home Y"
#define MSG_AUTO_HOME_Z "Home Z"
#define MSG_MBL_SETTING "Manual Bed Leveling" #define MSG_MBL_SETTING "Manual Bed Leveling"
#define MSG_MBL_BUTTON " Press the button " #define MSG_MBL_BUTTON " Press the button "
#define MSG_MBL_INTRO " Leveling bed... " #define MSG_MBL_INTRO " Leveling bed... "
......
...@@ -735,6 +735,16 @@ static void lcd_tune_fixstep() { ...@@ -735,6 +735,16 @@ static void lcd_tune_fixstep() {
#endif #endif
#endif // !THERMAL_PROTECTION_HOTENDS #endif // !THERMAL_PROTECTION_HOTENDS
#if ENABLED(THERMAL_PROTECTION_BED)
#if TEMP_SENSOR_BED != 0
void watch_temp_callback_bed() { start_watching_bed(); }
#endif
#else
#if TEMP_SENSOR_BED != 0
void watch_temp_callback_bed() {}
#endif
#endif
/** /**
* *
* "Tune" submenu * "Tune" submenu
...@@ -760,38 +770,12 @@ MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999); ...@@ -760,38 +770,12 @@ MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_multiplier, 10, 999);
MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature_cooler, 0, COOLER_MAXTEMP - 15); MENU_ITEM_EDIT(int3, MSG_NOZZLE, &target_temperature_cooler, 0, COOLER_MAXTEMP - 15);
#endif #endif
// //
// Nozzle: // Bed:
// //
#if HOTENDS == 1 #if TEMP_SENSOR_BED != 0
#if TEMP_SENSOR_0 != 0 MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0); #endif
#endif
#else // HOTENDS > 1
#if TEMP_SENSOR_0 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE " 0", &target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
#endif
#if TEMP_SENSOR_1 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE " 1", &target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
#endif
#if HOTENDS > 2
#if TEMP_SENSOR_2 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE " 2", &target_temperature[2], 0, HEATER_2_MAXTEMP - 15, watch_temp_callback_E2);
#endif
#if HOTENDS > 3
#if TEMP_SENSOR_3 != 0
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE " 3", &target_temperature[3], 0, HEATER_3_MAXTEMP - 15, watch_temp_callback_E3);
#endif
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
//
// Bed:
//
#if TEMP_SENSOR_BED != 0
MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
#endif
// //
// Fan Speed: // Fan Speed:
...@@ -868,6 +852,11 @@ static void lcd_easy_unload() { ...@@ -868,6 +852,11 @@ static void lcd_easy_unload() {
} }
#endif // EASY_LOAD #endif // EASY_LOAD
/**
*
* "Prepare" submenu items
*
*/
void _lcd_preheat(int endnum, const float temph, const float tempb, const int fan) { void _lcd_preheat(int endnum, const float temph, const float tempb, const int fan) {
if (temph > 0) setTargetHotend(temph, endnum); if (temph > 0) setTargetHotend(temph, endnum);
#if TEMP_SENSOR_BED != 0 #if TEMP_SENSOR_BED != 0
...@@ -1011,48 +1000,53 @@ lcd_return_to_status(); ...@@ -1011,48 +1000,53 @@ lcd_return_to_status();
*/ */
static void lcd_prepare_menu() { static void lcd_prepare_menu() {
START_MENU(); START_MENU();
// //
// ^ Main // ^ Main
// //
MENU_ITEM(back, MSG_MAIN); MENU_ITEM(back, MSG_MAIN);
// //
// Auto Home // Auto Home
// //
#if ENABLED(LASER) #if ENABLED(LASER)
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 X Y F2000")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28 X Y F2000"));
#else # else
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28")); MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
#endif #if !MECH(DELTA)
MENU_ITEM(gcode, MSG_AUTO_HOME_X, PSTR("G28 X"));
MENU_ITEM(gcode, MSG_AUTO_HOME_Y, PSTR("G28 Y"));
MENU_ITEM(gcode, MSG_AUTO_HOME_Z, PSTR("G28 Z"));
#endif
#endif
// //
// Set Home Offsets // Set Home Offsets
// //
MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets); MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
//MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0")); //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
// //
// Level Bed // Level Bed
// //
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
MENU_ITEM(gcode, MSG_LEVEL_BED, MENU_ITEM(gcode, MSG_LEVEL_BED,
axis_homed[X_AXIS] && axis_homed[Y_AXIS] ? PSTR("G29") : PSTR("G28\nG29") axis_homed[X_AXIS] && axis_homed[Y_AXIS] ? PSTR("G29") : PSTR("G28\nG29")
); );
#elif !MECH(DELTA) && DISABLED(Z_SAFE_HOMING) && Z_HOME_DIR < 0 #elif !MECH(DELTA) && DISABLED(Z_SAFE_HOMING) && Z_HOME_DIR < 0
MENU_ITEM(submenu, MSG_MBL_SETTING, config_lcd_level_bed); MENU_ITEM(submenu, MSG_MBL_SETTING, config_lcd_level_bed);
#endif #endif
// //
// Move Axis // Move Axis
// //
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu); MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
// //
// Disable Steppers // Disable Steppers
// //
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
// //
// Preheat PLA // Preheat PLA
......
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
#define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }} #define REV_E_DIR() { if(extruder_duplication_enabled) { E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E1_DIR); } else if(current_block->active_driver == 1) { E1_DIR_WRITE( INVERT_E1_DIR); } else { E0_DIR_WRITE( INVERT_E0_DIR); }}
#endif #endif
#else #else
#if ENABLED(DONDOLO) #if ENABLED(DONDOLO_SINGLE_MOTOR)
#define E_STEP_WRITE(v) E0_STEP_WRITE(v) #define E_STEP_WRITE(v) E0_STEP_WRITE(v)
#define NORM_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }} #define NORM_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE( INVERT_E0_DIR); break; case 0: E0_DIR_WRITE(!INVERT_E0_DIR); break; }}
#define REV_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }} #define REV_E_DIR() { switch(active_extruder) { case 1: E0_DIR_WRITE(!INVERT_E0_DIR); break; case 0: E0_DIR_WRITE( INVERT_E0_DIR); break; }}
......
...@@ -1808,8 +1808,16 @@ ...@@ -1808,8 +1808,16 @@
#error DEPENDENCY ERROR: You have to set E_MIN_PIN to a valid pin if you enable NPR2 #error DEPENDENCY ERROR: You have to set E_MIN_PIN to a valid pin if you enable NPR2
#endif #endif
#if ENABLED(DONDOLO) && NUM_SERVOS < 1 #if (ENABLED(DONDOLO_SINGLE_MOTOR) || ENABLED(DONDOLO_DUAL_MOTOR)) && HASNT(SERVOS)
#error DEPENDENCY ERROR: You must set NUM_SERVOS > 0 for DONDOLO #error DEPENDENCY ERROR: You must enabled ENABLE_SERVOS and set NUM_SERVOS > 0 for DONDOLO MULTI EXTRUDER
#endif
#if ENABLED(DONDOLO_SINGLE_MOTOR) && ENABLED(DONDOLO_DUAL_MOTOR)
#error DEPENDENCY ERROR: You must enabled only one for DONDOLO_SINGLE_MOTOR and DONDOLO_DUAL_MOTOR
#endif
#if (ENABLED(DONDOLO_SINGLE_MOTOR) || ENABLED(DONDOLO_DUAL_MOTOR)) && EXTRUDERS != 2
#error DEPENDENCY ERROR: You must set EXTRUDERS = 2 for DONDOLO
#endif #endif
#if ENABLED(LASERBEAM) && (!PIN_EXISTS(LASER_PWR) || !PIN_EXISTS(LASER_TTL)) #if ENABLED(LASERBEAM) && (!PIN_EXISTS(LASER_PWR) || !PIN_EXISTS(LASER_TTL))
......
<img align="right" src="Documentation/Logo/MarlinKimbra%20Logo%20GitHub.png" /> <img align="right" src="Documentation/Logo/MarlinKimbra%20Logo%20GitHub.png" />
# MarlinKimbra 3D Printer Firmware for Arduino # MarlinKimbra 3D Printer Firmware for Arduino
## Version 4.2.81 dev ## Version 4.2.82 dev
### Special thanks ### Special thanks
* all Marlin8bit-developers. * all Marlin8bit-developers.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment