Skip to content

Commit

Permalink
Merge pull request #51 from MarlinFirmware/RCBugFix
Browse files Browse the repository at this point in the history
Rc bug fix
  • Loading branch information
esenapaj committed Mar 2, 2016
2 parents 46d5782 + 9eb4ace commit ff056e0
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
13 changes: 7 additions & 6 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3227,6 +3227,11 @@ inline void gcode_G28() {
// Sled assembly for Cartesian bots
#if ENABLED(Z_PROBE_SLED)
dock_sled(true); // dock the sled
#elif Z_RAISE_AFTER_PROBING > 0
// Raise Z axis for non-delta and non servo based probes
#if !defined(HAS_SERVO_ENDSTOPS) && DISABLED(Z_PROBE_ALLEN_KEY) && DISABLED(Z_PROBE_SLED)
raise_z_after_probing();
#endif
#endif

#endif // !DELTA
Expand Down Expand Up @@ -5645,12 +5650,8 @@ inline void gcode_T(uint8_t tmp_extruder) {
}

// apply Y & Z extruder offset (x offset is already used in determining home pos)
current_position[Y_AXIS] = current_position[Y_AXIS] -
extruder_offset[Y_AXIS][active_extruder] +
extruder_offset[Y_AXIS][tmp_extruder];
current_position[Z_AXIS] = current_position[Z_AXIS] -
extruder_offset[Z_AXIS][active_extruder] +
extruder_offset[Z_AXIS][tmp_extruder];
current_position[Y_AXIS] -= extruder_offset[Y_AXIS][active_extruder] - extruder_offset[Y_AXIS][tmp_extruder];
current_position[Z_AXIS] -= extruder_offset[Z_AXIS][active_extruder] - extruder_offset[Z_AXIS][tmp_extruder];
active_extruder = tmp_extruder;

// This function resets the max/min values - the current position may be overwritten below.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/Felix/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/RigidBot/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/SCARA/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/TAZ4/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/WITBOX/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/example_configurations/makibox/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
// @section more

// The hardware watchdog should reset the microcontroller disabling all outputs, in case the firmware gets stuck and doesn't do temperature regulation.
//#define USE_WATCHDOG
#define USE_WATCHDOG

#if ENABLED(USE_WATCHDOG)
// If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
Expand Down
8 changes: 6 additions & 2 deletions Marlin/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,11 +865,15 @@ static void _lcd_move(const char* name, AxisEnum axis, int min, int max) {
if (min_software_endstops && current_position[axis] < min) current_position[axis] = min;
if (max_software_endstops && current_position[axis] > max) current_position[axis] = max;
encoderPosition = 0;
line_to_current(axis);
if (movesplanned() <= 3)
line_to_current(axis);
lcdDrawUpdate = 1;
}
if (lcdDrawUpdate) lcd_implementation_drawedit(name, ftostr31(current_position[axis]));
if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
if (LCD_CLICKED) {
line_to_current(axis);
lcd_goto_menu(lcd_move_menu_axis);
}
}
static void lcd_move_x() { _lcd_move(PSTR(MSG_MOVE_X), X_AXIS, X_MIN_POS, X_MAX_POS); }
static void lcd_move_y() { _lcd_move(PSTR(MSG_MOVE_Y), Y_AXIS, Y_MIN_POS, Y_MAX_POS); }
Expand Down

0 comments on commit ff056e0

Please sign in to comment.