Misc formatting, cleanup

This commit is contained in:
Scott Lahteine 2020-07-18 18:54:44 -05:00
parent d579b70b7e
commit 0ddef5544a
3 changed files with 24 additions and 25 deletions

View file

@ -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() {

View file

@ -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