Browse Source

Define 'filelist' for dgus/origin

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
1f72b4f65b
  1. 12
      Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.h
  2. 2
      Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp

12
Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.h

@ -30,17 +30,17 @@ enum DGUSLCD_Screens : uint8_t {
DGUSLCD_SCREEN_STATUS = 30, DGUSLCD_SCREEN_STATUS = 30,
DGUSLCD_SCREEN_STATUS2 = 32, DGUSLCD_SCREEN_STATUS2 = 32,
DGUSLCD_SCREEN_MANUALMOVE = 40, DGUSLCD_SCREEN_MANUALMOVE = 40,
DGUSLCD_SCREEN_MANUALEXTRUDE=42, DGUSLCD_SCREEN_MANUALEXTRUDE = 42,
DGUSLCD_SCREEN_FANANDFEEDRATE = 44, DGUSLCD_SCREEN_FANANDFEEDRATE = 44,
DGUSLCD_SCREEN_FLOWRATES = 46, DGUSLCD_SCREEN_FLOWRATES = 46,
DGUSLCD_SCREEN_SDFILELIST = 50, DGUSLCD_SCREEN_SDFILELIST = 50,
DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52, DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52,
DGUSLCD_SCREEN_POWER_LOSS = 100, DGUSLCD_SCREEN_POWER_LOSS = 100,
DGUSLCD_SCREEN_PREHEAT=120, DGUSLCD_SCREEN_PREHEAT = 120,
DGUSLCD_SCREEN_UTILITY=110, DGUSLCD_SCREEN_UTILITY = 110,
DGUSLCD_SCREEN_FILAMENT_HEATING=146, DGUSLCD_SCREEN_FILAMENT_HEATING = 146,
DGUSLCD_SCREEN_FILAMENT_LOADING=148, DGUSLCD_SCREEN_FILAMENT_LOADING = 148,
DGUSLCD_SCREEN_FILAMENT_UNLOADING=158, DGUSLCD_SCREEN_FILAMENT_UNLOADING = 158,
DGUSLCD_SCREEN_SDPRINTTUNE = 170, DGUSLCD_SCREEN_SDPRINTTUNE = 170,
DGUSLCD_SCREEN_CONFIRM = 240, DGUSLCD_SCREEN_CONFIRM = 240,
DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")

2
Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.cpp

@ -42,6 +42,8 @@
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
static ExtUI::FileList filelist;
void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) {
uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file;
if (touched_nr > filelist.count()) return; if (touched_nr > filelist.count()) return;

Loading…
Cancel
Save