Browse Source

Misc formatting, cleanup

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
0ddef5544a
  1. 3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp
  2. 8
      Marlin/src/lcd/ultralcd.cpp

3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp

@ -87,10 +87,9 @@ void StressTestScreen::runTestOnBootup(bool enable) {
} }
void StressTestScreen::startupCheck() { void StressTestScreen::startupCheck() {
if (LockScreen::get_hash() == 0xDEAD) { if (LockScreen::get_hash() == 0xDEAD)
GOTO_SCREEN(StressTestScreen); GOTO_SCREEN(StressTestScreen);
} }
}
void StressTestScreen::onEntry() { void StressTestScreen::onEntry() {
screen_data.StressTestScreen.next_watchdog_trigger = millis() + 10000 + random(40000); screen_data.StressTestScreen.next_watchdog_trigger = millis() + 10000 + random(40000);

8
Marlin/src/lcd/ultralcd.cpp

@ -1524,17 +1524,17 @@ void MarlinUI::update() {
const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1, const int8_t xdir = col < (LCD_WIDTH ) / 2 ? -1 : 1,
ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1; ydir = row < (LCD_HEIGHT) / 2 ? -1 : 1;
if (on_edit_screen) if (on_edit_screen)
encoderDiff = ENCODER_PULSES_PER_STEP * ydir; encoderDiff = (ENCODER_PULSES_PER_STEP) * ydir;
else if (screen_items > 0) { else if (screen_items > 0) {
// Last 3 cols act as a scroll :-) // Last 3 cols act as a scroll :-)
if (col > (LCD_WIDTH) - 5) if (col > (LCD_WIDTH) - 5)
// 2 * LCD_HEIGHT to scroll to bottom of next page. (LCD_HEIGHT would only go 1 item down.) // 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 else
encoderDiff = ENCODER_PULSES_PER_STEP * (row - encoderPosition + encoderTopLine); encoderDiff = (ENCODER_PULSES_PER_STEP) * (row - encoderPosition + encoderTopLine);
} }
else if (!on_status_screen()) else if (!on_status_screen())
encoderDiff = ENCODER_PULSES_PER_STEP * xdir; encoderDiff = (ENCODER_PULSES_PER_STEP) * xdir;
} }
#endif #endif

Loading…
Cancel
Save