Browse Source

Fix SD_REPRINT_LAST_SELECTED_FILE

Scott Lahteine 5 years ago
parent
commit
ae42206500
2 changed files with 4 additions and 4 deletions
  1. 3
    3
      Marlin/src/lcd/menu/menu_sdcard.cpp
  2. 1
    1
      buildroot/share/tests/megaatmega2560-tests

+ 3
- 3
Marlin/src/lcd/menu/menu_sdcard.cpp View File

@@ -102,8 +102,8 @@ class MenuItem_sdfile {
102 102
       #if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
103 103
         // Save menu state for the selected file
104 104
         sd_encoder_position = ui.encoderPosition;
105
-        sd_top_line = ui.encoderTopLine;
106
-        sd_items = ui.screen_items;
105
+        sd_top_line = encoderTopLine;
106
+        sd_items = screen_items;
107 107
       #endif
108 108
       #if ENABLED(SD_MENU_CONFIRM_START)
109 109
         do_print_file = false;
@@ -119,7 +119,7 @@ class MenuItem_sdfolder {
119 119
     static void action(CardReader &theCard) {
120 120
       card.chdir(theCard.filename);
121 121
       encoderTopLine = 0;
122
-      ui.encoderPosition = 2 * ENCODER_STEPS_PER_MENU_ITEM;
122
+      ui.encoderPosition = 2 * (ENCODER_STEPS_PER_MENU_ITEM);
123 123
       screen_changed = true;
124 124
       #if HAS_GRAPHICAL_LCD
125 125
         ui.drawing_screen = false;

+ 1
- 1
buildroot/share/tests/megaatmega2560-tests View File

@@ -31,7 +31,7 @@ opt_set POWER_SUPPLY 1
31 31
 opt_set GRID_MAX_POINTS_X 16
32 32
 opt_set FANMUX0_PIN 53
33 33
 opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING EEPROM_SETTINGS \
34
-           REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BINARY_FILE_TRANSFER \
34
+           REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \
35 35
            NEOPIXEL_LED BLINKM PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN \
36 36
            NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \
37 37
            AUTO_BED_LEVELING_LINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \

Loading…
Cancel
Save