Browse Source

fix: added saving filename to eeprom which was removed by accident

PavelSindler 7 năm trước cách đây
mục cha
commit
2cbd1f7894
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      Firmware/ultralcd.cpp

+ 4 - 0
Firmware/ultralcd.cpp

@@ -6195,6 +6195,10 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
   }
   if (result) {
 
+	  for (int i = 0; i < 8; i++) {
+		  eeprom_write_byte((uint8_t*)EEPROM_FILENAME + i, filename[i]);
+	  }
+
 	  uint8_t depth = (uint8_t)card.getWorkDirDepth();
 
 	  for (uint8_t i = 0; i < depth; i++) {