Skip to content

Commit

Permalink
Misc formatting, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and vgadreau committed Dec 9, 2020
1 parent e44515d commit 700bcd3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Marlin/src/feature/tmc_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define CHOPPER_DEFAULT_36V { 5, 2, 4 }
#define CHOPPER_PRUSAMK3_24V { 3, -2, 6 }
#define CHOPPER_MARLIN_119 { 5, 2, 3 }
#define CHOPPER_09STEP_24V { 3, -1, 5 }
#define CHOPPER_09STEP_24V { 3, -1, 5 }

#if ENABLED(MONITOR_DRIVER_STATUS) && !defined(MONITOR_DRIVER_STATUS_INTERVAL_MS)
#define MONITOR_DRIVER_STATUS_INTERVAL_MS 500u
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ void StressTestScreen::runTestOnBootup(bool enable) {
}

void StressTestScreen::startupCheck() {
if (LockScreen::get_hash() == 0xDEAD) {
if (LockScreen::get_hash() == 0xDEAD)
GOTO_SCREEN(StressTestScreen);
}
}

void StressTestScreen::onEntry() {
Expand Down Expand Up @@ -120,31 +119,31 @@ void StressTestScreen::onIdle() {
reset_menu_timeout();

if (!commandsInQueue()) {
if (!isPositionKnown()) {
extern const char G28_STR[];
injectCommands_P(G28_STR);
}
else {
injectCommands_P(PSTR(
"G0 X100 Y100 Z100 F6000\n"
"T0\nG4 S1"
#if EXTRUDERS > 1
"\nT1\nG4 S1"
#endif
"\nG0 X150 Y150 Z150"
));
}
if (!isPositionKnown()) {
extern const char G28_STR[];
injectCommands_P(G28_STR);
}
else {
injectCommands_P(PSTR(
"G0 X100 Y100 Z100 F6000\n"
"T0\nG4 S1"
#if EXTRUDERS > 1
"\nT1\nG4 S1"
#endif
"\nG0 X150 Y150 Z150"
));
}
}

if (refresh_timer.elapsed(STRESS_TEST_CHANGE_INTERVAL)) {
setTargetFan_percent(random(100),FAN0);
}

if (watchDogTestNow()) {
if (random(2) % 2)
iterativeLockup();
else
recursiveLockup();
if (random(2) % 2)
iterativeLockup();
else
recursiveLockup();
}

BaseScreen::onIdle();
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1524,17 +1524,17 @@ void MarlinUI::update() {
const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
if (on_edit_screen)
encoderDiff = ENCODER_PULSES_PER_STEP * ydir;
encoderDiff = (ENCODER_PULSES_PER_STEP) * ydir;
else if (screen_items > 0) {
// Last 3 cols act as a scroll :-)
if (col > (LCD_WIDTH) - 5)
// 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.)
encoderDiff = ENCODER_PULSES_PER_STEP * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
encoderDiff = (ENCODER_PULSES_PER_STEP) * (encoderLine - encoderTopLine + 2 * (LCD_HEIGHT)) * ydir;
else
encoderDiff = ENCODER_PULSES_PER_STEP * (row - encoderPosition + encoderTopLine);
encoderDiff = (ENCODER_PULSES_PER_STEP) * (row - encoderPosition + encoderTopLine);
}
else if (!on_status_screen())
encoderDiff = ENCODER_PULSES_PER_STEP * xdir;
encoderDiff = (ENCODER_PULSES_PER_STEP) * xdir;
}

#endif
Expand Down

0 comments on commit 700bcd3

Please sign in to comment.