German language added, updated spanish language messages, checking if Z live adjust is in allowed range, chcecking for invalid gcodes added, fixed bug in total print time, fixed selftest to avoid false triggering, added auto home after selftest, removed farm mode menu feature, added experimental functions for checking bed properties

This commit is contained in:
PavelSindler 2017-02-14 11:52:48 +01:00
parent ebabaf527a
commit 590cc8f3e8
13 changed files with 1046 additions and 389 deletions

View File

@ -5,7 +5,7 @@
#include "Configuration_prusa.h"
// Firmware version
#define FW_version "3.0.10-RC1"
#define FW_version "3.0.10"
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10

View File

@ -317,3 +317,13 @@ extern void calculate_volumetric_multipliers();
// Similar to the default Arduino delay function,
// but it keeps the background tasks running.
extern void delay_keep_alive(int ms);
extern void check_babystep();
#ifdef DIS
void d_setup();
float d_ReadData();
void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_points_num, float shift_x, float shift_y);
#endif

View File

@ -1155,7 +1155,9 @@ void setup()
if (lang_selected >= LANG_NUM){
lcd_mylang();
}
check_babystep(); //checking if Z babystep is in allowed range
if (calibration_status() == CALIBRATION_STATUS_ASSEMBLED ||
calibration_status() == CALIBRATION_STATUS_UNKNOWN) {
// Reset the babystepping values, so the printer will not move the Z axis up when the babystepping is enabled.
@ -1553,7 +1555,7 @@ void get_command()
// Return True if a character was found
static inline bool code_seen(char code) { return (strchr_pointer = strchr(CMDBUFFER_CURRENT_STRING, code)) != NULL; }
static inline bool code_seen(const char *code) { return (strchr_pointer = strstr(CMDBUFFER_CURRENT_STRING, code)) != NULL; }
static inline float code_value() { return strtod(strchr_pointer+1, NULL); }
static inline float code_value() { return strtod(strchr_pointer+1, NULL);}
static inline long code_value_long() { return strtol(strchr_pointer+1, NULL, 10); }
static inline int16_t code_value_short() { return int16_t(strtol(strchr_pointer+1, NULL, 10)); };
static inline uint8_t code_value_uint8() { return uint8_t(strtol(strchr_pointer+1, NULL, 10)); };
@ -1956,7 +1958,15 @@ void process_commands()
int8_t SilentMode;
#endif
if(code_seen("PRUSA")){
if (code_seen("fv")) {
if (code_seen("fn")) {
if (farm_mode) {
MYSERIAL.println(farm_no);
}
else {
MYSERIAL.println("Not in farm mode.");
}
}else if (code_seen("fv")) {
// get file version
#ifdef SDSUPPORT
card.openFile(strchr_pointer + 3,true);
@ -2756,8 +2766,37 @@ void process_commands()
* v Y-axis
*
*/
#ifdef DIS
case 77:
{
//G77 X200 Y150 XP100 YP15 XO10 Y015
//for 9 point mesh bed leveling G77 X203 Y196 XP3 YP3 XO0 YO0
//G77 X232 Y218 XP116 YP109 XO-11 YO0
float dimension_x = 40;
float dimension_y = 40;
int points_x = 40;
int points_y = 40;
float offset_x = 74;
float offset_y = 33;
if (code_seen('X')) dimension_x = code_value();
if (code_seen('Y')) dimension_y = code_value();
if (code_seen('XP')) points_x = code_value();
if (code_seen('YP')) points_y = code_value();
if (code_seen('XO')) offset_x = code_value();
if (code_seen('YO')) offset_y = code_value();
bed_analysis(dimension_x,dimension_y,points_x,points_y,offset_x,offset_y);
} break;
#endif
case 80:
case_G80:
{
@ -3087,9 +3126,17 @@ void process_commands()
else if(code_seen('M'))
{
switch( (int)code_value() )
int index;
for (index = 1; *(strchr_pointer + index) == ' ' || *(strchr_pointer + index) == '\t'; index++);
/*for (++strchr_pointer; *strchr_pointer == ' ' || *strchr_pointer == '\t'; ++strchr_pointer);*/
if (*(strchr_pointer+index) < '0' || *(strchr_pointer+index) > '9') {
SERIAL_ECHOLNPGM("Invalid M code");
} else
switch((int)code_value())
{
#ifdef ULTIPANEL
case 0: // M0 - Unconditional stop - Wait for user button press on LCD
case 1: // M1 - Conditional stop - Wait for user button press on LCD
{
@ -5104,7 +5151,7 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
{
custom_message = true;
custom_message_type = 2;
lcd_setstatuspgm(MSG_UNLOADING_FILAMENT); //need to be tranlated to spanish language
lcd_setstatuspgm(MSG_UNLOADING_FILAMENT);
current_position[E_AXIS] -= 80;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 7000 / 60, active_extruder);
@ -5122,98 +5169,109 @@ case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
gcode_LastN = Stopped_gcode_LastN;
FlushSerialRequestResend();
break;
default: SERIAL_ECHOLNPGM("Invalid M code.");
}
} // end if(code_seen('M')) (end of M codes)
else if(code_seen('T'))
{
tmp_extruder = code_value();
int index;
for (index = 1; *(strchr_pointer + index) == ' ' || *(strchr_pointer + index) == '\t'; index++);
if (*(strchr_pointer + index) < '0' || *(strchr_pointer + index) > '9') {
SERIAL_ECHOLNPGM("Invalid T code.");
}
else {
tmp_extruder = code_value();
#ifdef SNMM
st_synchronize();
delay(100);
disable_e0();
disable_e1();
disable_e2();
pinMode(E_MUX0_PIN,OUTPUT);
pinMode(E_MUX1_PIN,OUTPUT);
pinMode(E_MUX2_PIN,OUTPUT);
delay(100);
SERIAL_ECHO_START;
SERIAL_ECHO("T:");
SERIAL_ECHOLN((int)tmp_extruder);
switch (tmp_extruder) {
case 1:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
case 2:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
case 3:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
default:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
}
delay(100);
st_synchronize();
delay(100);
disable_e0();
disable_e1();
disable_e2();
pinMode(E_MUX0_PIN, OUTPUT);
pinMode(E_MUX1_PIN, OUTPUT);
pinMode(E_MUX2_PIN, OUTPUT);
delay(100);
SERIAL_ECHO_START;
SERIAL_ECHO("T:");
SERIAL_ECHOLN((int)tmp_extruder);
switch (tmp_extruder) {
case 1:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
case 2:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
case 3:
WRITE(E_MUX0_PIN, HIGH);
WRITE(E_MUX1_PIN, HIGH);
WRITE(E_MUX2_PIN, LOW);
break;
default:
WRITE(E_MUX0_PIN, LOW);
WRITE(E_MUX1_PIN, LOW);
WRITE(E_MUX2_PIN, LOW);
break;
}
delay(100);
#else
if(tmp_extruder >= EXTRUDERS) {
SERIAL_ECHO_START;
SERIAL_ECHO("T");
SERIAL_ECHO(tmp_extruder);
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
}
else {
boolean make_move = false;
if(code_seen('F')) {
make_move = true;
next_feedrate = code_value();
if(next_feedrate > 0.0) {
feedrate = next_feedrate;
}
}
#if EXTRUDERS > 1
if(tmp_extruder != active_extruder) {
// Save current position to return to after applying extruder offset
memcpy(destination, current_position, sizeof(destination));
// Offset extruder (only by XY)
int i;
for(i = 0; i < 2; i++) {
current_position[i] = current_position[i] -
extruder_offset[i][active_extruder] +
extruder_offset[i][tmp_extruder];
}
// Set the new active extruder and position
active_extruder = tmp_extruder;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
// Move to the old position if 'F' was in the parameters
if(make_move && Stopped == false) {
prepare_move();
}
}
#endif
SERIAL_ECHO_START;
SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder);
}
if (tmp_extruder >= EXTRUDERS) {
SERIAL_ECHO_START;
SERIAL_ECHOPGM("T");
SERIAL_PROTOCOLLN((int)tmp_extruder);
SERIAL_ECHOLNRPGM(MSG_INVALID_EXTRUDER);
}
else {
boolean make_move = false;
if (code_seen('F')) {
make_move = true;
next_feedrate = code_value();
if (next_feedrate > 0.0) {
feedrate = next_feedrate;
}
}
#if EXTRUDERS > 1
if (tmp_extruder != active_extruder) {
// Save current position to return to after applying extruder offset
memcpy(destination, current_position, sizeof(destination));
// Offset extruder (only by XY)
int i;
for (i = 0; i < 2; i++) {
current_position[i] = current_position[i] -
extruder_offset[i][active_extruder] +
extruder_offset[i][tmp_extruder];
}
// Set the new active extruder and position
active_extruder = tmp_extruder;
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
// Move to the old position if 'F' was in the parameters
if (make_move && Stopped == false) {
prepare_move();
}
}
#endif
SERIAL_ECHO_START;
SERIAL_ECHORPGM(MSG_ACTIVE_EXTRUDER);
SERIAL_PROTOCOLLN((int)active_extruder);
}
#endif
}
} // end if(code_seen('T')) (end of T codes)
else
@ -5673,7 +5731,7 @@ bool setTargetedHotend(int code){
SERIAL_ECHO_START;
switch(code){
case 104:
SERIAL_ECHO(MSG_M104_INVALID_EXTRUDER);
SERIAL_ECHORPGM(MSG_M104_INVALID_EXTRUDER);
break;
case 105:
SERIAL_ECHO(MSG_M105_INVALID_EXTRUDER);
@ -5688,14 +5746,14 @@ bool setTargetedHotend(int code){
SERIAL_ECHO(MSG_M221_INVALID_EXTRUDER);
break;
}
SERIAL_ECHOLN(tmp_extruder);
SERIAL_PROTOCOLLN((int)tmp_extruder);
return true;
}
}
return false;
}
void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time) //_total_filament_used unit: mm/100
void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time) //_total_filament_used unit: mm/100; print time in s
{
if (eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 1) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 2) == 255 && eeprom_read_byte((uint8_t *)EEPROM_TOTALTIME + 3) == 255)
{
@ -5704,9 +5762,9 @@ void save_statistics(unsigned long _total_filament_used, unsigned long _total_pr
}
unsigned long _previous_filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED); //_previous_filament unit: cm
unsigned long _previous_time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME);
unsigned long _previous_time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME); //_previous_time unit: min
eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, _previous_time + (_total_print_time/60));
eeprom_update_dword((uint32_t *)EEPROM_TOTALTIME, _previous_time + (_total_print_time/60)); //EEPROM_TOTALTIME unit: min
eeprom_update_dword((uint32_t *)EEPROM_FILAMENTUSED, _previous_filament + (_total_filament_used / 1000));
total_filament_used = 0;
@ -5756,3 +5814,253 @@ void delay_keep_alive(int ms)
}
}
}
void check_babystep() {
int babystep_z;
EEPROM_read_B(EEPROM_BABYSTEP_Z, &babystep_z);
if ((babystep_z < Z_BABYSTEP_MIN) || (babystep_z > Z_BABYSTEP_MAX)) {
babystep_z = 0; //if babystep value is out of min max range, set it to 0
SERIAL_ECHOLNPGM("Z live adjust out of range. Setting to 0");
EEPROM_save_B(EEPROM_BABYSTEP_Z, &babystep_z);
lcd_show_fullscreen_message_and_wait_P(PSTR("Z live adjust out of range. Setting to 0. Click to continue."));
lcd_update_enable(true);
}
}
#ifdef DIS
void d_setup()
{
pinMode(D_DATACLOCK, INPUT_PULLUP);
pinMode(D_DATA, INPUT_PULLUP);
pinMode(D_REQUIRE, OUTPUT);
digitalWrite(D_REQUIRE, HIGH);
}
float d_ReadData()
{
int digit[13];
String mergeOutput;
float output;
digitalWrite(D_REQUIRE, HIGH);
for (int i = 0; i<13; i++)
{
for (int j = 0; j < 4; j++)
{
while (digitalRead(D_DATACLOCK) == LOW) {}
while (digitalRead(D_DATACLOCK) == HIGH) {}
bitWrite(digit[i], j, digitalRead(D_DATA));
}
}
digitalWrite(D_REQUIRE, LOW);
mergeOutput = "";
output = 0;
for (int r = 5; r <= 10; r++) //Merge digits
{
mergeOutput += digit[r];
}
output = mergeOutput.toFloat();
if (digit[4] == 8) //Handle sign
{
output *= -1;
}
for (int i = digit[11]; i > 0; i--) //Handle floating point
{
output /= 10;
}
return output;
}
void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_points_num, float shift_x, float shift_y) {
int t1 = 0;
int t_delay = 0;
int digit[13];
int m;
char str[3];
//String mergeOutput;
char mergeOutput[15];
float output;
int mesh_point = 0; //index number of calibration point
float bed_zero_ref_x = (-22.f + X_PROBE_OFFSET_FROM_EXTRUDER); //shift between zero point on bed and target and between probe and nozzle
float bed_zero_ref_y = (-0.6f + Y_PROBE_OFFSET_FROM_EXTRUDER);
float mesh_home_z_search = 4;
float row[x_points_num];
int ix = 0;
int iy = 0;
char* filename_wldsd = "wldsd.txt";
char data_wldsd[70];
char numb_wldsd[10];
d_setup();
if (!(axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS])) {
// We don't know where we are! HOME!
// Push the commands to the front of the message queue in the reverse order!
// There shall be always enough space reserved for these commands.
repeatcommand_front(); // repeat G80 with all its parameters
enquecommand_front_P((PSTR("G28 W0")));
enquecommand_front_P((PSTR("G1 Z5")));
return;
}
bool custom_message_old = custom_message;
unsigned int custom_message_type_old = custom_message_type;
unsigned int custom_message_state_old = custom_message_state;
custom_message = true;
custom_message_type = 1;
custom_message_state = (x_points_num * y_points_num) + 10;
lcd_update(1);
mbl.reset();
babystep_undo();
card.openFile(filename_wldsd, false);
current_position[Z_AXIS] = mesh_home_z_search;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], homing_feedrate[Z_AXIS] / 60, active_extruder);
int XY_AXIS_FEEDRATE = homing_feedrate[X_AXIS] / 20;
int Z_PROBE_FEEDRATE = homing_feedrate[Z_AXIS] / 60;
int Z_LIFT_FEEDRATE = homing_feedrate[Z_AXIS] / 40;
setup_for_endstop_move(false);
SERIAL_PROTOCOLPGM("Num X,Y: ");
SERIAL_PROTOCOL(x_points_num);
SERIAL_PROTOCOLPGM(",");
SERIAL_PROTOCOL(y_points_num);
SERIAL_PROTOCOLPGM("\nZ search height: ");
SERIAL_PROTOCOL(mesh_home_z_search);
SERIAL_PROTOCOLPGM("\nDimension X,Y: ");
SERIAL_PROTOCOL(x_dimension);
SERIAL_PROTOCOLPGM(",");
SERIAL_PROTOCOL(y_dimension);
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
while (mesh_point != x_points_num * y_points_num) {
ix = mesh_point % x_points_num; // from 0 to MESH_NUM_X_POINTS - 1
iy = mesh_point / x_points_num;
if (iy & 1) ix = (x_points_num - 1) - ix; // Zig zag
float z0 = 0.f;
current_position[Z_AXIS] = mesh_home_z_search;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], Z_LIFT_FEEDRATE, active_extruder);
st_synchronize();
current_position[X_AXIS] = 13.f + ix * (x_dimension / (x_points_num - 1)) - bed_zero_ref_x + shift_x;
current_position[Y_AXIS] = 6.4f + iy * (y_dimension / (y_points_num - 1)) - bed_zero_ref_y + shift_y;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], XY_AXIS_FEEDRATE, active_extruder);
st_synchronize();
if (!find_bed_induction_sensor_point_z(-10.f)) { //if we have data from z calibration max allowed difference is 1mm for each point, if we dont have data max difference is 10mm from initial point
break;
card.closefile();
}
//memset(numb_wldsd, 0, sizeof(numb_wldsd));
//dtostrf(d_ReadData(), 8, 5, numb_wldsd);
//strcat(data_wldsd, numb_wldsd);
//MYSERIAL.println(data_wldsd);
//delay(1000);
//delay(3000);
//t1 = millis();
//while (digitalRead(D_DATACLOCK) == LOW) {}
//while (digitalRead(D_DATACLOCK) == HIGH) {}
memset(digit, 0, sizeof(digit));
//cli();
digitalWrite(D_REQUIRE, LOW);
for (int i = 0; i<13; i++)
{
//t1 = millis();
for (int j = 0; j < 4; j++)
{
while (digitalRead(D_DATACLOCK) == LOW) {}
while (digitalRead(D_DATACLOCK) == HIGH) {}
bitWrite(digit[i], j, digitalRead(D_DATA));
}
//t_delay = (millis() - t1);
//SERIAL_PROTOCOLPGM(" ");
//SERIAL_PROTOCOL_F(t_delay, 5);
//SERIAL_PROTOCOLPGM(" ");
}
//sei();
digitalWrite(D_REQUIRE, HIGH);
mergeOutput[0] = '\0';
output = 0;
for (int r = 5; r <= 10; r++) //Merge digits
{
sprintf(str, "%d", digit[r]);
strcat(mergeOutput, str);
}
output = atof(mergeOutput);
if (digit[4] == 8) //Handle sign
{
output *= -1;
}
for (int i = digit[11]; i > 0; i--) //Handle floating point
{
output *= 0.1;
}
//output = d_ReadData();
//row[ix] = current_position[Z_AXIS];
memset(data_wldsd, 0, sizeof(data_wldsd));
for (int i = 0; i <3; i++) {
memset(numb_wldsd, 0, sizeof(numb_wldsd));
dtostrf(current_position[i], 8, 5, numb_wldsd);
strcat(data_wldsd, numb_wldsd);
strcat(data_wldsd, ";");
}
memset(numb_wldsd, 0, sizeof(numb_wldsd));
dtostrf(output, 8, 5, numb_wldsd);
strcat(data_wldsd, numb_wldsd);
//strcat(data_wldsd, ";");
card.write_command(data_wldsd);
//row[ix] = d_ReadData();
row[ix] = output; // current_position[Z_AXIS];
if (iy % 2 == 1 ? ix == 0 : ix == x_points_num - 1) {
for (int i = 0; i < x_points_num; i++) {
SERIAL_PROTOCOLPGM(" ");
SERIAL_PROTOCOL_F(row[i], 5);
}
SERIAL_PROTOCOLPGM("\n");
}
custom_message_state--;
mesh_point++;
lcd_update(1);
}
card.closefile();
}
#endif

View File

@ -4,7 +4,7 @@
use strict;
use warnings;
my @langs = ("en","cz","it","es","pl");
my @langs = ("en","cz","it","es","pl","de");
sub parselang
{

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,7 @@
#define LANG_ID_IT 2
#define LANG_ID_ES 3
#define LANG_ID_PL 4
#define LANG_ID_DE 5
// Language is not defined and it shall be selected from the menu.
#define LANG_ID_FORCE_SELECTION 254
// Language is not defined on a virgin RAMBo board.
@ -16,7 +17,7 @@
#define LANG_ID_DEFAULT LANG_ID_CZ
// Number of languages available in the language table.
#define LANG_NUM 5
#define LANG_NUM 6
// Currectly active language selection.
extern unsigned char lang_selected;

View File

@ -27,7 +27,7 @@
#define MSG_NOZZLE1 "Nozzle2"
#define MSG_NOZZLE2 "Nozzle3"
#define MSG_BED "Bed"
#define MSG_FAN_SPEED "Fan speed"
#define(length=14) MSG_FAN_SPEED "Fan speed"
#define MSG_FLOW "Flow"
#define MSG_FLOW0 "Flow 0"
#define MSG_FLOW1 "Flow 1"
@ -64,7 +64,7 @@
#define MSG_BABYSTEP_X "Babystep X"
#define MSG_BABYSTEP_Y "Babystep Y"
#define MSG_BABYSTEP_Z "Live adjust Z"
#define MSG_ADJUSTZ "Auto adjust Z ?"
#define MSG_ADJUSTZ "Auto adjust Z?"
#define MSG_PICK_Z "Pick print"
#define MSG_SETTINGS "Settings"
@ -166,7 +166,7 @@
#define MSG_SELFTEST_OK "Self test OK"
#define MSG_LOOSE_PULLEY "Loose pulley"
#define MSG_SELFTEST_FAN "Fan test";
#define(length=20) MSG_SELFTEST_FAN "Fan test";
#define(length=20) MSG_SELFTEST_COOLING_FAN "Front print fan?";
#define(length=20) MSG_SELFTEST_EXTRUDER_FAN "Left hotend fan?";
#define MSG_SELFTEST_FAN_YES "Spinning";
@ -251,7 +251,7 @@
#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=2) MSG_FILAMENT_CLEAN "Is color clear?"
#define(lenght=20, 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 MSG_BED_CORRECTION_MENU "Bed level correct"

View File

@ -6,8 +6,8 @@
*
*/
#define WELCOME_MSG CUSTOM_MENDEL_NAME " lista"
#define MSG_SD_INSERTED "Tarjeta colocada"
#define WELCOME_MSG CUSTOM_MENDEL_NAME " prep."
#define MSG_SD_INSERTED "Tarjeta insertada"
#define MSG_SD_REMOVED "Tarjeta retirada"
#define MSG_MAIN "Menu principal"
#define MSG_DISABLE_STEPPERS "Apagar motores"
@ -17,11 +17,11 @@
#define MSG_MOVE_X "Mover X"
#define MSG_MOVE_Y "Mover Y"
#define MSG_MOVE_Z "Mover Z"
#define MSG_MOVE_E "Extrusor"
#define MSG_MOVE_E "Extruir"
#define MSG_SPEED "Velocidad"
#define MSG_NOZZLE "Fusor"
#define MSG_NOZZLE "Boquilla"
#define MSG_BED "Base"
#define MSG_FAN_SPEED "Ventilador"
#define MSG_FAN_SPEED "Velocidad Vent."
#define MSG_FLOW "Flujo"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_WATCH "Monitorizar"
@ -29,49 +29,49 @@
#define MSG_PAUSE_PRINT "Pausar impresion"
#define MSG_RESUME_PRINT "Reanudar impres."
#define MSG_STOP_PRINT "Detener impresion"
#define MSG_CARD_MENU "Menu de SD"
#define MSG_CARD_MENU "Menu tarjeta SD"
#define MSG_NO_CARD "No hay tarjeta SD"
#define MSG_DWELL "Reposo..."
#define MSG_DWELL "En espera"
#define MSG_USERWAIT "Esperando ordenes"
#define MSG_RESUMING "Resumiendo impre."
#define MSG_PRINT_ABORTED "Print aborted"
#define MSG_RESUMING "Resumiendo impresion"
#define MSG_PRINT_ABORTED "Impresion cancelada"
#define MSG_NO_MOVE "Sin movimiento"
#define MSG_KILLED "PARADA DE EMERG."
#define MSG_KILLED "PARADA DE EMERGENCIA"
#define MSG_STOPPED "PARADA"
#define MSG_FILAMENTCHANGE "Cambiar filamento"
#define MSG_BABYSTEP_Z "Micropaso Z"
#define MSG_ADJUSTZ "Auto Micropaso Z?"
#define MSG_PICK_Z "Vyberte vytisk"
#define MSG_BABYSTEP_Z "Micropaso Eje Z"
#define MSG_ADJUSTZ "Ajustar Eje Z"
#define MSG_PICK_Z "Esc. Modelo Adecuado"
#define MSG_SETTINGS "Ajuste"
#define MSG_SETTINGS "Configuracion"
#define MSG_PREHEAT "Precalentar"
#define MSG_UNLOAD_FILAMENT "Sacar filamento"
#define MSG_LOAD_FILAMENT "Poner filamento"
#define MSG_UNLOAD_FILAMENT "Soltar filamento"
#define MSG_LOAD_FILAMENT "Introducir filam."
#define MSG_ERROR "ERROR:"
#define MSG_PREHEAT_NOZZLE "Precal. extrusor!"
#define MSG_SUPPORT "Support"
#define MSG_CORRECTLY "Cambiado correc.?"
#define MSG_PREHEAT_NOZZLE "Precalentar extrusor"
#define MSG_SUPPORT "Soporte"
#define MSG_CORRECTLY "Cambiado correct.?"
#define MSG_YES "Si"
#define MSG_NO "No"
#define MSG_NOT_LOADED "Fil. no cargado"
#define MSG_NOT_COLOR "Color no claro"
#define MSG_LOADING_FILAMENT "Cargando fil."
#define MSG_PLEASE_WAIT "Espera"
#define MSG_LOADING_COLOR "Cargando color"
#define MSG_CHANGE_SUCCESS "Cambiar bien!"
#define MSG_PRESS "y pulse el mando"
#define MSG_INSERT_FILAMENT "Inserta filamento"
#define MSG_CHANGING_FILAMENT "Cambiando fil.!"
#define MSG_NOT_LOADED "Fil. no introducido"
#define MSG_NOT_COLOR "Color no homogeneo"
#define MSG_LOADING_FILAMENT "Introduciendo filam."
#define MSG_PLEASE_WAIT "Por Favor Esperar"
#define MSG_LOADING_COLOR "Cambiando color"
#define MSG_CHANGE_SUCCESS "Cambio correcto"
#define MSG_PRESS "Pulsar el mando"
#define MSG_INSERT_FILAMENT "Introducir filamento"
#define MSG_CHANGING_FILAMENT "Cambiando filamento"
#define MSG_SILENT_MODE_ON "Modo [silencio]"
#define MSG_SILENT_MODE_OFF "Modo [mas fuerza]"
#define MSG_REBOOT "Reiniciar la imp."
#define MSG_TAKE_EFFECT "para tomar efecto"
#define MSG_SILENT_MODE_OFF "Modo [rend.pleno]"
#define MSG_REBOOT "Reiniciar impresora"
#define MSG_TAKE_EFFECT " para aplicar cambios"
#define MSG_HEATING "Calentando..."
#define MSG_HEATING_COMPLETE "Calentando listo."
#define MSG_BED_HEATING "Base Calentando"
#define MSG_BED_DONE "Base listo."
#define MSG_HEATING_COMPLETE "Calentamiento final."
#define MSG_BED_HEATING "Calentando Base"
#define MSG_BED_DONE "Base preparada"
#define MSG_LANGUAGE_NAME "Espanol"
#define MSG_LANGUAGE_SELECT "Cambia la lengua "
#define MSG_LANGUAGE_SELECT "Cambiae el idioma"
#define MSG_PRUSA3D "prusa3d.com"
#define MSG_PRUSA3D_FORUM "forum.prusa3d.com"
#define MSG_PRUSA3D_HOWTO "howto.prusa3d.com"
@ -252,4 +252,5 @@
#define MSG_CLEAN_NOZZLE_E "E calibrado. Limpiar la boquilla. Haga clic una vez terminado."
#define MSG_WAITING_TEMP "Esperando enfriamiento de la cama y del extrusor."
#define MSG_FILAMENT_CLEAN "Es el nuevo color nitido?"
#define MSG_UNLOADING_FILAMENT "Soltando filamento"
#define MSG_UNLOADING_FILAMENT "Soltando filamento"
#define MSG_PAPER "Colocar una hoja de papel sobre la superficie de impresion durante la calibracion de los primeros 4 puntos. Si la boquilla mueve el papel, apagar impresora inmediatamente."

View File

@ -1,4 +1,4 @@
#define WELCOME_MSG CUSTOM_MENDEL_NAME "pronta."
#define WELCOME_MSG CUSTOM_MENDEL_NAME " pronta."
#define MSG_SD_INSERTED "SD inserita"
#define MSG_SD_REMOVED "SD rimossa"
#define MSG_MAIN "Menu principale"
@ -22,7 +22,7 @@
#define MSG_NOZZLE1 "Nozzle2"
#define MSG_NOZZLE2 "Nozzle3"
#define MSG_BED "Letto"
#define MSG_FAN_SPEED "Velocita ventola"
#define MSG_FAN_SPEED "Velocita vent."
#define MSG_FLOW "Flusso"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Motion"
@ -84,7 +84,7 @@
#define MSG_LOAD_FILAMENT "Carica filamento"
#define MSG_SILENT_MODE_ON "Modo [silenzioso]"
#define MSG_SILENT_MODE_OFF "Mode [forte]"
#define MSG_SILENT_MODE_OFF "Mode [forte]"
#define MSG_REBOOT "Riavvia stampante"
#define MSG_TAKE_EFFECT " per attualizzare"
@ -220,9 +220,9 @@
#define MSG_BABYSTEP_Z_NOT_SET "Distanza tra la punta dell'ugello e la superficie del letto non ancora imposta. Si prega di seguire il manuale, capitolo First steps, sezione First layer calibration."
#define MSG_BED_CORRECTION_MENU "Correz. liv.letto"
#define MSG_BED_CORRECTION_LEFT "Lato sinistro um"
#define MSG_BED_CORRECTION_RIGHT "Lato destro um"
#define MSG_BED_CORRECTION_FRONT "Lato ateriore um"
#define MSG_BED_CORRECTION_LEFT "Lato sinistro"
#define MSG_BED_CORRECTION_RIGHT "Lato destro"
#define MSG_BED_CORRECTION_FRONT "Lato ateriore"
#define MSG_BED_CORRECTION_REAR "Lato posteriore"
#define MSG_BED_CORRECTION_RESET "Reset"
@ -245,6 +245,7 @@
#define MSG_E_CAL_KNOB "Girare la manopola affinche' il segno raggiunga il corpo dell'estrusore. Click per continuare."
#define MSG_MARK_FIL "Segnare il filamento a 100 mm di distanza dal corpo dell'estrusore. Click per continuare."
#define MSG_CLEAN_NOZZLE_E "Calibrazione E terminata. Si prega di pulire l'ugello. Click per continuare."
#define MSG_WAITING_TEMP "In attesa del raffreddamento della testina e del piatto."
#define MSG_WAITING_TEMP "In attesa del raffreddamento della testina e del piatto"
#define MSG_FILAMENT_CLEAN "Il colore e' nitido?"
#define MSG_UNLOADING_FILAMENT "Rilasc. filamento"
#define MSG_UNLOADING_FILAMENT "Rilasc. filamento"
#define MSG_PAPER "Porre un foglio sotto l'ugello durante la calibrazione dei primi 4 punti. In caso l'ugello muova il foglio spegnere prontamente la stampante."

View File

@ -64,7 +64,7 @@
#define MSG_SILENT_MODE_ON "Mod [cichy]"
#define MSG_SILENT_MODE_OFF "Mod [w wydajnosc]"
#define MSG_REBOOT "Restart drukarki"
#define MSG_TAKE_EFFECT "wprow. zmian"
#define MSG_TAKE_EFFECT " wprow. zmian"
#define MSG_HEATING "Grzanie..."
#define MSG_HEATING_COMPLETE "Grzanie OK."
#define MSG_BED_HEATING "Grzanie stolika.."
@ -258,4 +258,5 @@
#define MSG_CLEAN_NOZZLE_E "Kalibracja E skonczona. Prosze oczyscic dysze. Potem potwierdzic przyciskiem. "
#define MSG_WAITING_TEMP "Oczekiwanie na wychlodzenie dyszy i podkladki."
#define MSG_FILAMENT_CLEAN "Czy kolor jest czysty?"
#define MSG_UNLOADING_FILAMENT "Wysuwam filament"
#define MSG_UNLOADING_FILAMENT "Wysuwam filament"
#define MSG_PAPER "Umiesc kartke papieru na podkladce i trzymaj pod dysza podczas pomiaru pierwszych 4 punktow. Jesli dysza zahaczy o papier, wylacz drukarke."

View File

@ -2156,8 +2156,11 @@ void babystep_apply()
// Apply Z height correction aka baby stepping before mesh bed leveling gets activated.
if(calibration_status() == CALIBRATION_STATUS_CALIBRATED)
{
// End of G80: Apply the baby stepping value.
check_babystep(); //checking if babystep is in allowed range, otherwise setting babystep to 0
// End of G80: Apply the baby stepping value.
EEPROM_read_B(EEPROM_BABYSTEP_Z,&babystepLoadZ);
#if 0
SERIAL_ECHO("Z baby step: ");
SERIAL_ECHO(babystepLoadZ);

View File

@ -71,7 +71,15 @@
#endif
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#ifdef DIS
#define D_REQUIRE 30
#define D_DATA 20
#define D_DATACLOCK 21
#endif
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#define SDSS 53
#ifndef SDSUPPORT

View File

@ -1096,7 +1096,6 @@ void lcd_menu_statistics()
int _cm = (total_filament_used - (_met * 100000))/10;
int _t = (millis() - starttime) / 1000;
int _h = _t / 3600;
int _m = (_t - (_h * 3600)) / 60;
int _s = _t - ((_h * 3600) + (_m * 60));
@ -1130,8 +1129,10 @@ void lcd_menu_statistics()
else
{
unsigned long _filament = eeprom_read_dword((uint32_t *)EEPROM_FILAMENTUSED);
unsigned long _time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME);
uint8_t _days, _hours, _minutes;
unsigned long _time = eeprom_read_dword((uint32_t *)EEPROM_TOTALTIME); //in minutes
uint8_t _hours, _minutes;
uint32_t _days;
float _filament_m = (float)_filament;
int _filament_km = (_filament >= 100000) ? _filament / 100000 : 0;
@ -1287,13 +1288,18 @@ static void _lcd_babystep(int axis, const char *msg)
// Menu was entered.
// Initialize its status.
menuData.babyStep.status = 1;
EEPROM_read_B(EEPROM_BABYSTEP_X, &menuData.babyStep.babystepMem[0]);
check_babystep();
EEPROM_read_B(EEPROM_BABYSTEP_X, &menuData.babyStep.babystepMem[0]);
EEPROM_read_B(EEPROM_BABYSTEP_Y, &menuData.babyStep.babystepMem[1]);
EEPROM_read_B(EEPROM_BABYSTEP_Z, &menuData.babyStep.babystepMem[2]);
menuData.babyStep.babystepMemMM[0] = menuData.babyStep.babystepMem[0]/axis_steps_per_unit[X_AXIS];
menuData.babyStep.babystepMemMM[1] = menuData.babyStep.babystepMem[1]/axis_steps_per_unit[Y_AXIS];
menuData.babyStep.babystepMemMM[2] = menuData.babyStep.babystepMem[2]/axis_steps_per_unit[Z_AXIS];
lcdDrawUpdate = 1;
//SERIAL_ECHO("Z baby step: ");
//SERIAL_ECHO(menuData.babyStep.babystepMem[2]);
// Wait 90 seconds before closing the live adjust dialog.
lcd_timeoutToStatus = millis() + 90000;
}
@ -1301,11 +1307,18 @@ static void _lcd_babystep(int axis, const char *msg)
if (encoderPosition != 0)
{
if (homing_flag) encoderPosition = 0;
CRITICAL_SECTION_START
babystepsTodo[axis] += (int)encoderPosition;
CRITICAL_SECTION_END
menuData.babyStep.babystepMem[axis] += (int)encoderPosition;
menuData.babyStep.babystepMemMM[axis] = menuData.babyStep.babystepMem[axis]/axis_steps_per_unit[Z_AXIS];
if (axis == 2) {
if (menuData.babyStep.babystepMem[axis] < Z_BABYSTEP_MIN) menuData.babyStep.babystepMem[axis] = Z_BABYSTEP_MIN; //-3999 -> -9.99 mm
else if (menuData.babyStep.babystepMem[axis] > Z_BABYSTEP_MAX) menuData.babyStep.babystepMem[axis] = Z_BABYSTEP_MAX; //0
else {
CRITICAL_SECTION_START
babystepsTodo[axis] += (int)encoderPosition;
CRITICAL_SECTION_END
}
}
menuData.babyStep.babystepMemMM[axis] = menuData.babyStep.babystepMem[axis]/axis_steps_per_unit[axis];
delay(50);
encoderPosition = 0;
lcdDrawUpdate = 1;
@ -1745,13 +1758,13 @@ int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow
manage_inactivity(true);
if (abs(enc_dif - encoderDiff) > 4) {
lcd.setCursor(0, 2);
if (enc_dif > encoderDiff && yes) {
if (enc_dif < encoderDiff && yes) {
lcd_printPGM((PSTR(" ")));
lcd.setCursor(0, 3);
lcd_printPGM((PSTR(">")));
yes = false;
}
else if (enc_dif < encoderDiff && !yes) {
else if (enc_dif > encoderDiff && !yes) {
lcd_printPGM((PSTR(">")));
lcd.setCursor(0, 3);
lcd_printPGM((PSTR(" ")));
@ -2343,7 +2356,7 @@ static void lcd_settings_menu()
if (!isPrintPaused && !homing_flag)
{
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);//8
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
}
MENU_ITEM(submenu, MSG_LANGUAGE_SELECT, lcd_language_menu);
@ -3038,7 +3051,7 @@ static void lcd_main_menu()
MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
if (farm_mode && !IS_SD_PRINTING )
/* if (farm_mode && !IS_SD_PRINTING )
{
int tempScrool = 0;
@ -3085,7 +3098,7 @@ static void lcd_main_menu()
MENU_ITEM(back, PSTR("- - - - - - - - -"), lcd_status_screen);
}
}*/
@ -3321,7 +3334,7 @@ void lcd_sdcard_stop()
card.closefile();
stoptime = millis();
unsigned long t = (stoptime - starttime) / 1000;
unsigned long t = (stoptime - starttime) / 1000; //time in s
save_statistics(total_filament_used, t);
lcd_return_to_status();
@ -3577,7 +3590,7 @@ static void lcd_selftest()
if (_result)
{
_progress = lcd_selftest_screen(2, _progress, 3, true, 2000);
_progress = lcd_selftest_screen(2, _progress, 3, true, 0);
_result = lcd_selfcheck_pulleys(X_AXIS);
}
@ -3590,7 +3603,7 @@ static void lcd_selftest()
if (_result)
{
_progress = lcd_selftest_screen(3, _progress, 3, true, 1500);
_progress = lcd_selftest_screen(3, _progress, 3, true, 0);
_result = lcd_selfcheck_pulleys(Y_AXIS);
}
@ -3601,8 +3614,7 @@ static void lcd_selftest()
current_position[Y_AXIS] = current_position[Y_AXIS] - 14;
_progress = lcd_selftest_screen(4, _progress, 3, true, 1500);
_result = lcd_selfcheck_axis(2, Z_MAX_POS);
current_position[Z_AXIS] = current_position[Z_AXIS] + 15;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
enquecommand_P(PSTR("G28 W"));
}
if (_result)
@ -3644,15 +3656,7 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
_travel = _travel + (_travel / 10);
do {
/*if (_axis == 2)
{*/
current_position[_axis] = current_position[_axis] - 1;
/*}
else
{
current_position[_axis] = current_position[_axis] - 3;
}*/
current_position[_axis] = current_position[_axis] - 1;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
st_synchronize();
@ -3663,19 +3667,21 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
{
_stepresult = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? true : false;
_err_endstop = (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? 1 : 2;
disable_x();
}
if (_axis == 1)
{
_stepresult = (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1) ? true : false;
_err_endstop = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? 0 : 2;
disable_y();
}
if (_axis == 2)
{
_stepresult = (READ(Z_MIN_PIN) ^ Z_MIN_ENDSTOP_INVERTING == 1) ? true : false;
_err_endstop = (READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) ? 0 : 1;
disable_z();
/*disable_x();
disable_y();
disable_z();*/
}
_stepdone = true;
}
@ -3691,7 +3697,7 @@ static bool lcd_selfcheck_axis(int _axis, int _travel)
}
manage_heater();
manage_inactivity();
manage_inactivity(true);
//delay(100);
(_travel_done <= _travel) ? _travel_done++ : _stepdone = true;
@ -3739,7 +3745,7 @@ static bool lcd_selfcheck_pulleys(int axis)
int i;
unsigned long timeout_counter;
refresh_cmd_timeout();
manage_inactivity(true);
if (axis == 0) move = 50; //X_AXIS
else move = 50; //Y_AXIS
@ -3753,6 +3759,7 @@ static bool lcd_selfcheck_pulleys(int axis)
current_position[axis] = current_position[axis] + move;
digipot_current(0, 850); //set motor current higher
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], 200, active_extruder);
st_synchronize();
if (SilentModeMenu == 1) digipot_current(0, tmp_motor[0]); //set back to normal operation currents
else digipot_current(0, tmp_motor_loud[0]); //set motor current back
current_position[axis] = current_position[axis] - move;
@ -3765,13 +3772,14 @@ static bool lcd_selfcheck_pulleys(int axis)
}
timeout_counter = millis() + 2500;
endstop_triggered = false;
manage_inactivity(true);
while (!endstop_triggered) {
if ((READ(X_MIN_PIN) ^ X_MIN_ENDSTOP_INVERTING == 1) || (READ(Y_MIN_PIN) ^ Y_MIN_ENDSTOP_INVERTING == 1)) {
endstop_triggered = true;
if (current_position_init - 1 <= current_position[axis] && current_position_init + 1 >= current_position[axis]) {
current_position[axis] += 15;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[3], manual_feedrate[0] / 60, active_extruder);
st_synchronize();
return(true);
}
else {
@ -3813,7 +3821,7 @@ static bool lcd_selfcheck_endstops()
lcd_selftest_error(3, _error.c_str(), "");
}
manage_heater();
manage_inactivity();
manage_inactivity(true);
return _result;
}
@ -3831,14 +3839,14 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
target_temperature[0] = (_isbed) ? 0 : 100;
target_temperature_bed = (_isbed) ? 100 : 0;
manage_heater();
manage_inactivity();
manage_inactivity(true);
do {
_counter++;
(_counter < _cycles) ? _docycle = true : _docycle = false;
manage_heater();
manage_inactivity();
manage_inactivity(true);
_progress = (_isbed) ? lcd_selftest_screen(5, _progress, 2, false, 400) : lcd_selftest_screen(1, _progress, 2, false, 400);
} while (_docycle);
@ -3867,7 +3875,7 @@ static bool lcd_selfcheck_check_heater(bool _isbed)
}
manage_heater();
manage_inactivity();
manage_inactivity(true);
return _stepresult;
}
@ -4073,6 +4081,7 @@ static bool lcd_selftest_fan_dialog(int _fan)
static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay)
{
lcd_next_update_millis = millis() + (LCD_UPDATE_INTERVAL * 10000);
int _step_block = 0;