Merge to 3.0.12-9 part 2

This commit is contained in:
3d-gussner 2017-10-04 10:38:08 +02:00 committed by GitHub
parent 1b4f4654e1
commit 5d2c256b07
15 changed files with 5025 additions and 4657 deletions

View File

@ -5,7 +5,7 @@
#include "Configuration_prusa.h" #include "Configuration_prusa.h"
// Firmware version // Firmware version
#define FW_version "3.0.12-7" #define FW_version "3.0.12-9"
#define FW_PRUSA3D_MAGIC "PRUSA3DFW" #define FW_PRUSA3D_MAGIC "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10 #define FW_PRUSA3D_MAGIC_LEN 10
@ -51,7 +51,7 @@
#define EEPROM_XYZ_CAL_SKEW (EEPROM_SD_SORT - 4) #define EEPROM_XYZ_CAL_SKEW (EEPROM_SD_SORT - 4)
#define EEPROM_WIZARD_ACTIVE (EEPROM_XYZ_CAL_SKEW - 1) #define EEPROM_WIZARD_ACTIVE (EEPROM_XYZ_CAL_SKEW - 1)
// addition for PJR amendment // addition for hyperfine tuning
#define EEPROM_BED_CORRECTION_FRONT_LEFT (EEPROM_WIZARD_ACTIVE - 1) #define EEPROM_BED_CORRECTION_FRONT_LEFT (EEPROM_WIZARD_ACTIVE - 1)
#define EEPROM_BED_CORRECTION_FRONT_RIGHT (EEPROM_BED_CORRECTION_FRONT_LEFT - 1) #define EEPROM_BED_CORRECTION_FRONT_RIGHT (EEPROM_BED_CORRECTION_FRONT_LEFT - 1)
#define EEPROM_BED_CORRECTION_REAR_RIGHT (EEPROM_BED_CORRECTION_FRONT_RIGHT - 1) #define EEPROM_BED_CORRECTION_REAR_RIGHT (EEPROM_BED_CORRECTION_FRONT_RIGHT - 1)

View File

@ -261,13 +261,15 @@
#define SD_SORT_ALPHA 1 #define SD_SORT_ALPHA 1
#define SD_SORT_NONE 2 #define SD_SORT_NONE 2
#define SDSORT_LIMIT 20 // Maximum number of sorted items (10-256). #define SDSORT_LIMIT 100 // Maximum number of sorted items (10-256).
#define FOLDER_SORTING -1 // -1=above 0=none 1=below #define FOLDER_SORTING -1 // -1=above 0=none 1=below
#define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code. #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M34 g-code.
#define SDSORT_USES_RAM true // Pre-allocate a static array for faster pre-sorting. #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
#define SDSORT_USES_STACK true // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.) #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
#define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option. #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
#define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use! #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
// #define SDSORT_QUICKSORT
#endif #endif
#if defined(SDCARD_SORT_ALPHA) #if defined(SDCARD_SORT_ALPHA)

View File

@ -498,6 +498,8 @@ unsigned long chdkHigh = 0;
boolean chdkActive = false; boolean chdkActive = false;
#endif #endif
static int saved_feedmultiply_mm = 100;
//=========================================================================== //===========================================================================
//=============================Routines====================================== //=============================Routines======================================
//=========================================================================== //===========================================================================
@ -1097,8 +1099,6 @@ void setup()
tp_init(); // Initialize temperature loop tp_init(); // Initialize temperature loop
plan_init(); // Initialize planner; plan_init(); // Initialize planner;
watchdog_init(); watchdog_init();
lcd_print_at_PGM(0, 1, PSTR(" Original Prusa ")); // we need to do this again for some reason, no time to research
lcd_print_at_PGM(0, 2, PSTR(" 3D Printers "));
st_init(); // Initialize stepper, this enables interrupts! st_init(); // Initialize stepper, this enables interrupts!
setup_photpin(); setup_photpin();
servo_init(); servo_init();
@ -1195,6 +1195,8 @@ void setup()
card.ToshibaFlashAir_enable(eeprom_read_byte((unsigned char*)EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY) == 1); card.ToshibaFlashAir_enable(eeprom_read_byte((unsigned char*)EEPROM_TOSHIBA_FLASH_AIR_COMPATIBLITY) == 1);
// Force SD card update. Otherwise the SD card update is done from loop() on card.checkautostart(false), // Force SD card update. Otherwise the SD card update is done from loop() on card.checkautostart(false),
// but this times out if a blocking dialog is shown in setup(). // but this times out if a blocking dialog is shown in setup().
lcd_print_at_PGM(0, 1, PSTR(" Original Prusa ")); // we need to do this again for some reason, no time to research
lcd_print_at_PGM(0, 2, PSTR(" 3D Printers "));
card.initsd(); card.initsd();
if (eeprom_read_dword((uint32_t*)(EEPROM_TOP - 4)) == 0x0ffffffff && if (eeprom_read_dword((uint32_t*)(EEPROM_TOP - 4)) == 0x0ffffffff &&
@ -5021,12 +5023,20 @@ Sigma_Exit:
SERIAL_ECHOLN(""); SERIAL_ECHOLN("");
}break; }break;
#endif #endif
case 220: // M220 S<factor in percent>- set speed factor override percentage case 220: // M220 S<factor in percent>- set speed factor override percentage
{ {
if (code_seen('B')) //backup current speed factor
{
saved_feedmultiply_mm = feedmultiply;
}
if(code_seen('S')) if(code_seen('S'))
{ {
feedmultiply = code_value() ; feedmultiply = code_value() ;
} }
if (code_seen('R')) { //restore previous feedmultiply
feedmultiply = saved_feedmultiply_mm;
}
} }
break; break;
case 221: // M221 S<factor in percent>- set extrude factor override percentage case 221: // M221 S<factor in percent>- set extrude factor override percentage
@ -6045,14 +6055,52 @@ void ClearToSend()
SERIAL_PROTOCOLLNRPGM(MSG_OK); SERIAL_PROTOCOLLNRPGM(MSG_OK);
} }
update_currents() {
float current_high[3] = DEFAULT_PWM_MOTOR_CURRENT_LOUD;
float current_low[3] = DEFAULT_PWM_MOTOR_CURRENT;
float tmp_motor[3];
//SERIAL_ECHOLNPGM("Currents updated: ");
if (destination[Z_AXIS] < Z_SILENT) {
//SERIAL_ECHOLNPGM("LOW");
for (uint8_t i = 0; i < 3; i++) {
digipot_current(i, current_low[i]);
/*MYSERIAL.print(int(i));
SERIAL_ECHOPGM(": ");
MYSERIAL.println(current_low[i]);*/
}
}
else if (destination[Z_AXIS] > Z_HIGH_POWER) {
//SERIAL_ECHOLNPGM("HIGH");
for (uint8_t i = 0; i < 3; i++) {
digipot_current(i, current_high[i]);
/*MYSERIAL.print(int(i));
SERIAL_ECHOPGM(": ");
MYSERIAL.println(current_high[i]);*/
}
}
else {
for (uint8_t i = 0; i < 3; i++) {
float q = current_low[i] - Z_SILENT*((current_high[i] - current_low[i]) / (Z_HIGH_POWER - Z_SILENT));
tmp_motor[i] = ((current_high[i] - current_low[i]) / (Z_HIGH_POWER - Z_SILENT))*destination[Z_AXIS] + q;
digipot_current(i, tmp_motor[i]);
/*MYSERIAL.print(int(i));
SERIAL_ECHOPGM(": ");
MYSERIAL.println(tmp_motor[i]);*/
}
}
}
void get_coordinates() void get_coordinates()
{ {
bool seen[4]={false,false,false,false}; bool seen[4]={false,false,false,false};
for(int8_t i=0; i < NUM_AXIS; i++) { for(int8_t i=0; i < NUM_AXIS; i++) {
if(code_seen(axis_codes[i])) if(code_seen(axis_codes[i]))
{ {
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i]; destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
seen[i]=true; seen[i]=true;
if (i == Z_AXIS && SilentModeMenu == 2) update_currents();
} }
else destination[i] = current_position[i]; //Are these else lines really needed? else destination[i] = current_position[i]; //Are these else lines really needed?
} }

View File

@ -1113,21 +1113,28 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
int16_t n; int16_t n;
// if not a directory file or miss-positioned return an error // if not a directory file or miss-positioned return an error
if (!isDir() || (0X1F & curPosition_)) return -1; if (!isDir() || (0X1F & curPosition_)) {
return -1;
}
//If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly. //If we have a longFilename buffer, mark it as invalid. If we find a long filename it will be filled automaticly.
if (longFilename != NULL) if (longFilename != NULL)
{ {
longFilename[0] = '\0'; longFilename[0] = '\0';
} }
while (1) { while (1) {
n = read(dir, sizeof(dir_t)); n = read(dir, sizeof(dir_t));
if (n != sizeof(dir_t)) return n == 0 ? 0 : -1; if (n != sizeof(dir_t)) return n == 0 ? 0 : -1;
// last entry if DIR_NAME_FREE // last entry if DIR_NAME_FREE
if (dir->name[0] == DIR_NAME_FREE) return 0; if (dir->name[0] == DIR_NAME_FREE) {
return 0;
SERIAL_ECHOLNPGM("DIR_NAME_FREE");
}
// skip empty entries and entry for . and .. // skip empty entries and entry for . and ..
if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') continue; if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') {
continue;
}
//Fill the long filename if we have a long filename entry, //Fill the long filename if we have a long filename entry,
// long filename entries are stored before the actual filename. // long filename entries are stored before the actual filename.
if (DIR_IS_LONG_NAME(dir) && longFilename != NULL) if (DIR_IS_LONG_NAME(dir) && longFilename != NULL)
@ -1152,8 +1159,9 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
longFilename[n+11] = VFAT->name3[0]; longFilename[n+11] = VFAT->name3[0];
longFilename[n+12] = VFAT->name3[1]; longFilename[n+12] = VFAT->name3[1];
//If this VFAT entry is the last one, add a NUL terminator at the end of the string //If this VFAT entry is the last one, add a NUL terminator at the end of the string
if (VFAT->sequenceNumber & 0x40) if (VFAT->sequenceNumber & 0x40) {
longFilename[n+13] = '\0'; longFilename[n + 13] = '\0';
}
} }
} }
// return if normal file or subdirectory // return if normal file or subdirectory

View File

@ -306,6 +306,7 @@ class SdBaseFile {
*/ */
bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);} bool seekEnd(int32_t offset = 0) {return seekSet(fileSize_ + offset);}
bool seekSet(uint32_t pos); bool seekSet(uint32_t pos);
//bool setCluster(uint32_t clust);
bool sync(); bool sync();
bool timestamp(SdBaseFile* file); bool timestamp(SdBaseFile* file);
bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day,

View File

@ -59,6 +59,33 @@ char *createFilename(char *buffer,const dir_t &p) //buffer>12characters
} }
void CardReader::lsDive_pointer(const char *prepend, SdFile parent, const char * const match) {
dir_t p;
uint8_t cnt = 0;
//parent.seekSet =
// Read the next entry from a directory
//SERIAL_ECHOPGM("Cur pos before.: ");
//uint32_t pom = parent.curPosition();
//MYSERIAL.println(pom, 10);
parent.readDir(p, longFilename);
//SERIAL_ECHOPGM("Cur pos.: ");
//pom = parent.curPosition();
//MYSERIAL.println(pom, 10);
uint8_t pn0 = p.name[0];
filenameIsDir = DIR_IS_SUBDIR(&p);
createFilename(filename, p);
creationDate = p.creationDate;
creationTime = p.creationTime;
}
/** /**
* Dive into a folder and recurse depth-first to perform a pre-set operation lsAction: * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
* LS_Count - Add +1 to nrFiles for every file within the parent * LS_Count - Add +1 to nrFiles for every file within the parent
@ -133,27 +160,18 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
break; break;
case LS_GetFilename: case LS_GetFilename:
//SERIAL_ECHOPGM("File: ");
createFilename(filename, p); createFilename(filename, p);
/*MYSERIAL.println(filename); cluster = parent.curCluster();
SERIAL_ECHOPGM("Write date: "); position = parent.curPosition();
writeDate = p.lastWriteDate;
MYSERIAL.println(writeDate);
writeTime = p.lastWriteTime;
SERIAL_ECHOPGM("Creation date: ");
MYSERIAL.println(p.creationDate);
SERIAL_ECHOPGM("Access date: ");
MYSERIAL.println(p.lastAccessDate);
SERIAL_ECHOLNPGM("");*/
creationDate = p.creationDate; creationDate = p.creationDate;
creationTime = p.creationTime; creationTime = p.creationTime;
//writeDate = p.lastAccessDate;
if (match != NULL) { if (match != NULL) {
if (strcasecmp(match, filename) == 0) return; if (strcasecmp(match, filename) == 0) return;
} }
else if (cnt == nrFiles) return; else if (cnt == nrFiles) {
return;
}
cnt++; cnt++;
break; break;
} }
@ -640,6 +658,16 @@ void CardReader::getfilename(uint16_t nr, const char * const match/*=NULL*/)
} }
void CardReader::getfilename_simple(uint32_t position, const char * const match/*=NULL*/)
{
curDir = &workDir;
lsAction = LS_GetFilename;
nrFiles = 0;
curDir->seekSet(position);
lsDive("", *curDir, match);
}
uint16_t CardReader::getnrfilenames() uint16_t CardReader::getnrfilenames()
{ {
curDir=&workDir; curDir=&workDir;
@ -702,6 +730,45 @@ void CardReader::getfilename_sorted(const uint16_t nr) {
); );
} }
#ifdef SDSORT_QUICKSORT
void CardReader::swap(uint8_t left, uint8_t right) {
uint8_t tmp = sort_order[right];
sort_order[right] = sort_order[left];
sort_order[left] = tmp;
}
void CardReader::quicksort(uint8_t left, uint8_t right) {
if (left < right) {
char name_left[LONG_FILENAME_LENGTH + 1];
char name_i[LONG_FILENAME_LENGTH + 1];
uint16_t creation_time_left;
uint16_t creation_date_left;
uint8_t boundary = left;
for (uint8_t i = left+1; i < right; i++) {
uint8_t o_left = sort_order[left];
uint8_t o_i = sort_order[i];
getfilename_simple(positions[o_left]);
strcpy(name_left, LONGEST_FILENAME); // save (or getfilename below will trounce it)
creation_date_left = creationDate;
creation_time_left = creationTime;
getfilename_simple(positions[o_i]);
strcpy(name_i, LONGEST_FILENAME);
if (strcasecmp(name_left, name_i) > 0) {
swap(i, ++boundary);
}
}
swap(left, boundary);
quicksort(left, boundary);
quicksort(boundary + 1, right);
}
}
#endif //SDSORT_QUICKSORT
/** /**
* Read all the files and produce a sort key * Read all the files and produce a sort key
* *
@ -711,21 +778,15 @@ void CardReader::getfilename_sorted(const uint16_t nr) {
* - Most RAM: Buffer the directory and return filenames from RAM * - Most RAM: Buffer the directory and return filenames from RAM
*/ */
void CardReader::presort() { void CardReader::presort() {
if (farm_mode || IS_SD_INSERTED == false) return; //sorting is not used in farm mode
if (farm_mode) return; //sorting is not used in farm mode
uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT); uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
if (sdSort == SD_SORT_NONE) return; //sd sort is turned off if (sdSort == SD_SORT_NONE) return; //sd sort is turned off
#if !SDSORT_USES_RAM
lcd_set_progress();
#endif
lcd_implementation_clear();
lcd_print_at_PGM(0, 1, MSG_SORTING);
#if SDSORT_GCODE #if SDSORT_GCODE
if (!sort_alpha) return; if (!sort_alpha) return;
#endif #endif
KEEPALIVE_STATE(IN_HANDLER);
// Throw away old sort index // Throw away old sort index
flush_presort(); flush_presort();
@ -735,7 +796,15 @@ void CardReader::presort() {
// Never sort more than the max allowed // Never sort more than the max allowed
// If you use folders to organize, 20 may be enough // If you use folders to organize, 20 may be enough
if (fileCnt > SDSORT_LIMIT) fileCnt = SDSORT_LIMIT; if (fileCnt > SDSORT_LIMIT) {
lcd_show_fullscreen_message_and_wait_P(MSG_FILE_CNT);
fileCnt = SDSORT_LIMIT;
}
lcd_implementation_clear();
#if !SDSORT_USES_RAM
lcd_set_progress();
#endif
lcd_print_at_PGM(0, 1, MSG_SORTING);
// Sort order is always needed. May be static or dynamic. // Sort order is always needed. May be static or dynamic.
#if SDSORT_DYNAMIC_RAM #if SDSORT_DYNAMIC_RAM
@ -754,8 +823,9 @@ void CardReader::presort() {
#endif #endif
#elif SDSORT_USES_STACK #elif SDSORT_USES_STACK
char sortnames[fileCnt][LONG_FILENAME_LENGTH]; char sortnames[fileCnt][LONG_FILENAME_LENGTH];
uint16_t creation_time[SDSORT_LIMIT]; uint16_t creation_time[fileCnt];
uint16_t creation_date[SDSORT_LIMIT]; uint16_t creation_date[fileCnt];
#endif #endif
// Folder sorting needs 1 bit per entry for flags. // Folder sorting needs 1 bit per entry for flags.
@ -769,6 +839,8 @@ void CardReader::presort() {
#else // !SDSORT_USES_RAM #else // !SDSORT_USES_RAM
uint32_t positions[fileCnt];
// By default re-read the names from SD for every compare // By default re-read the names from SD for every compare
// retaining only two filenames at a time. This is very // retaining only two filenames at a time. This is very
// slow but is safest and uses minimal RAM. // slow but is safest and uses minimal RAM.
@ -777,11 +849,16 @@ void CardReader::presort() {
uint16_t creation_date_bckp; uint16_t creation_date_bckp;
#endif #endif
position = 0;
if (fileCnt > 1) { if (fileCnt > 1) {
// Init sort order. // Init sort order.
for (uint16_t i = 0; i < fileCnt; i++) { for (uint16_t i = 0; i < fileCnt; i++) {
manage_heater();
sort_order[i] = i; sort_order[i] = i;
positions[i] = position;
getfilename(i);
// If using RAM then read all filenames now. // If using RAM then read all filenames now.
#if SDSORT_USES_RAM #if SDSORT_USES_RAM
getfilename(i); getfilename(i);
@ -812,64 +889,72 @@ void CardReader::presort() {
#endif #endif
#endif #endif
} }
// Bubble Sort
uint16_t counter = 0; #ifdef QUICKSORT
quicksort(0, fileCnt - 1);
#else //Qicksort not defined, use Bubble Sort
uint32_t counter = 0;
uint16_t total = 0.5*(fileCnt-1)*(fileCnt);
// Compare names from the array or just the two buffered names
#if SDSORT_USES_RAM
#define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0)
#define _SORT_CMP_TIME_NODIR() (((creation_date[o1] == creation_date[o2]) && (creation_time[o1] < creation_time[o2])) || \
(creation_date[o1] < creation_date [o2]))
#else
#define _SORT_CMP_NODIR() (strcasecmp(name1, name2) > 0) //true if lowercase(name1) > lowercase(name2)
#define _SORT_CMP_TIME_NODIR() (((creation_date_bckp == creationDate) && (creation_time_bckp > creationTime)) || \
(creation_date_bckp > creationDate))
#endif
#if HAS_FOLDER_SORTING
#if SDSORT_USES_RAM
// Folder sorting needs an index and bit to test for folder-ness.
const uint8_t ind1 = o1 >> 3, bit1 = o1 & 0x07,
ind2 = o2 >> 3, bit2 = o2 & 0x07;
#define _SORT_CMP_DIR(fs) \
(((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
? _SORT_CMP_NODIR() \
: (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
#define _SORT_CMP_TIME_DIR(fs) \
(((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
? _SORT_CMP_TIME_NODIR() \
: (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
#else
#define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? dir1 : !dir1))
#define _SORT_CMP_TIME_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_TIME_NODIR() : (fs < 0 ? dir1 : !dir1))
#endif
#endif
for (uint16_t i = fileCnt; --i;) { for (uint16_t i = fileCnt; --i;) {
bool didSwap = false; bool didSwap = false;
#if !SDSORT_USES_RAM //show progresss bar only if slow sorting method is used #if !SDSORT_USES_RAM //show progresss bar only if slow sorting method is used
int8_t percent = ((counter * 100) / (fileCnt-1)); int8_t percent = (counter * 100) / total;//((counter * 100) / pow((fileCnt-1),2));
for (int column = 0; column < 20; column++) { for (int column = 0; column < 20; column++) {
if (column < (percent/5)) lcd_implementation_print_at(column, 2, "\x01"); //simple progress bar if (column < (percent/5)) lcd_implementation_print_at(column, 2, "\x01"); //simple progress bar
} }
counter++;
#endif #endif
//MYSERIAL.println(int(i)); //MYSERIAL.println(int(i));
for (uint16_t j = 0; j < i; ++j) { for (uint16_t j = 0; j < i; ++j) {
manage_heater();
const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1]; const uint16_t o1 = sort_order[j], o2 = sort_order[j + 1];
// Compare names from the array or just the two buffered names
#if SDSORT_USES_RAM
#define _SORT_CMP_NODIR() (strcasecmp(sortnames[o1], sortnames[o2]) > 0)
#define _SORT_CMP_TIME_NODIR() (((creation_date[o1] == creation_date[o2]) && (creation_time[o1] < creation_time[o2])) || \
(creation_date[o1] < creation_date [o2]))
#else
#define _SORT_CMP_NODIR() (strcasecmp(name1, name2) > 0) //true if lowercase(name1) > lowercase(name2)
#define _SORT_CMP_TIME_NODIR() (((creation_date_bckp == creationDate) && (creation_time_bckp < creationTime)) || \
(creation_date_bckp < creationDate))
#endif
#if HAS_FOLDER_SORTING
#if SDSORT_USES_RAM
// Folder sorting needs an index and bit to test for folder-ness.
const uint8_t ind1 = o1 >> 3, bit1 = o1 & 0x07,
ind2 = o2 >> 3, bit2 = o2 & 0x07;
#define _SORT_CMP_DIR(fs) \
(((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
? _SORT_CMP_NODIR() \
: (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
#define _SORT_CMP_TIME_DIR(fs) \
(((isDir[ind1] & _BV(bit1)) != 0) == ((isDir[ind2] & _BV(bit2)) != 0) \
? _SORT_CMP_TIME_NODIR() \
: (isDir[fs > 0 ? ind1 : ind2] & (fs > 0 ? _BV(bit1) : _BV(bit2))) != 0)
#else
#define _SORT_CMP_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_NODIR() : (fs > 0 ? dir1 : !dir1))
#define _SORT_CMP_TIME_DIR(fs) ((dir1 == filenameIsDir) ? _SORT_CMP_TIME_NODIR() : (fs > 0 ? dir1 : !dir1))
#endif
#endif
// The most economical method reads names as-needed // The most economical method reads names as-needed
// throughout the loop. Slow if there are many. // throughout the loop. Slow if there are many.
#if !SDSORT_USES_RAM #if !SDSORT_USES_RAM
counter++;
getfilename(o1); getfilename_simple(positions[o1]);
strcpy(name1, LONGEST_FILENAME); // save (or getfilename below will trounce it) strcpy(name1, LONGEST_FILENAME); // save (or getfilename below will trounce it)
creation_date_bckp = creationDate; creation_date_bckp = creationDate;
creation_time_bckp = creationTime; creation_time_bckp = creationTime;
#if HAS_FOLDER_SORTING #if HAS_FOLDER_SORTING
bool dir1 = filenameIsDir; bool dir1 = filenameIsDir;
#endif #endif
getfilename(o2); getfilename_simple(positions[o2]);
char *name2 = LONGEST_FILENAME; // use the string in-place char *name2 = LONGEST_FILENAME; // use the string in-place
#endif // !SDSORT_USES_RAM #endif // !SDSORT_USES_RAM
@ -886,12 +971,11 @@ void CardReader::presort() {
sort_order[j] = o2; sort_order[j] = o2;
sort_order[j + 1] = o1; sort_order[j + 1] = o1;
didSwap = true; didSwap = true;
//SERIAL_ECHOLNPGM("did swap");
} }
} }
if (!didSwap) break; if (!didSwap) break;
} //end of bubble sort loop } //end of bubble sort loop
#endif
// Using RAM but not keeping names around // Using RAM but not keeping names around
#if (SDSORT_USES_RAM && !SDSORT_CACHE_NAMES) #if (SDSORT_USES_RAM && !SDSORT_CACHE_NAMES)
#if SDSORT_DYNAMIC_RAM #if SDSORT_DYNAMIC_RAM
@ -922,12 +1006,15 @@ void CardReader::presort() {
sort_count = fileCnt; sort_count = fileCnt;
} }
#if !SDSORT_USES_RAM //show progresss bar only if slow sorting method is used #if !SDSORT_USES_RAM //show progress bar only if slow sorting method is used
for(int column = 0; column <=19; column++ ) lcd_implementation_print_at(column, 2, "\x01"); //simple progress bar for (int column = 0; column <= 19; column++) lcd_implementation_print_at(column, 2, "\x01"); //simple progress bar
delay(500); delay(300);
lcd_set_arrows(); lcd_set_degree();
lcd_implementation_clear();
lcd_update(2); lcd_update(2);
#endif #endif
KEEPALIVE_STATE(NOT_BUSY);
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
} }
void CardReader::flush_presort() { void CardReader::flush_presort() {

View File

@ -32,6 +32,7 @@ public:
void printingHasFinished(); void printingHasFinished();
void getfilename(uint16_t nr, const char* const match=NULL); void getfilename(uint16_t nr, const char* const match=NULL);
void getfilename_simple(uint32_t position, const char * const match=NULL);
uint16_t getnrfilenames(); uint16_t getnrfilenames();
void getAbsFilename(char *t); void getAbsFilename(char *t);
@ -44,6 +45,10 @@ public:
#ifdef SDCARD_SORT_ALPHA #ifdef SDCARD_SORT_ALPHA
void presort(); void presort();
#ifdef SDSORT_QUICKSORT
void swap(uint8_t left, uint8_t right);
void quicksort(uint8_t left, uint8_t right);
#endif //SDSORT_QUICKSORT
void getfilename_sorted(const uint16_t nr); void getfilename_sorted(const uint16_t nr);
#if SDSORT_GCODE #if SDSORT_GCODE
FORCE_INLINE void setSortOn(bool b) { sort_alpha = b; presort(); } FORCE_INLINE void setSortOn(bool b) { sort_alpha = b; presort(); }
@ -70,6 +75,7 @@ public:
bool cardOK ; bool cardOK ;
char filename[13]; char filename[13];
uint16_t creationTime, creationDate; uint16_t creationTime, creationDate;
uint32_t cluster, position;
char longFilename[LONG_FILENAME_LENGTH]; char longFilename[LONG_FILENAME_LENGTH];
bool filenameIsDir; bool filenameIsDir;
int lastnr; //last number of the autostart; int lastnr; //last number of the autostart;
@ -142,7 +148,7 @@ private:
int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory. int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
char* diveDirName; char* diveDirName;
void lsDive(const char *prepend, SdFile parent, const char * const match=NULL); void lsDive(const char *prepend, SdFile parent, const char * const match=NULL);
void lsDive_pointer(const char *prepend, SdFile parent, const char * const match = NULL);
#ifdef SDCARD_SORT_ALPHA #ifdef SDCARD_SORT_ALPHA
void flush_presort(); void flush_presort();
#endif #endif

View File

@ -63,6 +63,17 @@ const char * const MSG_AUTO_HOME_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_AUTO_HOME_DE MSG_AUTO_HOME_DE
}; };
const char MSG_AUTO_MODE_ON_EN[] PROGMEM = "Mode [auto power]";
const char MSG_AUTO_MODE_ON_DE[] PROGMEM = "Mode[Automatisch]";
const char * const MSG_AUTO_MODE_ON_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_AUTO_MODE_ON_EN,
MSG_AUTO_MODE_ON_EN,
MSG_AUTO_MODE_ON_EN,
MSG_AUTO_MODE_ON_EN,
MSG_AUTO_MODE_ON_EN,
MSG_AUTO_MODE_ON_DE
};
const char MSG_A_RETRACT_EN[] PROGMEM = "A-retract"; const char MSG_A_RETRACT_EN[] PROGMEM = "A-retract";
const char * const MSG_A_RETRACT_LANG_TABLE[1] PROGMEM = { const char * const MSG_A_RETRACT_LANG_TABLE[1] PROGMEM = {
MSG_A_RETRACT_EN MSG_A_RETRACT_EN
@ -1119,9 +1130,26 @@ const char * const MSG_FILAMENT_LOADING_T3_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_FILAMENT_LOADING_T3_DE MSG_FILAMENT_LOADING_T3_DE
}; };
const char MSG_FILE_CNT_EN[] PROGMEM = "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100.";
const char MSG_FILE_CNT_DE[] PROGMEM = "Einige Dateien werden nicht sortiert, da das max. 100 Dateien pro Ordner ist.";
const char * const MSG_FILE_CNT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_FILE_CNT_EN,
MSG_FILE_CNT_EN,
MSG_FILE_CNT_EN,
MSG_FILE_CNT_EN,
MSG_FILE_CNT_EN,
MSG_FILE_CNT_DE
};
const char MSG_FILE_INCOMPLETE_EN[] PROGMEM = "File incomplete. Continue anyway?"; const char MSG_FILE_INCOMPLETE_EN[] PROGMEM = "File incomplete. Continue anyway?";
const char * const MSG_FILE_INCOMPLETE_LANG_TABLE[1] PROGMEM = { const char MSG_FILE_INCOMPLETE_DE[] PROGMEM = "Datei unvollstaedig. Trotzdem weiter machen?";
MSG_FILE_INCOMPLETE_EN const char * const MSG_FILE_INCOMPLETE_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_FILE_INCOMPLETE_EN,
MSG_FILE_INCOMPLETE_EN,
MSG_FILE_INCOMPLETE_EN,
MSG_FILE_INCOMPLETE_EN,
MSG_FILE_INCOMPLETE_EN,
MSG_FILE_INCOMPLETE_DE
}; };
const char MSG_FILE_PRINTED_EN[] PROGMEM = "Done printing file"; const char MSG_FILE_PRINTED_EN[] PROGMEM = "Done printing file";
@ -2080,7 +2108,7 @@ const char * const MSG_PID_FINISHED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PID_FINISHED_DE MSG_PID_FINISHED_DE
}; };
const char MSG_PID_RUNNING_EN[] PROGMEM = "PID cal. "; const char MSG_PID_RUNNING_EN[] PROGMEM = "PID cal. ";
const char MSG_PID_RUNNING_CZ[] PROGMEM = "PID kal. "; const char MSG_PID_RUNNING_CZ[] PROGMEM = "PID kal. ";
const char MSG_PID_RUNNING_IT[] PROGMEM = "Cal. PID"; const char MSG_PID_RUNNING_IT[] PROGMEM = "Cal. PID";
const char MSG_PID_RUNNING_ES[] PROGMEM = "Cal. PID "; const char MSG_PID_RUNNING_ES[] PROGMEM = "Cal. PID ";
@ -2131,13 +2159,25 @@ const char * const MSG_PLANNER_BUFFER_BYTES_LANG_TABLE[1] PROGMEM = {
}; };
const char MSG_PLA_FILAMENT_LOADED_EN[] PROGMEM = "Is PLA filament loaded?"; const char MSG_PLA_FILAMENT_LOADED_EN[] PROGMEM = "Is PLA filament loaded?";
const char * const MSG_PLA_FILAMENT_LOADED_LANG_TABLE[1] PROGMEM = { const char MSG_PLA_FILAMENT_LOADED_DE[] PROGMEM = "Ist PLA Filament geladen?";
MSG_PLA_FILAMENT_LOADED_EN const char * const MSG_PLA_FILAMENT_LOADED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PLA_FILAMENT_LOADED_EN,
MSG_PLA_FILAMENT_LOADED_EN,
MSG_PLA_FILAMENT_LOADED_EN,
MSG_PLA_FILAMENT_LOADED_EN,
MSG_PLA_FILAMENT_LOADED_EN,
MSG_PLA_FILAMENT_LOADED_DE
}; };
const char MSG_PLEASE_LOAD_PLA_EN[] PROGMEM = "Please load PLA filament first."; const char MSG_PLEASE_LOAD_PLA_EN[] PROGMEM = "Please load PLA filament first.";
const char * const MSG_PLEASE_LOAD_PLA_LANG_TABLE[1] PROGMEM = { const char MSG_PLEASE_LOAD_PLA_DE[] PROGMEM = "Bitte lade erst PLA filament.";
MSG_PLEASE_LOAD_PLA_EN const char * const MSG_PLEASE_LOAD_PLA_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_PLEASE_LOAD_PLA_EN,
MSG_PLEASE_LOAD_PLA_EN,
MSG_PLEASE_LOAD_PLA_EN,
MSG_PLEASE_LOAD_PLA_EN,
MSG_PLEASE_LOAD_PLA_EN,
MSG_PLEASE_LOAD_PLA_DE
}; };
const char MSG_PLEASE_WAIT_EN[] PROGMEM = "Please wait"; const char MSG_PLEASE_WAIT_EN[] PROGMEM = "Please wait";
@ -3051,8 +3091,14 @@ const char * const MSG_SPEED_LANG_TABLE[LANG_NUM] PROGMEM = {
}; };
const char MSG_STACK_ERROR_EN[] PROGMEM = "Error - static memory has been overwritten"; const char MSG_STACK_ERROR_EN[] PROGMEM = "Error - static memory has been overwritten";
const char * const MSG_STACK_ERROR_LANG_TABLE[1] PROGMEM = { const char MSG_STACK_ERROR_DE[] PROGMEM = "Error - EEPROM wurde ueberschrieben";
MSG_STACK_ERROR_EN const char * const MSG_STACK_ERROR_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_STACK_ERROR_EN,
MSG_STACK_ERROR_EN,
MSG_STACK_ERROR_EN,
MSG_STACK_ERROR_EN,
MSG_STACK_ERROR_EN,
MSG_STACK_ERROR_DE
}; };
const char MSG_STATISTICS_EN[] PROGMEM = "Statistics "; const char MSG_STATISTICS_EN[] PROGMEM = "Statistics ";
@ -3490,8 +3536,14 @@ const char * const MSG_USERWAIT_LANG_TABLE[LANG_NUM] PROGMEM = {
}; };
const char MSG_V2_CALIBRATION_EN[] PROGMEM = "First layer cal."; const char MSG_V2_CALIBRATION_EN[] PROGMEM = "First layer cal.";
const char * const MSG_V2_CALIBRATION_LANG_TABLE[1] PROGMEM = { const char MSG_V2_CALIBRATION_DE[] PROGMEM = "Erste Layer Kal.";
MSG_V2_CALIBRATION_EN const char * const MSG_V2_CALIBRATION_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_V2_CALIBRATION_EN,
MSG_V2_CALIBRATION_EN,
MSG_V2_CALIBRATION_EN,
MSG_V2_CALIBRATION_EN,
MSG_V2_CALIBRATION_EN,
MSG_V2_CALIBRATION_DE
}; };
const char MSG_VMIN_EN[] PROGMEM = "Vmin"; const char MSG_VMIN_EN[] PROGMEM = "Vmin";
@ -3550,103 +3602,223 @@ const char * const MSG_WATCHDOG_RESET_LANG_TABLE[1] PROGMEM = {
}; };
const char MSG_WIZARD_EN[] PROGMEM = "Wizard"; const char MSG_WIZARD_EN[] PROGMEM = "Wizard";
const char * const MSG_WIZARD_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_DE[] PROGMEM = "Assistent";
MSG_WIZARD_EN const char * const MSG_WIZARD_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_EN,
MSG_WIZARD_EN,
MSG_WIZARD_EN,
MSG_WIZARD_EN,
MSG_WIZARD_EN,
MSG_WIZARD_DE
}; };
const char MSG_WIZARD_CALIBRATION_FAILED_EN[] PROGMEM = "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer."; const char MSG_WIZARD_CALIBRATION_FAILED_EN[] PROGMEM = "Please check our handbook and fix the problem. Then resume the Wizard by rebooting the printer.";
const char * const MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_CALIBRATION_FAILED_DE[] PROGMEM = "Lese das Handbuch um das Problem zu beheben. Danach den Drucker neustarten und mit dem Assisenten fortzusetzen.";
MSG_WIZARD_CALIBRATION_FAILED_EN const char * const MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_CALIBRATION_FAILED_EN,
MSG_WIZARD_CALIBRATION_FAILED_EN,
MSG_WIZARD_CALIBRATION_FAILED_EN,
MSG_WIZARD_CALIBRATION_FAILED_EN,
MSG_WIZARD_CALIBRATION_FAILED_EN,
MSG_WIZARD_CALIBRATION_FAILED_DE
}; };
const char MSG_WIZARD_CLEAN_HEATBED_EN[] PROGMEM = "Please clean heatbed and then press the knob."; const char MSG_WIZARD_CLEAN_HEATBED_EN[] PROGMEM = "Please clean heatbed and then press the knob.";
const char * const MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_CLEAN_HEATBED_DE[] PROGMEM = "Bitte reinige das Bett und druecke den Knopf.";
MSG_WIZARD_CLEAN_HEATBED_EN const char * const MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_CLEAN_HEATBED_EN,
MSG_WIZARD_CLEAN_HEATBED_EN,
MSG_WIZARD_CLEAN_HEATBED_EN,
MSG_WIZARD_CLEAN_HEATBED_EN,
MSG_WIZARD_CLEAN_HEATBED_EN,
MSG_WIZARD_CLEAN_HEATBED_DE
}; };
const char MSG_WIZARD_DONE_EN[] PROGMEM = "All is done. Happy printing!"; const char MSG_WIZARD_DONE_EN[] PROGMEM = "All is done. Happy printing!";
const char * const MSG_WIZARD_DONE_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_DONE_DE[] PROGMEM = "Fertig. Happy printing!";
MSG_WIZARD_DONE_EN const char * const MSG_WIZARD_DONE_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_DONE_EN,
MSG_WIZARD_DONE_EN,
MSG_WIZARD_DONE_EN,
MSG_WIZARD_DONE_EN,
MSG_WIZARD_DONE_EN,
MSG_WIZARD_DONE_DE
}; };
const char MSG_WIZARD_FILAMENT_LOADED_EN[] PROGMEM = "Is filament loaded?"; const char MSG_WIZARD_FILAMENT_LOADED_EN[] PROGMEM = "Is filament loaded?";
const char * const MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_FILAMENT_LOADED_DE[] PROGMEM = "Filament geladen?";
MSG_WIZARD_FILAMENT_LOADED_EN const char * const MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_FILAMENT_LOADED_EN,
MSG_WIZARD_FILAMENT_LOADED_EN,
MSG_WIZARD_FILAMENT_LOADED_EN,
MSG_WIZARD_FILAMENT_LOADED_EN,
MSG_WIZARD_FILAMENT_LOADED_EN,
MSG_WIZARD_FILAMENT_LOADED_DE
}; };
const char MSG_WIZARD_HEATING_EN[] PROGMEM = "Preheating nozzle. Please wait."; const char MSG_WIZARD_HEATING_EN[] PROGMEM = "Preheating nozzle. Please wait.";
const char * const MSG_WIZARD_HEATING_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_HEATING_DE[] PROGMEM = "Vorwaermen der Duese. Bitte warten.";
MSG_WIZARD_HEATING_EN const char * const MSG_WIZARD_HEATING_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_HEATING_EN,
MSG_WIZARD_HEATING_EN,
MSG_WIZARD_HEATING_EN,
MSG_WIZARD_HEATING_EN,
MSG_WIZARD_HEATING_EN,
MSG_WIZARD_HEATING_DE
}; };
const char MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN[] PROGMEM = "Please load PLA filament and then resume Wizard by rebooting the printer."; const char MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN[] PROGMEM = "Please load PLA filament and then resume Wizard by rebooting the printer.";
const char * const MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_INSERT_CORRECT_FILAMENT_DE[] PROGMEM = "Bitte lade PLA Filament und starte den Drucker neu um den Assistenten fortzusetzen.";
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN const char * const MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN,
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN,
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN,
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN,
MSG_WIZARD_INSERT_CORRECT_FILAMENT_EN,
MSG_WIZARD_INSERT_CORRECT_FILAMENT_DE
}; };
const char MSG_WIZARD_LANGUAGE_EN[] PROGMEM = "Please choose your language"; const char MSG_WIZARD_LANGUAGE_EN[] PROGMEM = "Please choose your language";
const char * const MSG_WIZARD_LANGUAGE_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_LANGUAGE_DE[] PROGMEM = "Bitte Sprache waehlen";
MSG_WIZARD_LANGUAGE_EN const char * const MSG_WIZARD_LANGUAGE_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_LANGUAGE_EN,
MSG_WIZARD_LANGUAGE_EN,
MSG_WIZARD_LANGUAGE_EN,
MSG_WIZARD_LANGUAGE_EN,
MSG_WIZARD_LANGUAGE_EN,
MSG_WIZARD_LANGUAGE_DE
}; };
const char MSG_WIZARD_LOAD_FILAMENT_EN[] PROGMEM = "Please insert PLA filament to the extruder, then press knob to load it."; const char MSG_WIZARD_LOAD_FILAMENT_EN[] PROGMEM = "Please insert PLA filament to the extruder, then press knob to load it.";
const char * const MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_LOAD_FILAMENT_DE[] PROGMEM = "Fuehre PLA Filament in den Extruder und drueck den Knopf um dies zu laden.";
MSG_WIZARD_LOAD_FILAMENT_EN const char * const MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_LOAD_FILAMENT_EN,
MSG_WIZARD_LOAD_FILAMENT_EN,
MSG_WIZARD_LOAD_FILAMENT_EN,
MSG_WIZARD_LOAD_FILAMENT_EN,
MSG_WIZARD_LOAD_FILAMENT_EN,
MSG_WIZARD_LOAD_FILAMENT_DE
}; };
const char MSG_WIZARD_PLA_FILAMENT_EN[] PROGMEM = "Is it PLA filament?"; const char MSG_WIZARD_PLA_FILAMENT_EN[] PROGMEM = "Is it PLA filament?";
const char * const MSG_WIZARD_PLA_FILAMENT_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_PLA_FILAMENT_DE[] PROGMEM = "Ist es PLA Filament?";
MSG_WIZARD_PLA_FILAMENT_EN const char * const MSG_WIZARD_PLA_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_PLA_FILAMENT_EN,
MSG_WIZARD_PLA_FILAMENT_EN,
MSG_WIZARD_PLA_FILAMENT_EN,
MSG_WIZARD_PLA_FILAMENT_EN,
MSG_WIZARD_PLA_FILAMENT_EN,
MSG_WIZARD_PLA_FILAMENT_DE
}; };
const char MSG_WIZARD_QUIT_EN[] PROGMEM = "You can always resume the Wizard from Calibration -> Wizard."; const char MSG_WIZARD_QUIT_EN[] PROGMEM = "You can always resume the Wizard from Calibration -> Wizard.";
const char * const MSG_WIZARD_QUIT_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_QUIT_DE[] PROGMEM = "Du kannst den Assistenten immer aus Kalibrierung -> Assistent wider aufnehmen.";
MSG_WIZARD_QUIT_EN const char * const MSG_WIZARD_QUIT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_QUIT_EN,
MSG_WIZARD_QUIT_EN,
MSG_WIZARD_QUIT_EN,
MSG_WIZARD_QUIT_EN,
MSG_WIZARD_QUIT_EN,
MSG_WIZARD_QUIT_DE
}; };
const char MSG_WIZARD_REPEAT_V2_CAL_EN[] PROGMEM = "Do you want to repeat last step to readjust distance between nozzle and heatbed?"; const char MSG_WIZARD_REPEAT_V2_CAL_EN[] PROGMEM = "Do you want to repeat last step to readjust distance between nozzle and heatbed?";
const char * const MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_REPEAT_V2_CAL_DE[] PROGMEM = "Willst Du den letzten Schritt widerholen um den Abstand zwischen Duese und Bett erneut einzustellen?";
MSG_WIZARD_REPEAT_V2_CAL_EN const char * const MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_REPEAT_V2_CAL_EN,
MSG_WIZARD_REPEAT_V2_CAL_EN,
MSG_WIZARD_REPEAT_V2_CAL_EN,
MSG_WIZARD_REPEAT_V2_CAL_EN,
MSG_WIZARD_REPEAT_V2_CAL_EN,
MSG_WIZARD_REPEAT_V2_CAL_DE
}; };
const char MSG_WIZARD_RERUN_EN[] PROGMEM = "Running Wizard will delete current calibration results and start from the beginning. Continue?"; const char MSG_WIZARD_RERUN_EN[] PROGMEM = "Running Wizard will delete current calibration results and start from the beginning. Continue?";
const char * const MSG_WIZARD_RERUN_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_RERUN_DE[] PROGMEM = "Starten vom Assistenten loescht die aktuelle Kalibrierung und beginnt von vorne. Fortsetzen?";
MSG_WIZARD_RERUN_EN const char * const MSG_WIZARD_RERUN_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_RERUN_EN,
MSG_WIZARD_RERUN_EN,
MSG_WIZARD_RERUN_EN,
MSG_WIZARD_RERUN_EN,
MSG_WIZARD_RERUN_EN,
MSG_WIZARD_RERUN_DE
}; };
const char MSG_WIZARD_SELFTEST_EN[] PROGMEM = "First, I will run the selftest to check most common assembly problems."; const char MSG_WIZARD_SELFTEST_EN[] PROGMEM = "First, I will run the selftest to check most common assembly problems.";
const char * const MSG_WIZARD_SELFTEST_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_SELFTEST_DE[] PROGMEM = "Zuerst werden wir den Selbsttest durchfuehren um haeufige Montageprobleme zu ueberpruefen.";
MSG_WIZARD_SELFTEST_EN const char * const MSG_WIZARD_SELFTEST_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_SELFTEST_EN,
MSG_WIZARD_SELFTEST_EN,
MSG_WIZARD_SELFTEST_EN,
MSG_WIZARD_SELFTEST_EN,
MSG_WIZARD_SELFTEST_EN,
MSG_WIZARD_SELFTEST_DE
}; };
const char MSG_WIZARD_V2_CAL_EN[] PROGMEM = "Now I will calibrate distance between tip of the nozzle and heatbed surface."; const char MSG_WIZARD_V2_CAL_EN[] PROGMEM = "Now I will calibrate distance between tip of the nozzle and heatbed surface.";
const char * const MSG_WIZARD_V2_CAL_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_V2_CAL_DE[] PROGMEM = "Starte mit der Kalibrierung zwischen der Duese und Bett.";
MSG_WIZARD_V2_CAL_EN const char * const MSG_WIZARD_V2_CAL_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_V2_CAL_EN,
MSG_WIZARD_V2_CAL_EN,
MSG_WIZARD_V2_CAL_EN,
MSG_WIZARD_V2_CAL_EN,
MSG_WIZARD_V2_CAL_EN,
MSG_WIZARD_V2_CAL_DE
}; };
const char MSG_WIZARD_V2_CAL_2_EN[] PROGMEM = "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration."; const char MSG_WIZARD_V2_CAL_2_EN[] PROGMEM = "I will start to print line and you will gradually lower the nozzle by rotating the knob, until you reach optimal height. Check the pictures in our handbook in chapter Calibration.";
const char * const MSG_WIZARD_V2_CAL_2_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_V2_CAL_2_DE[] PROGMEM = "Starte die Kal.-Linie zu drucken, bitte drehe am Knopf bis Du die optimale Hoehe erreichst. Schaue im Handbuch unter Calibration nach.";
MSG_WIZARD_V2_CAL_2_EN const char * const MSG_WIZARD_V2_CAL_2_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_V2_CAL_2_EN,
MSG_WIZARD_V2_CAL_2_EN,
MSG_WIZARD_V2_CAL_2_EN,
MSG_WIZARD_V2_CAL_2_EN,
MSG_WIZARD_V2_CAL_2_EN,
MSG_WIZARD_V2_CAL_2_DE
}; };
const char MSG_WIZARD_WELCOME_EN[] PROGMEM = "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?"; const char MSG_WIZARD_WELCOME_EN[] PROGMEM = "Hi, I am your Original Prusa i3 printer. Would you like me to guide you through the setup process?";
const char * const MSG_WIZARD_WELCOME_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_WELCOME_DE[] PROGMEM = "Hallo, ich bin Dein Original Prusa i3 Drucker. Sollen wir mit dem Setup-Prozess beginnen?";
MSG_WIZARD_WELCOME_EN const char * const MSG_WIZARD_WELCOME_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_WELCOME_EN,
MSG_WIZARD_WELCOME_EN,
MSG_WIZARD_WELCOME_EN,
MSG_WIZARD_WELCOME_EN,
MSG_WIZARD_WELCOME_EN,
MSG_WIZARD_WELCOME_DE
}; };
const char MSG_WIZARD_WILL_PREHEAT_EN[] PROGMEM = "Now I will preheat nozzle for PLA."; const char MSG_WIZARD_WILL_PREHEAT_EN[] PROGMEM = "Now I will preheat nozzle for PLA.";
const char * const MSG_WIZARD_WILL_PREHEAT_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_WILL_PREHEAT_DE[] PROGMEM = "Waerme die Duese fuer PLA vor.";
MSG_WIZARD_WILL_PREHEAT_EN const char * const MSG_WIZARD_WILL_PREHEAT_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_WILL_PREHEAT_EN,
MSG_WIZARD_WILL_PREHEAT_EN,
MSG_WIZARD_WILL_PREHEAT_EN,
MSG_WIZARD_WILL_PREHEAT_EN,
MSG_WIZARD_WILL_PREHEAT_EN,
MSG_WIZARD_WILL_PREHEAT_DE
}; };
const char MSG_WIZARD_XYZ_CAL_EN[] PROGMEM = "I will run xyz calibration now. It will take approx. 12 mins."; const char MSG_WIZARD_XYZ_CAL_EN[] PROGMEM = "I will run xyz calibration now. It will take approx. 12 mins.";
const char * const MSG_WIZARD_XYZ_CAL_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_XYZ_CAL_DE[] PROGMEM = "Starte jetzt die XYZ-Kalibrierung. Es wird ca. 12 min. dauern.";
MSG_WIZARD_XYZ_CAL_EN const char * const MSG_WIZARD_XYZ_CAL_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_XYZ_CAL_EN,
MSG_WIZARD_XYZ_CAL_EN,
MSG_WIZARD_XYZ_CAL_EN,
MSG_WIZARD_XYZ_CAL_EN,
MSG_WIZARD_XYZ_CAL_EN,
MSG_WIZARD_XYZ_CAL_DE
}; };
const char MSG_WIZARD_Z_CAL_EN[] PROGMEM = "I will run z calibration now."; const char MSG_WIZARD_Z_CAL_EN[] PROGMEM = "I will run z calibration now.";
const char * const MSG_WIZARD_Z_CAL_LANG_TABLE[1] PROGMEM = { const char MSG_WIZARD_Z_CAL_DE[] PROGMEM = "Starte jetzt die Z-Kalibrierung.";
MSG_WIZARD_Z_CAL_EN const char * const MSG_WIZARD_Z_CAL_LANG_TABLE[LANG_NUM] PROGMEM = {
MSG_WIZARD_Z_CAL_EN,
MSG_WIZARD_Z_CAL_EN,
MSG_WIZARD_Z_CAL_EN,
MSG_WIZARD_Z_CAL_EN,
MSG_WIZARD_Z_CAL_EN,
MSG_WIZARD_Z_CAL_DE
}; };
const char MSG_XYZ_DETAILS_EN[] PROGMEM = "XYZ cal. details"; const char MSG_XYZ_DETAILS_EN[] PROGMEM = "XYZ cal. details";

View File

@ -38,6 +38,8 @@ extern const char* const MSG_AUTHOR_LANG_TABLE[1];
#define MSG_AUTHOR LANG_TABLE_SELECT_EXPLICIT(MSG_AUTHOR_LANG_TABLE, 0) #define MSG_AUTHOR LANG_TABLE_SELECT_EXPLICIT(MSG_AUTHOR_LANG_TABLE, 0)
extern const char* const MSG_AUTO_HOME_LANG_TABLE[LANG_NUM]; extern const char* const MSG_AUTO_HOME_LANG_TABLE[LANG_NUM];
#define MSG_AUTO_HOME LANG_TABLE_SELECT(MSG_AUTO_HOME_LANG_TABLE) #define MSG_AUTO_HOME LANG_TABLE_SELECT(MSG_AUTO_HOME_LANG_TABLE)
extern const char* const MSG_AUTO_MODE_ON_LANG_TABLE[LANG_NUM];
#define MSG_AUTO_MODE_ON LANG_TABLE_SELECT(MSG_AUTO_MODE_ON_LANG_TABLE)
extern const char* const MSG_A_RETRACT_LANG_TABLE[1]; extern const char* const MSG_A_RETRACT_LANG_TABLE[1];
#define MSG_A_RETRACT LANG_TABLE_SELECT_EXPLICIT(MSG_A_RETRACT_LANG_TABLE, 0) #define MSG_A_RETRACT LANG_TABLE_SELECT_EXPLICIT(MSG_A_RETRACT_LANG_TABLE, 0)
extern const char* const MSG_BABYSTEPPING_X_LANG_TABLE[1]; extern const char* const MSG_BABYSTEPPING_X_LANG_TABLE[1];
@ -226,8 +228,10 @@ extern const char* const MSG_FILAMENT_LOADING_T2_LANG_TABLE[LANG_NUM];
#define MSG_FILAMENT_LOADING_T2 LANG_TABLE_SELECT(MSG_FILAMENT_LOADING_T2_LANG_TABLE) #define MSG_FILAMENT_LOADING_T2 LANG_TABLE_SELECT(MSG_FILAMENT_LOADING_T2_LANG_TABLE)
extern const char* const MSG_FILAMENT_LOADING_T3_LANG_TABLE[LANG_NUM]; extern const char* const MSG_FILAMENT_LOADING_T3_LANG_TABLE[LANG_NUM];
#define MSG_FILAMENT_LOADING_T3 LANG_TABLE_SELECT(MSG_FILAMENT_LOADING_T3_LANG_TABLE) #define MSG_FILAMENT_LOADING_T3 LANG_TABLE_SELECT(MSG_FILAMENT_LOADING_T3_LANG_TABLE)
extern const char* const MSG_FILE_INCOMPLETE_LANG_TABLE[1]; extern const char* const MSG_FILE_CNT_LANG_TABLE[LANG_NUM];
#define MSG_FILE_INCOMPLETE LANG_TABLE_SELECT_EXPLICIT(MSG_FILE_INCOMPLETE_LANG_TABLE, 0) #define MSG_FILE_CNT LANG_TABLE_SELECT(MSG_FILE_CNT_LANG_TABLE)
extern const char* const MSG_FILE_INCOMPLETE_LANG_TABLE[LANG_NUM];
#define MSG_FILE_INCOMPLETE LANG_TABLE_SELECT(MSG_FILE_INCOMPLETE_LANG_TABLE)
extern const char* const MSG_FILE_PRINTED_LANG_TABLE[1]; extern const char* const MSG_FILE_PRINTED_LANG_TABLE[1];
#define MSG_FILE_PRINTED LANG_TABLE_SELECT_EXPLICIT(MSG_FILE_PRINTED_LANG_TABLE, 0) #define MSG_FILE_PRINTED LANG_TABLE_SELECT_EXPLICIT(MSG_FILE_PRINTED_LANG_TABLE, 0)
extern const char* const MSG_FILE_SAVED_LANG_TABLE[1]; extern const char* const MSG_FILE_SAVED_LANG_TABLE[1];
@ -406,10 +410,10 @@ extern const char* const MSG_PINDA_PREHEAT_LANG_TABLE[LANG_NUM];
#define MSG_PINDA_PREHEAT LANG_TABLE_SELECT(MSG_PINDA_PREHEAT_LANG_TABLE) #define MSG_PINDA_PREHEAT LANG_TABLE_SELECT(MSG_PINDA_PREHEAT_LANG_TABLE)
extern const char* const MSG_PLANNER_BUFFER_BYTES_LANG_TABLE[1]; extern const char* const MSG_PLANNER_BUFFER_BYTES_LANG_TABLE[1];
#define MSG_PLANNER_BUFFER_BYTES LANG_TABLE_SELECT_EXPLICIT(MSG_PLANNER_BUFFER_BYTES_LANG_TABLE, 0) #define MSG_PLANNER_BUFFER_BYTES LANG_TABLE_SELECT_EXPLICIT(MSG_PLANNER_BUFFER_BYTES_LANG_TABLE, 0)
extern const char* const MSG_PLA_FILAMENT_LOADED_LANG_TABLE[1]; extern const char* const MSG_PLA_FILAMENT_LOADED_LANG_TABLE[LANG_NUM];
#define MSG_PLA_FILAMENT_LOADED LANG_TABLE_SELECT_EXPLICIT(MSG_PLA_FILAMENT_LOADED_LANG_TABLE, 0) #define MSG_PLA_FILAMENT_LOADED LANG_TABLE_SELECT(MSG_PLA_FILAMENT_LOADED_LANG_TABLE)
extern const char* const MSG_PLEASE_LOAD_PLA_LANG_TABLE[1]; extern const char* const MSG_PLEASE_LOAD_PLA_LANG_TABLE[LANG_NUM];
#define MSG_PLEASE_LOAD_PLA LANG_TABLE_SELECT_EXPLICIT(MSG_PLEASE_LOAD_PLA_LANG_TABLE, 0) #define MSG_PLEASE_LOAD_PLA LANG_TABLE_SELECT(MSG_PLEASE_LOAD_PLA_LANG_TABLE)
extern const char* const MSG_PLEASE_WAIT_LANG_TABLE[LANG_NUM]; extern const char* const MSG_PLEASE_WAIT_LANG_TABLE[LANG_NUM];
#define MSG_PLEASE_WAIT LANG_TABLE_SELECT(MSG_PLEASE_WAIT_LANG_TABLE) #define MSG_PLEASE_WAIT LANG_TABLE_SELECT(MSG_PLEASE_WAIT_LANG_TABLE)
extern const char* const MSG_POSITION_UNKNOWN_LANG_TABLE[1]; extern const char* const MSG_POSITION_UNKNOWN_LANG_TABLE[1];
@ -574,8 +578,8 @@ extern const char* const MSG_SORT_TIME_LANG_TABLE[LANG_NUM];
#define MSG_SORT_TIME LANG_TABLE_SELECT(MSG_SORT_TIME_LANG_TABLE) #define MSG_SORT_TIME LANG_TABLE_SELECT(MSG_SORT_TIME_LANG_TABLE)
extern const char* const MSG_SPEED_LANG_TABLE[LANG_NUM]; extern const char* const MSG_SPEED_LANG_TABLE[LANG_NUM];
#define MSG_SPEED LANG_TABLE_SELECT(MSG_SPEED_LANG_TABLE) #define MSG_SPEED LANG_TABLE_SELECT(MSG_SPEED_LANG_TABLE)
extern const char* const MSG_STACK_ERROR_LANG_TABLE[1]; extern const char* const MSG_STACK_ERROR_LANG_TABLE[LANG_NUM];
#define MSG_STACK_ERROR LANG_TABLE_SELECT_EXPLICIT(MSG_STACK_ERROR_LANG_TABLE, 0) #define MSG_STACK_ERROR LANG_TABLE_SELECT(MSG_STACK_ERROR_LANG_TABLE)
extern const char* const MSG_STATISTICS_LANG_TABLE[LANG_NUM]; extern const char* const MSG_STATISTICS_LANG_TABLE[LANG_NUM];
#define MSG_STATISTICS LANG_TABLE_SELECT(MSG_STATISTICS_LANG_TABLE) #define MSG_STATISTICS LANG_TABLE_SELECT(MSG_STATISTICS_LANG_TABLE)
extern const char* const MSG_STATS_FILAMENTUSED_LANG_TABLE[LANG_NUM]; extern const char* const MSG_STATS_FILAMENTUSED_LANG_TABLE[LANG_NUM];
@ -640,8 +644,8 @@ extern const char* const MSG_USED_LANG_TABLE[LANG_NUM];
#define MSG_USED LANG_TABLE_SELECT(MSG_USED_LANG_TABLE) #define MSG_USED LANG_TABLE_SELECT(MSG_USED_LANG_TABLE)
extern const char* const MSG_USERWAIT_LANG_TABLE[LANG_NUM]; extern const char* const MSG_USERWAIT_LANG_TABLE[LANG_NUM];
#define MSG_USERWAIT LANG_TABLE_SELECT(MSG_USERWAIT_LANG_TABLE) #define MSG_USERWAIT LANG_TABLE_SELECT(MSG_USERWAIT_LANG_TABLE)
extern const char* const MSG_V2_CALIBRATION_LANG_TABLE[1]; extern const char* const MSG_V2_CALIBRATION_LANG_TABLE[LANG_NUM];
#define MSG_V2_CALIBRATION LANG_TABLE_SELECT_EXPLICIT(MSG_V2_CALIBRATION_LANG_TABLE, 0) #define MSG_V2_CALIBRATION LANG_TABLE_SELECT(MSG_V2_CALIBRATION_LANG_TABLE)
extern const char* const MSG_VMIN_LANG_TABLE[1]; extern const char* const MSG_VMIN_LANG_TABLE[1];
#define MSG_VMIN LANG_TABLE_SELECT_EXPLICIT(MSG_VMIN_LANG_TABLE, 0) #define MSG_VMIN LANG_TABLE_SELECT_EXPLICIT(MSG_VMIN_LANG_TABLE, 0)
extern const char* const MSG_VOLUMETRIC_LANG_TABLE[1]; extern const char* const MSG_VOLUMETRIC_LANG_TABLE[1];
@ -656,46 +660,46 @@ extern const char* const MSG_WATCH_LANG_TABLE[LANG_NUM];
#define MSG_WATCH LANG_TABLE_SELECT(MSG_WATCH_LANG_TABLE) #define MSG_WATCH LANG_TABLE_SELECT(MSG_WATCH_LANG_TABLE)
extern const char* const MSG_WATCHDOG_RESET_LANG_TABLE[1]; extern const char* const MSG_WATCHDOG_RESET_LANG_TABLE[1];
#define MSG_WATCHDOG_RESET LANG_TABLE_SELECT_EXPLICIT(MSG_WATCHDOG_RESET_LANG_TABLE, 0) #define MSG_WATCHDOG_RESET LANG_TABLE_SELECT_EXPLICIT(MSG_WATCHDOG_RESET_LANG_TABLE, 0)
extern const char* const MSG_WIZARD_LANG_TABLE[1]; extern const char* const MSG_WIZARD_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_LANG_TABLE, 0) #define MSG_WIZARD LANG_TABLE_SELECT(MSG_WIZARD_LANG_TABLE)
extern const char* const MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE[1]; extern const char* const MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_CALIBRATION_FAILED LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE, 0) #define MSG_WIZARD_CALIBRATION_FAILED LANG_TABLE_SELECT(MSG_WIZARD_CALIBRATION_FAILED_LANG_TABLE)
extern const char* const MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE[1]; extern const char* const MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_CLEAN_HEATBED LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE, 0) #define MSG_WIZARD_CLEAN_HEATBED LANG_TABLE_SELECT(MSG_WIZARD_CLEAN_HEATBED_LANG_TABLE)
extern const char* const MSG_WIZARD_DONE_LANG_TABLE[1]; extern const char* const MSG_WIZARD_DONE_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_DONE LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_DONE_LANG_TABLE, 0) #define MSG_WIZARD_DONE LANG_TABLE_SELECT(MSG_WIZARD_DONE_LANG_TABLE)
extern const char* const MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE[1]; extern const char* const MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_FILAMENT_LOADED LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE, 0) #define MSG_WIZARD_FILAMENT_LOADED LANG_TABLE_SELECT(MSG_WIZARD_FILAMENT_LOADED_LANG_TABLE)
extern const char* const MSG_WIZARD_HEATING_LANG_TABLE[1]; extern const char* const MSG_WIZARD_HEATING_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_HEATING LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_HEATING_LANG_TABLE, 0) #define MSG_WIZARD_HEATING LANG_TABLE_SELECT(MSG_WIZARD_HEATING_LANG_TABLE)
extern const char* const MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE[1]; extern const char* const MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE, 0) #define MSG_WIZARD_INSERT_CORRECT_FILAMENT LANG_TABLE_SELECT(MSG_WIZARD_INSERT_CORRECT_FILAMENT_LANG_TABLE)
extern const char* const MSG_WIZARD_LANGUAGE_LANG_TABLE[1]; extern const char* const MSG_WIZARD_LANGUAGE_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_LANGUAGE LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_LANGUAGE_LANG_TABLE, 0) #define MSG_WIZARD_LANGUAGE LANG_TABLE_SELECT(MSG_WIZARD_LANGUAGE_LANG_TABLE)
extern const char* const MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE[1]; extern const char* const MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_LOAD_FILAMENT LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE, 0) #define MSG_WIZARD_LOAD_FILAMENT LANG_TABLE_SELECT(MSG_WIZARD_LOAD_FILAMENT_LANG_TABLE)
extern const char* const MSG_WIZARD_PLA_FILAMENT_LANG_TABLE[1]; extern const char* const MSG_WIZARD_PLA_FILAMENT_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_PLA_FILAMENT LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_PLA_FILAMENT_LANG_TABLE, 0) #define MSG_WIZARD_PLA_FILAMENT LANG_TABLE_SELECT(MSG_WIZARD_PLA_FILAMENT_LANG_TABLE)
extern const char* const MSG_WIZARD_QUIT_LANG_TABLE[1]; extern const char* const MSG_WIZARD_QUIT_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_QUIT LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_QUIT_LANG_TABLE, 0) #define MSG_WIZARD_QUIT LANG_TABLE_SELECT(MSG_WIZARD_QUIT_LANG_TABLE)
extern const char* const MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE[1]; extern const char* const MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_REPEAT_V2_CAL LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE, 0) #define MSG_WIZARD_REPEAT_V2_CAL LANG_TABLE_SELECT(MSG_WIZARD_REPEAT_V2_CAL_LANG_TABLE)
extern const char* const MSG_WIZARD_RERUN_LANG_TABLE[1]; extern const char* const MSG_WIZARD_RERUN_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_RERUN LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_RERUN_LANG_TABLE, 0) #define MSG_WIZARD_RERUN LANG_TABLE_SELECT(MSG_WIZARD_RERUN_LANG_TABLE)
extern const char* const MSG_WIZARD_SELFTEST_LANG_TABLE[1]; extern const char* const MSG_WIZARD_SELFTEST_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_SELFTEST LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_SELFTEST_LANG_TABLE, 0) #define MSG_WIZARD_SELFTEST LANG_TABLE_SELECT(MSG_WIZARD_SELFTEST_LANG_TABLE)
extern const char* const MSG_WIZARD_V2_CAL_LANG_TABLE[1]; extern const char* const MSG_WIZARD_V2_CAL_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_V2_CAL LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_V2_CAL_LANG_TABLE, 0) #define MSG_WIZARD_V2_CAL LANG_TABLE_SELECT(MSG_WIZARD_V2_CAL_LANG_TABLE)
extern const char* const MSG_WIZARD_V2_CAL_2_LANG_TABLE[1]; extern const char* const MSG_WIZARD_V2_CAL_2_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_V2_CAL_2 LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_V2_CAL_2_LANG_TABLE, 0) #define MSG_WIZARD_V2_CAL_2 LANG_TABLE_SELECT(MSG_WIZARD_V2_CAL_2_LANG_TABLE)
extern const char* const MSG_WIZARD_WELCOME_LANG_TABLE[1]; extern const char* const MSG_WIZARD_WELCOME_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_WELCOME LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_WELCOME_LANG_TABLE, 0) #define MSG_WIZARD_WELCOME LANG_TABLE_SELECT(MSG_WIZARD_WELCOME_LANG_TABLE)
extern const char* const MSG_WIZARD_WILL_PREHEAT_LANG_TABLE[1]; extern const char* const MSG_WIZARD_WILL_PREHEAT_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_WILL_PREHEAT LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_WILL_PREHEAT_LANG_TABLE, 0) #define MSG_WIZARD_WILL_PREHEAT LANG_TABLE_SELECT(MSG_WIZARD_WILL_PREHEAT_LANG_TABLE)
extern const char* const MSG_WIZARD_XYZ_CAL_LANG_TABLE[1]; extern const char* const MSG_WIZARD_XYZ_CAL_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_XYZ_CAL LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_XYZ_CAL_LANG_TABLE, 0) #define MSG_WIZARD_XYZ_CAL LANG_TABLE_SELECT(MSG_WIZARD_XYZ_CAL_LANG_TABLE)
extern const char* const MSG_WIZARD_Z_CAL_LANG_TABLE[1]; extern const char* const MSG_WIZARD_Z_CAL_LANG_TABLE[LANG_NUM];
#define MSG_WIZARD_Z_CAL LANG_TABLE_SELECT_EXPLICIT(MSG_WIZARD_Z_CAL_LANG_TABLE, 0) #define MSG_WIZARD_Z_CAL LANG_TABLE_SELECT(MSG_WIZARD_Z_CAL_LANG_TABLE)
extern const char* const MSG_XYZ_DETAILS_LANG_TABLE[LANG_NUM]; extern const char* const MSG_XYZ_DETAILS_LANG_TABLE[LANG_NUM];
#define MSG_XYZ_DETAILS LANG_TABLE_SELECT(MSG_XYZ_DETAILS_LANG_TABLE) #define MSG_XYZ_DETAILS LANG_TABLE_SELECT(MSG_XYZ_DETAILS_LANG_TABLE)
extern const char* const MSG_X_MAX_LANG_TABLE[1]; extern const char* const MSG_X_MAX_LANG_TABLE[1];

View File

@ -102,6 +102,7 @@
#define MSG_SILENT_MODE_ON "Mode [leise]" #define MSG_SILENT_MODE_ON "Mode [leise]"
#define MSG_SILENT_MODE_OFF "Mode [Hohe Leist]" #define MSG_SILENT_MODE_OFF "Mode [Hohe Leist]"
#define MSG_AUTO_MODE_ON "Mode[Automatisch]"
#define MSG_REBOOT "Reboot den Drucker" #define MSG_REBOOT "Reboot den Drucker"
#define MSG_TAKE_EFFECT " um wirksam zu werden" #define MSG_TAKE_EFFECT " um wirksam zu werden"
@ -256,6 +257,7 @@
#define MSG_FIL_ADJUSTING "Einstellen Filament. Bitte warten." #define MSG_FIL_ADJUSTING "Einstellen Filament. Bitte warten."
#define MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ "Filamente sind jetzt eingestellt. Bitte reinigen Sie die Duese zur Kalibrierung. Klicken wenn sauber." #define MSG_CONFIRM_NOZZLE_CLEAN_FIL_ADJ "Filamente sind jetzt eingestellt. Bitte reinigen Sie die Duese zur Kalibrierung. Klicken wenn sauber."
#define MSG_STACK_ERROR "Error - EEPROM wurde ueberschrieben"
#define MSG_CALIBRATE_E "Kalibriere E" #define MSG_CALIBRATE_E "Kalibriere E"
//#define MSG_RESET_CALIBRATE_E "Reset E Cal." //#define MSG_RESET_CALIBRATE_E "Reset E Cal."
@ -336,3 +338,28 @@
#define MSG_SORT_ALPHA "Sort: [Alphabet]" #define MSG_SORT_ALPHA "Sort: [Alphabet]"
#define MSG_SORT_NONE "Sort: [Keine]" #define MSG_SORT_NONE "Sort: [Keine]"
#define MSG_SORTING "Sortiere Dateien" #define MSG_SORTING "Sortiere Dateien"
#define MSG_FILE_INCOMPLETE "Datei unvollstaedig. Trotzdem weiter machen?"
#define MSG_WIZARD "Assistent"
#define MSG_WIZARD_LANGUAGE "Bitte Sprache waehlen"
#define MSG_WIZARD_WELCOME "Hallo, ich bin Dein Original Prusa i3 Drucker. Sollen wir mit dem Setup-Prozess beginnen?"
#define MSG_WIZARD_QUIT "Du kannst den Assistenten immer aus Kalibrierung -> Assistent wider aufnehmen."
#define MSG_WIZARD_SELFTEST "Zuerst werden wir den Selbsttest durchfuehren um haeufige Montageprobleme zu ueberpruefen."
#define MSG_WIZARD_CALIBRATION_FAILED "Lese das Handbuch um das Problem zu beheben. Danach den Drucker neustarten und mit dem Assisenten fortzusetzen."
#define MSG_WIZARD_XYZ_CAL "Starte jetzt die XYZ-Kalibrierung. Es wird ca. 12 min. dauern."
#define MSG_WIZARD_FILAMENT_LOADED "Filament geladen?"
#define MSG_WIZARD_Z_CAL "Starte jetzt die Z-Kalibrierung."
#define MSG_WIZARD_WILL_PREHEAT "Waerme die Duese fuer PLA vor."
#define MSG_WIZARD_HEATING "Vorwaermen der Duese. Bitte warten."
#define MSG_WIZARD_V2_CAL "Starte mit der Kalibrierung zwischen der Duese und Bett."
#define MSG_WIZARD_V2_CAL_2 "Starte die Kal.-Linie zu drucken, bitte drehe am Knopf bis Du die optimale Hoehe erreichst. Schaue im Handbuch unter Calibration nach."
#define MSG_V2_CALIBRATION "Erste Layer Kal."
#define MSG_WIZARD_DONE "Fertig. Happy printing!"
#define MSG_WIZARD_LOAD_FILAMENT "Fuehre PLA Filament in den Extruder und drueck den Knopf um dies zu laden."
#define MSG_WIZARD_RERUN "Starten vom Assistenten loescht die aktuelle Kalibrierung und beginnt von vorne. Fortsetzen?"
#define MSG_WIZARD_REPEAT_V2_CAL "Willst Du den letzten Schritt widerholen um den Abstand zwischen Duese und Bett erneut einzustellen?"
#define MSG_WIZARD_CLEAN_HEATBED "Bitte reinige das Bett und druecke den Knopf."
#define MSG_WIZARD_PLA_FILAMENT "Ist es PLA Filament?"
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Bitte lade PLA Filament und starte den Drucker neu um den Assistenten fortzusetzen."
#define MSG_PLA_FILAMENT_LOADED "Ist PLA Filament geladen?"
#define MSG_PLEASE_LOAD_PLA "Bitte lade erst PLA filament."
#define MSG_FILE_CNT "Einige Dateien werden nicht sortiert, da das max. 100 Dateien pro Ordner ist."

View File

@ -103,6 +103,7 @@
#define MSG_SILENT_MODE_ON "Mode [silent]" #define MSG_SILENT_MODE_ON "Mode [silent]"
#define MSG_SILENT_MODE_OFF "Mode [high power]" #define MSG_SILENT_MODE_OFF "Mode [high power]"
#define MSG_AUTO_MODE_ON "Mode [auto power]"
#define(length=20) MSG_REBOOT "Reboot the printer" #define(length=20) MSG_REBOOT "Reboot the printer"
#define(length=20) MSG_TAKE_EFFECT " for take effect" #define(length=20) MSG_TAKE_EFFECT " for take effect"
@ -261,8 +262,8 @@
#define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done." #define(length=20, lines=8) MSG_CLEAN_NOZZLE_E "E calibration finished. Please clean the nozzle. Click when done."
#define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for nozzle and bed cooling" #define(length=20, lines=3) MSG_WAITING_TEMP "Waiting for nozzle and bed cooling"
#define(length=20, lines=2) MSG_FILAMENT_CLEAN "Is color clear?" #define(length=20, lines=2) MSG_FILAMENT_CLEAN "Is color clear?"
#define(lenght=18, lines=1) MSG_UNLOADING_FILAMENT "Unloading filament" #define(lenght=20) MSG_UNLOADING_FILAMENT "Unloading filament"
#define(length=20, lines=8) MSG_PAPER "Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately." #define(length=20, lines=10) MSG_PAPER "Place a sheet of paper under the nozzle during the calibration of first 4 points. If the nozzle catches the paper, power off the printer immediately."
#define MSG_BED_CORRECTION_MENU "Bed level correct" #define MSG_BED_CORRECTION_MENU "Bed level correct"
#define(length=14,lines=1) MSG_BED_CORRECTION_FRONT_LEFT "FrontLeft [um]" #define(length=14,lines=1) MSG_BED_CORRECTION_FRONT_LEFT "FrontLeft [um]"
@ -287,7 +288,7 @@
#define(length=17, lines=1) MSG_PID_EXTRUDER "PID calibration" #define(length=17, lines=1) MSG_PID_EXTRUDER "PID calibration"
#define(length=19, lines=1) MSG_SET_TEMPERATURE "Set temperature:" #define(length=19, lines=1) MSG_SET_TEMPERATURE "Set temperature:"
#define(length=20, lines=1) MSG_PID_FINISHED "PID cal. finished" #define(length=20, lines=1) MSG_PID_FINISHED "PID cal. finished"
#define(length=20, lines=1) MSG_PID_RUNNING "PID cal. " #define(length=20, lines=1) MSG_PID_RUNNING "PID cal. "
#define(length=17, lines=1) MSG_CALIBRATE_PINDA "Calibrate" #define(length=17, lines=1) MSG_CALIBRATE_PINDA "Calibrate"
#define(length=17, lines=1) MSG_CALIBRATION_PINDA_MENU "Temp. calibration" #define(length=17, lines=1) MSG_CALIBRATION_PINDA_MENU "Temp. calibration"
@ -345,3 +346,4 @@
#define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer." #define MSG_WIZARD_INSERT_CORRECT_FILAMENT "Please load PLA filament and then resume Wizard by rebooting the printer."
#define MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?" #define MSG_PLA_FILAMENT_LOADED "Is PLA filament loaded?"
#define MSG_PLEASE_LOAD_PLA "Please load PLA filament first." #define MSG_PLEASE_LOAD_PLA "Please load PLA filament first."
#define MSG_FILE_CNT "Some files will not be sorted. Max. No. of files in 1 folder for sorting is 100."

View File

@ -1157,9 +1157,8 @@ void EEPROM_read_st(int pos, uint8_t* value, uint8_t size)
void digipot_init() //Initialize Digipot Motor Current void digipot_init() //Initialize Digipot Motor Current
{ {
EEPROM_read_st(EEPROM_SILENT,(uint8_t*)&SilentMode,sizeof(SilentMode)); EEPROM_read_st(EEPROM_SILENT,(uint8_t*)&SilentMode,sizeof(SilentMode));
SilentModeMenu = SilentMode;
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 #if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
if(SilentMode == 0){ if(SilentMode == 0){
const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT_LOUD; const uint8_t digipot_motor_current[] = DIGIPOT_MOTOR_CURRENT_LOUD;

View File

@ -58,7 +58,7 @@ union MenuData
char ip_str[3*4+3+1]; char ip_str[3*4+3+1];
} supportMenu; } supportMenu;
// alternative PJR: // alternative hyperfine tuning:
struct AdjustBed struct AdjustBed
{ {
// 6+13+16=35B // 6+13+16=35B
@ -109,6 +109,10 @@ int8_t SilentModeMenu = 0;
uint8_t snmm_extruder = 0; uint8_t snmm_extruder = 0;
#endif #endif
#ifdef SDCARD_SORT_ALPHA
bool presort_flag = false;
#endif
int lcd_commands_type=LCD_COMMAND_IDLE; int lcd_commands_type=LCD_COMMAND_IDLE;
int lcd_commands_step=0; int lcd_commands_step=0;
bool isPrintPaused = false; bool isPrintPaused = false;
@ -569,10 +573,16 @@ void lcd_commands()
strcpy(cmd1, "G1 Z"); strcpy(cmd1, "G1 Z");
strcat(cmd1, ftostr32(pause_lastpos[Z_AXIS])); strcat(cmd1, ftostr32(pause_lastpos[Z_AXIS]));
enquecommand(cmd1); enquecommand(cmd1);
if (axis_relative_modes[3] == true) enquecommand_P(PSTR("M83")); // set extruder to relative mode.
else enquecommand_P(PSTR("M82")); // set extruder to absolute mode if (axis_relative_modes[3] == false) {
enquecommand_P(PSTR("G1 E" STRINGIFY(DEFAULT_RETRACTION))); //unretract enquecommand_P(PSTR("M83")); // set extruder to relative mode
enquecommand_P(PSTR("G90")); //absolute positioning enquecommand_P(PSTR("G1 E" STRINGIFY(DEFAULT_RETRACTION))); //unretract
enquecommand_P(PSTR("M82")); // set extruder to absolute mode
}
else {
enquecommand_P(PSTR("G1 E" STRINGIFY(DEFAULT_RETRACTION))); //unretract
}
lcd_commands_step = 1; lcd_commands_step = 1;
} }
if (lcd_commands_step == 3 && !blocks_queued()) { //wait for nozzle to reach target temp if (lcd_commands_step == 3 && !blocks_queued()) { //wait for nozzle to reach target temp
@ -587,7 +597,7 @@ void lcd_commands()
strcpy(cmd1, "M104 S"); strcpy(cmd1, "M104 S");
strcat(cmd1, ftostr3(HotendTempBckp)); strcat(cmd1, ftostr3(HotendTempBckp));
enquecommand(cmd1); enquecommand(cmd1);
enquecommand_P(PSTR("G90")); //absolute positioning
strcpy(cmd1, "G1 X"); strcpy(cmd1, "G1 X");
strcat(cmd1, ftostr32(pause_lastpos[X_AXIS])); strcat(cmd1, ftostr32(pause_lastpos[X_AXIS]));
strcat(cmd1, " Y"); strcat(cmd1, " Y");
@ -629,9 +639,9 @@ void lcd_commands()
{ {
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS; lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
enquecommand_P(PSTR("G1 Z0.250 F7200.000")); enquecommand_P(PSTR("G1 Z0.250 F7200.000"));
enquecommand_P(PSTR("G1 X50.0 E80.0 F1000.0)); enquecommand_P(PSTR("G1 X50.0 E80.0 F1000.0"));
nquecommand_P(PSTR("G1 X160.0 E20.0 F1000.0)); enquecommand_P(PSTR("G1 X160.0 E20.0 F1000.0"));
enquecommand_P(PSTR("G1 Z0.200 F7200.000)); enquecommand_P(PSTR("G1 Z0.200 F7200.000"));
enquecommand_P(PSTR("G1 X220.0 E13 F1000.0")); enquecommand_P(PSTR("G1 X220.0 E13 F1000.0"));
enquecommand_P(PSTR("G1 X240.0 E0 F1000.0")); enquecommand_P(PSTR("G1 X240.0 E0 F1000.0"));
enquecommand_P(PSTR("G92 E0.0")); enquecommand_P(PSTR("G92 E0.0"));
@ -2786,7 +2796,6 @@ void EEPROM_read(int pos, uint8_t* value, uint8_t size)
#ifdef SDCARD_SORT_ALPHA #ifdef SDCARD_SORT_ALPHA
static void lcd_sort_type_set() { static void lcd_sort_type_set() {
uint8_t sdSort; uint8_t sdSort;
EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort)); EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));
switch (sdSort) { switch (sdSort) {
case SD_SORT_TIME: sdSort = SD_SORT_ALPHA; break; case SD_SORT_TIME: sdSort = SD_SORT_ALPHA; break;
@ -2794,16 +2803,18 @@ static void lcd_sort_type_set() {
default: sdSort = SD_SORT_TIME; default: sdSort = SD_SORT_TIME;
} }
eeprom_update_byte((unsigned char *)EEPROM_SD_SORT, sdSort); eeprom_update_byte((unsigned char *)EEPROM_SD_SORT, sdSort);
lcd_goto_menu(lcd_sdcard_menu, 1); presort_flag = true;
//lcd_update(2); lcd_goto_menu(lcd_settings_menu, 8);
//delay(1000);
card.presort();
} }
#endif //SDCARD_SORT_ALPHA #endif //SDCARD_SORT_ALPHA
static void lcd_silent_mode_set() { static void lcd_silent_mode_set() {
SilentModeMenu = !SilentModeMenu; switch (SilentModeMenu) {
case 0: SilentModeMenu = 1; break;
case 1: SilentModeMenu = 2; break;
case 2: SilentModeMenu = 0; break;
default: SilentModeMenu = 0; break;
}
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu); eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
digipot_init(); digipot_init();
lcd_goto_menu(lcd_settings_menu, 7); lcd_goto_menu(lcd_settings_menu, 7);
@ -2819,8 +2830,8 @@ static void lcd_set_lang(unsigned char lang) {
} }
#if !SDSORT_USES_RAM #if !SDSORT_USES_RAM
void lcd_set_arrows() { void lcd_set_degree() {
void lcd_set_custom_characters_arrows(); lcd_set_custom_characters_degree();
} }
void lcd_set_progress() { void lcd_set_progress() {
@ -3207,10 +3218,13 @@ static void lcd_settings_menu()
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84")); MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
} }
if ((SilentModeMenu == 0) || (farm_mode) ) { if (!farm_mode) { //dont show in menu if we are in farm mode
MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); switch (SilentModeMenu) {
} else { case 0: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); case 1: MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); break;
case 2: MENU_ITEM(function, MSG_AUTO_MODE_ON, lcd_silent_mode_set); break;
default: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
}
} }
if (!isPrintPaused && !homing_flag) if (!isPrintPaused && !homing_flag)
@ -3224,6 +3238,17 @@ static void lcd_settings_menu()
} else { } else {
MENU_ITEM(function, MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF, lcd_toshiba_flash_air_compatibility_toggle); MENU_ITEM(function, MSG_TOSHIBA_FLASH_AIR_COMPATIBILITY_OFF, lcd_toshiba_flash_air_compatibility_toggle);
} }
#ifdef SDCARD_SORT_ALPHA
if (!farm_mode) {
uint8_t sdSort;
EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));
switch (sdSort) {
case SD_SORT_TIME: MENU_ITEM(function, MSG_SORT_TIME, lcd_sort_type_set); break;
case SD_SORT_ALPHA: MENU_ITEM(function, MSG_SORT_ALPHA, lcd_sort_type_set); break;
default: MENU_ITEM(function, MSG_SORT_NONE, lcd_sort_type_set);
}
}
#endif // SDCARD_SORT_ALPHA
if (farm_mode) if (farm_mode)
{ {
@ -3853,12 +3878,10 @@ void change_extr(int extr) { //switches multiplexer for extruders
case 1: case 1:
WRITE(E_MUX0_PIN, HIGH); WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, LOW); WRITE(E_MUX1_PIN, LOW);
break; break;
case 2: case 2:
WRITE(E_MUX0_PIN, LOW); WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, HIGH); WRITE(E_MUX1_PIN, HIGH);
break; break;
case 3: case 3:
WRITE(E_MUX0_PIN, HIGH); WRITE(E_MUX0_PIN, HIGH);
@ -4545,8 +4568,13 @@ static void lcd_autostart_sd()
static void lcd_silent_mode_set_tune() { static void lcd_silent_mode_set_tune() {
SilentModeMenu = !SilentModeMenu; switch (SilentModeMenu) {
eeprom_update_byte((unsigned char*)EEPROM_SILENT, SilentModeMenu); case 0: SilentModeMenu = 1; break;
case 1: SilentModeMenu = 2; break;
case 2: SilentModeMenu = 0; break;
default: SilentModeMenu = 0; break;
}
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
digipot_init(); digipot_init();
lcd_goto_menu(lcd_tune_menu, 9); lcd_goto_menu(lcd_tune_menu, 9);
} }
@ -4581,10 +4609,13 @@ static void lcd_tune_menu()
MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_colorprint_change);//7 MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_colorprint_change);//7
#endif #endif
if (SilentModeMenu == 0) { if (!farm_mode) { //dont show in menu if we are in farm mode
MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set_tune); switch (SilentModeMenu) {
} else { case 0: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set_tune); case 1: MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); break;
case 2: MENU_ITEM(function, MSG_AUTO_MODE_ON, lcd_silent_mode_set); break;
default: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
}
} }
END_MENU(); END_MENU();
} }
@ -4740,8 +4771,13 @@ void getFileDescription(char *name, char *description) {
void lcd_sdcard_menu() void lcd_sdcard_menu()
{ {
uint8_t sdSort; uint8_t sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
int tempScrool = 0; int tempScrool = 0;
if (presort_flag == true) {
presort_flag = false;
card.presort();
}
if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) if (lcdDrawUpdate == 0 && LCD_CLICKED == 0)
//delay(100); //delay(100);
return; // nothing to do (so don't thrash the SD card) return; // nothing to do (so don't thrash the SD card)
@ -4749,16 +4785,6 @@ void lcd_sdcard_menu()
START_MENU(); START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu); MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
if (!farm_mode) {
#ifdef SDCARD_SORT_ALPHA
EEPROM_read(EEPROM_SD_SORT, (uint8_t*)&sdSort, sizeof(sdSort));
switch (sdSort) {
case SD_SORT_TIME: MENU_ITEM(function, MSG_SORT_TIME, lcd_sort_type_set); break;
case SD_SORT_ALPHA: MENU_ITEM(function, MSG_SORT_ALPHA, lcd_sort_type_set); break;
default: MENU_ITEM(function, MSG_SORT_NONE, lcd_sort_type_set);
}
#endif // SDCARD_SORT_ALPHA
}
card.getWorkDirName(); card.getWorkDirName();
if (card.filename[0] == '/') if (card.filename[0] == '/')
{ {
@ -4773,14 +4799,8 @@ void lcd_sdcard_menu()
{ {
if (_menuItemNr == _lineNr) if (_menuItemNr == _lineNr)
{ {
const uint16_t nr = ((sdSort == SD_SORT_NONE) || farm_mode) ? (fileCnt - 1 - i) : i; uint16_t nr = ((sdSort == SD_SORT_NONE) || farm_mode || (sdSort == SD_SORT_TIME)) ? (fileCnt - 1 - i) : i;
/* #ifdef SDCARD_RATHERRECENTFIRST
#ifndef SDCARD_SORT_ALPHA
fileCnt - 1 -
#endif
#endif
i;*/
#ifdef SDCARD_SORT_ALPHA #ifdef SDCARD_SORT_ALPHA
if (sdSort == SD_SORT_NONE) card.getfilename(nr); if (sdSort == SD_SORT_NONE) card.getfilename(nr);
else card.getfilename_sorted(nr); else card.getfilename_sorted(nr);
@ -4799,17 +4819,6 @@ void lcd_sdcard_menu()
END_MENU(); END_MENU();
} }
//char description [10] [31];
/*void get_description() {
uint16_t fileCnt = card.getnrfilenames();
for (uint16_t i = 0; i < fileCnt; i++)
{
card.getfilename(fileCnt - 1 - i);
getFileDescription(card.filename, description[i]);
}
}*/
/*void lcd_farm_sdcard_menu() /*void lcd_farm_sdcard_menu()
{ {
static int i = 0; static int i = 0;
@ -5816,6 +5825,7 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
(*currentMenu)(); (*currentMenu)();
menuExiting = false; menuExiting = false;
} }
lcd_implementation_clear();
lcd_return_to_status(); lcd_return_to_status();
lcdDrawUpdate = 2; lcdDrawUpdate = 2;
} }

View File

@ -75,7 +75,7 @@ void lcd_mylang();
#define LCD_ALERTMESSAGERPGM(x) lcd_setalertstatuspgm((x)) #define LCD_ALERTMESSAGERPGM(x) lcd_setalertstatuspgm((x))
#define LCD_UPDATE_INTERVAL 100 #define LCD_UPDATE_INTERVAL 100
#define LCD_TIMEOUT_TO_STATUS 15000 #define LCD_TIMEOUT_TO_STATUS 30000
#ifdef ULTIPANEL #ifdef ULTIPANEL
void lcd_buttons_update(); void lcd_buttons_update();
@ -105,6 +105,7 @@ void lcd_mylang();
extern int farm_no; extern int farm_no;
extern int farm_timer; extern int farm_timer;
extern int farm_status; extern int farm_status;
extern int8_t SilentModeMenu;
#ifdef SNMM #ifdef SNMM
extern uint8_t snmm_extruder; extern uint8_t snmm_extruder;
@ -265,7 +266,7 @@ void display_loading();
void lcd_service_mode_show_result(); void lcd_service_mode_show_result();
#if !SDSORT_USES_RAM #if !SDSORT_USES_RAM
void lcd_set_arrows(); void lcd_set_degree();
void lcd_set_progress(); void lcd_set_progress();
#endif #endif

View File

@ -498,6 +498,7 @@ void lcd_set_custom_characters_nextpage()
B10110, B10110,
B11100, B11100,
B01000, B01000,
B00000,
B00000 B00000
}; };