Commit b0be8de5 authored by MagoKimbra's avatar MagoKimbra

Update 4.2.5

parent a8abdd0b
......@@ -5637,15 +5637,10 @@ inline void gcode_M221() {
* M222: Set density extrusion percentage (M222 T0 S95)
*/
inline void gcode_M222() {
if (setTargetedExtruder(222)) return;
if (code_seen('S')) {
int sval = code_value();
if (code_seen('T')) {
if (setTargetedExtruder(222)) return;
density_multiplier[target_extruder] = sval;
}
else {
density_multiplier[active_extruder] = sval;
}
density_multiplier[target_extruder] = code_value();
}
}
......
......@@ -55,6 +55,12 @@
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if DISABLED(SDSUPPORT)
#define SDSUPPORT
#endif
#endif
#if ENABLED(ULTIMAKERCONTROLLER) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL) || ENABLED(RIGIDBOT_PANEL)
#define ULTIPANEL
#define NEWPANEL
......@@ -375,6 +381,24 @@
#define MIN_PROBE_Y (max(Y_MIN_POS, Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
#define MAX_PROBE_Y (min(Y_MAX_POS, Y_MAX_POS + Y_PROBE_OFFSET_FROM_EXTRUDER))
// Make sure probing points are reachable
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
#undef LEFT_PROBE_BED_POSITION
#define LEFT_PROBE_BED_POSITION MIN_PROBE_X
#endif
#if RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
#undef RIGHT_PROBE_BED_POSITION
#define RIGHT_PROBE_BED_POSITION MAX_PROBE_X
#endif
#if FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
#undef FRONT_PROBE_BED_POSITION
#define FRONT_PROBE_BED_POSITION MIN_PROBE_Y
#endif
#if BACK_PROBE_BED_POSITION > MAX_PROBE_Y
#undef BACK_PROBE_BED_POSITION
#define BACK_PROBE_BED_POSITION MAX_PROBE_Y
#endif
// Z_RAISE_AFTER_PROBING is not for all probes. Be sure that it is zero in that cases
#if DISABLED(ENABLE_SERVOS) && DISABLED(Z_PROBE_SLED)
#undef Z_RAISE_AFTER_PROBING
......
......@@ -61,7 +61,7 @@
// Serial Console Messages (do not translate those!)
#if MECH(CARTESIAN)
#define SERIAL_M115_REPORT "FIRMWARE_NAME:" BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:Mendel EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define SERIAL_M115_REPORT "FIRMWARE_NAME:" BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:Cartesian EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#elif MECH(COREXY)
#define SERIAL_M115_REPORT "FIRMWARE_NAME:" BUILD_VERSION " FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:Core_XY EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#elif MECH(COREXZ)
......
......@@ -61,30 +61,16 @@
}
void clear() {
float zero[3] = {}, old_origin[3];
float zero[3] = {};
fill(_left, _top, _width, _height, _color[VC_BACKGROUND]);
memcpy(old_origin, _origin, sizeof(_origin));
memcpy(_origin, zero, sizeof(_origin));
for (int i = 0; i < 3; i++) {
float pos[3] = {};
pos[i] = _max[i];
cursor_to(zero);
line_to(VC_AXIS + i, pos);
}
cursor_to(0, 0, _max[Z_AXIS]);
line_to(VC_AXIS + Y_AXIS, 0, _max[Y_AXIS], _max[Z_AXIS]);
line_to(VC_AXIS + Z_AXIS, 0, _max[Y_AXIS], 0);
line_to(VC_AXIS + X_AXIS, _max[X_AXIS], _max[Y_AXIS], 0);
line_to(VC_AXIS + Z_AXIS, _max[X_AXIS], _max[Y_AXIS], _max[Z_AXIS]);
line_to(VC_AXIS + Y_AXIS, _max[X_AXIS], 0, _max[Z_AXIS]);
line_to(VC_AXIS + Z_AXIS, _max[X_AXIS], 0, 0);
line_to(VC_AXIS + Y_AXIS, _max[X_AXIS], _max[Y_AXIS], 0);
cursor_to(0, 0, _max[Z_AXIS]);
line_to(VC_AXIS + X_AXIS, _max[X_AXIS], 0, _max[Z_AXIS]);
memcpy(_origin, old_origin, sizeof(_origin));
cursor_to(zero);
}
void clear(float scale) {
......
......@@ -625,10 +625,10 @@
if (card.sdprinting) {
// Progress bar solid part
sdbar.setValue(card.percentDone());
NPlay.setPic(38);
NPlay.setPic(40);
}
else {
NPlay.setPic(40);
NPlay.setPic(38);
}
}
......
......@@ -1480,17 +1480,6 @@
#elif FRONT_PROBE_BED_POSITION > BACK_PROBE_BED_POSITION
#error CONFLICT ERROR: FRONT_PROBE_BED_POSITION must be less than BACK_PROBE_BED_POSITION.
#endif
// Make sure probing points are reachable
#if LEFT_PROBE_BED_POSITION < MIN_PROBE_X
#error CONFLICT ERROR: "The given LEFT_PROBE_BED_POSITION can't be reached by the probe."
#elif RIGHT_PROBE_BED_POSITION > MAX_PROBE_X
#error CONFLICT ERROR: "The given RIGHT_PROBE_BED_POSITION can't be reached by the probe."
#elif FRONT_PROBE_BED_POSITION < MIN_PROBE_Y
#error CONFLICT ERROR: "The given FRONT_PROBE_BED_POSITION can't be reached by the probe."
#elif BACK_PROBE_BED_POSITION > MAX_PROBE_Y
#error CONFLICT ERROR: "The given BACK_PROBE_BED_POSITION can't be reached by the probe."
#endif
#else // !AUTO_BED_LEVELING_GRID
// Check the triangulation points
......
......@@ -350,7 +350,7 @@ int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) {
ECHO_C('.');
w++;
}
ECHO_T(dir.name[i]);
ECHO_C(dir.name[i]);
w++;
}
if (DIR_IS_SUBDIR(&dir)) {
......@@ -585,7 +585,7 @@ bool SdBaseFile::open(const char* path, uint8_t oflag) {
* or can't be opened in the access mode specified by oflag.
*/
bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) {
uint8_t dname[LONG_FILENAME_LENGTH+1];
uint8_t dname[11];
SdBaseFile dir1, dir2;
SdBaseFile* parent = dirFile;
SdBaseFile* sub = &dir1;
......@@ -953,7 +953,7 @@ void SdBaseFile::printDirName(const dir_t& dir,
ECHO_C('.');
w++;
}
ECHO_T(dir.name[i]);
ECHO_C(dir.name[i]);
w++;
}
if (DIR_IS_SUBDIR(&dir) && printSlash) {
......@@ -988,7 +988,7 @@ static void print2u(uint8_t v) {
* \param[in] fatDate The date field from a directory entry.
*/
void SdBaseFile::printFatDate(uint16_t fatDate) {
ECHO_T(FAT_YEAR(fatDate));
ECHO_V(FAT_YEAR(fatDate));
ECHO_C('-');
print2u(FAT_MONTH(fatDate));
ECHO_C('-');
......
......@@ -359,8 +359,8 @@ class SdBaseFile {
bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);
dir_t* readDirCache();
//------------------------------------------------------------------------------
// to be deleted
//------------------------------------------------------------------------------
// to be deleted
static void printDirName(const dir_t& dir,
uint8_t width, bool printSlash);
//------------------------------------------------------------------------------
......
......@@ -85,9 +85,8 @@ void CardReader::lsDive(const char* prepend, SdFile parent, const char* const ma
else {
char pn0 = p.name[0];
if (pn0 == DIR_NAME_FREE) break;
if (pn0 == DIR_NAME_DELETED || pn0 == '.' || pn0 == '_') continue;
char lf0 = longFilename[0];
if (lf0 == '.' || lf0 == '_') continue;
if (pn0 == DIR_NAME_DELETED || pn0 == '.') continue;
if (longFilename[0] == '.') continue;
if (!DIR_IS_FILE_OR_SUBDIR(&p)) continue;
......@@ -158,7 +157,7 @@ void CardReader::ls() {
// Print /LongNamePart to serial output
ECHO_C('/');
ECHO_M(longFilename[0] ? longFilename : "???");
ECHO_T(longFilename[0] ? longFilename : "???");
// If the filename was printed then that's it
if (!filenameIsDir) break;
// ECHO_M("Opening dir: "); ECHO_EV(segment);
......@@ -326,9 +325,8 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/,
}
}
}
else { //relative path
else // relative path
curDir = &workDir;
}
char newName[FILENAME_LENGTH + 2];
if (strlen((char *)fname) >= 9) {
......@@ -375,7 +373,7 @@ void CardReader::openFile(char* name, bool read, bool replace_current/*=true*/,
}
else {
saving = true;
ECHO_LMT(DB, SERIAL_SD_WRITE_TO_FILE, name);
ECHO_LMT(INFO, SERIAL_SD_WRITE_TO_FILE, name);
if (lcd_status) lcd_setstatus(fname);
}
}
......@@ -457,7 +455,7 @@ void CardReader::write_command(char* buf) {
}
void CardReader::checkautostart(bool force) {
if (!force && (!autostart_stilltocheck || next_autostart_ms < millis()))
if (!force && (!autostart_stilltocheck || next_autostart_ms >= millis()))
return;
autostart_stilltocheck = false;
......
......@@ -65,7 +65,7 @@ private:
SdVolume volume;
SdFile file;
#define SD_PROCEDURE_DEPTH 1
#define MAXPATHNAMELENGTH (FILENAME_LENGTH * MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
#define MAXPATHNAMELENGTH (FILENAME_LENGTH*MAX_DIR_DEPTH + MAX_DIR_DEPTH + 1)
uint8_t file_subcall_ctr;
uint32_t filespos[SD_PROCEDURE_DEPTH];
char filenames[SD_PROCEDURE_DEPTH][MAXPATHNAMELENGTH];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment