Removed debug messages from serial comunication (octoprint...).
build 137b
This commit is contained in:
parent
f9d5619682
commit
546314fda7
8 changed files with 15020 additions and 15153 deletions
|
@ -11,7 +11,7 @@
|
|||
#define FW_version "3.1.1-RC3"
|
||||
#define FW_build 138
|
||||
//#define FW_build --BUILD-NUMBER--
|
||||
#define FW_version_build FW_version " b" STR(FW_build)
|
||||
#define FW_version_build FW_version " b" STR(FW_build) "b"
|
||||
|
||||
|
||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1336,7 +1336,7 @@ void loop()
|
|||
KEEPALIVE_STATE(NOT_BUSY);
|
||||
bool stack_integrity = true;
|
||||
|
||||
if (usb_printing_counter > 0 && millis()-_usb_timer > 1000)
|
||||
if ((usb_printing_counter > 0) && ((millis()-_usb_timer) > 1000))
|
||||
{
|
||||
is_usb_printing = true;
|
||||
usb_printing_counter--;
|
||||
|
@ -2574,7 +2574,7 @@ void process_commands()
|
|||
{
|
||||
st_synchronize();
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
SERIAL_ECHOPGM("G28, initial "); print_world_coordinates();
|
||||
SERIAL_ECHOPGM("G28, initial "); print_physical_coordinates();
|
||||
#endif
|
||||
|
@ -2819,10 +2819,11 @@ void process_commands()
|
|||
if (farm_mode) { prusa_statistics(20); };
|
||||
|
||||
homing_flag = false;
|
||||
|
||||
#if 0
|
||||
SERIAL_ECHOPGM("G28, final "); print_world_coordinates();
|
||||
SERIAL_ECHOPGM("G28, final "); print_physical_coordinates();
|
||||
SERIAL_ECHOPGM("G28, final "); print_mesh_bed_leveling_table();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#ifdef ENABLE_AUTO_BED_LEVELING
|
||||
|
@ -3520,14 +3521,14 @@ void process_commands()
|
|||
offset_z = temp_compensation_pinda_thermistor_offset(current_temperature_pinda);
|
||||
#endif //PINDA_THERMISTOR
|
||||
// #ifdef SUPPORT_VERBOSITY
|
||||
// if (verbosity_level >= 1)
|
||||
/* if (verbosity_level >= 1)
|
||||
{
|
||||
SERIAL_ECHOPGM("mesh bed leveling: ");
|
||||
MYSERIAL.print(current_position[Z_AXIS], 5);
|
||||
SERIAL_ECHOPGM(" offset: ");
|
||||
MYSERIAL.print(offset_z, 5);
|
||||
SERIAL_ECHOLNPGM("");
|
||||
}
|
||||
}*/
|
||||
// #endif // SUPPORT_VERBOSITY
|
||||
mbl.set_z(ix, iy, current_position[Z_AXIS] - offset_z); //store measured z values z_values[iy][ix] = z - offset_z;
|
||||
|
||||
|
@ -3550,7 +3551,7 @@ void process_commands()
|
|||
SERIAL_ECHOLNPGM("killed");
|
||||
}
|
||||
clean_up_after_endstop_move();
|
||||
SERIAL_ECHOLNPGM("clean up finished ");
|
||||
// SERIAL_ECHOLNPGM("clean up finished ");
|
||||
|
||||
bool apply_temp_comp = true;
|
||||
#ifdef PINDA_THERMISTOR
|
||||
|
@ -3559,7 +3560,7 @@ void process_commands()
|
|||
if (apply_temp_comp)
|
||||
if(temp_cal_active == true && calibration_status_pinda() == true) temp_compensation_apply(); //apply PINDA temperature compensation
|
||||
babystep_apply(); // Apply Z height correction aka baby stepping before mesh bed leveing gets activated.
|
||||
SERIAL_ECHOLNPGM("babystep applied");
|
||||
// SERIAL_ECHOLNPGM("babystep applied");
|
||||
bool eeprom_bed_correction_valid = eeprom_read_byte((unsigned char*)EEPROM_BED_CORRECTION_VALID) == 1;
|
||||
#ifdef SUPPORT_VERBOSITY
|
||||
if (verbosity_level >= 1) {
|
||||
|
@ -3616,13 +3617,13 @@ void process_commands()
|
|||
}
|
||||
}
|
||||
}
|
||||
SERIAL_ECHOLNPGM("Bed leveling correction finished");
|
||||
// SERIAL_ECHOLNPGM("Bed leveling correction finished");
|
||||
mbl.upsample_3x3(); //bilinear interpolation from 3x3 to 7x7 points while using the same array z_values[iy][ix] for storing (just coppying measured data to new destination and interpolating between them)
|
||||
SERIAL_ECHOLNPGM("Upsample finished");
|
||||
// SERIAL_ECHOLNPGM("Upsample finished");
|
||||
mbl.active = 1; //activate mesh bed leveling
|
||||
SERIAL_ECHOLNPGM("Mesh bed leveling activated");
|
||||
// SERIAL_ECHOLNPGM("Mesh bed leveling activated");
|
||||
go_home_with_z_lift();
|
||||
SERIAL_ECHOLNPGM("Go home finished");
|
||||
// SERIAL_ECHOLNPGM("Go home finished");
|
||||
//unretract (after PINDA preheat retraction)
|
||||
if (degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true && calibration_status_pinda() == true && target_temperature_bed >= 50) {
|
||||
current_position[E_AXIS] += DEFAULT_RETRACTION;
|
||||
|
@ -7468,8 +7469,8 @@ void recover_machine_state_after_power_panic()
|
|||
}
|
||||
if (mbl.active)
|
||||
mbl.upsample_3x3();
|
||||
SERIAL_ECHOPGM("recover_machine_state_after_power_panic, initial ");
|
||||
print_mesh_bed_leveling_table();
|
||||
// SERIAL_ECHOPGM("recover_machine_state_after_power_panic, initial ");
|
||||
// print_mesh_bed_leveling_table();
|
||||
|
||||
// 4) Load the baby stepping value, which is expected to be active at the time of power panic.
|
||||
// The baby stepping value is used to reset the physical Z axis when rehoming the Z axis.
|
||||
|
|
|
@ -26,6 +26,11 @@ void adc_init(void)
|
|||
DIDR0 = (ADC_CHAN_MSK & 0xff);
|
||||
DIDR2 = (ADC_CHAN_MSK >> 8);
|
||||
adc_reset();
|
||||
// adc_sim_mask = 0b0101;
|
||||
// adc_sim_mask = 0b100101;
|
||||
// adc_values[0] = 1023 * 16;
|
||||
// adc_values[2] = 1023 * 16;
|
||||
// adc_values[5] = 1002 * 16;
|
||||
}
|
||||
|
||||
void adc_reset(void)
|
||||
|
|
|
@ -59,9 +59,9 @@ void fsensor_unblock() {
|
|||
|
||||
bool fsensor_enable()
|
||||
{
|
||||
puts_P(PSTR("fsensor_enable\n"));
|
||||
// puts_P(PSTR("fsensor_enable\n"));
|
||||
int pat9125 = pat9125_init(PAT9125_XRES, PAT9125_YRES);
|
||||
printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
||||
// printf_P(PSTR("PAT9125_init:%d\n"), pat9125);
|
||||
if (pat9125)
|
||||
fsensor_not_responding = false;
|
||||
else
|
||||
|
@ -77,7 +77,7 @@ bool fsensor_enable()
|
|||
|
||||
void fsensor_disable()
|
||||
{
|
||||
puts_P(PSTR("fsensor_disable\n"));
|
||||
// puts_P(PSTR("fsensor_disable\n"));
|
||||
fsensor_enabled = false;
|
||||
eeprom_update_byte((uint8_t*)EEPROM_FSENSOR, 0x00);
|
||||
FSensorStateMenu = 0;
|
||||
|
@ -105,7 +105,7 @@ void fsensor_setup_interrupt()
|
|||
|
||||
void fsensor_autoload_check_start(void)
|
||||
{
|
||||
puts_P(PSTR("fsensor_autoload_check_start\n"));
|
||||
// puts_P(PSTR("fsensor_autoload_check_start\n"));
|
||||
pat9125_update_y(); //update sensor
|
||||
fsensor_autoload_y = pat9125_y; //save current y value
|
||||
fsensor_autoload_c = 0; //reset number of changes counter
|
||||
|
@ -117,7 +117,7 @@ void fsensor_autoload_check_start(void)
|
|||
|
||||
void fsensor_autoload_check_stop(void)
|
||||
{
|
||||
puts_P(PSTR("fsensor_autoload_check_stop\n"));
|
||||
// puts_P(PSTR("fsensor_autoload_check_stop\n"));
|
||||
fsensor_autoload_sum = 0;
|
||||
fsensor_autoload_enabled = false;
|
||||
fsensor_err_cnt = 0;
|
||||
|
@ -166,7 +166,7 @@ ISR(PCINT2_vect)
|
|||
*digitalPinToPCMSK(fsensor_int_pin) |= bit(digitalPinToPCMSKbit(fsensor_int_pin));*/
|
||||
if (!pat9125_update_y())
|
||||
{
|
||||
puts_P(PSTR("pat9125 not responding.\n"));
|
||||
// puts_P(PSTR("pat9125 not responding.\n"));
|
||||
fsensor_disable();
|
||||
fsensor_not_responding = true;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ void fsensor_update()
|
|||
if (!fsensor_enabled) return;
|
||||
if (fsensor_err_cnt > FSENSOR_ERR_MAX)
|
||||
{
|
||||
MYSERIAL.println("fsensor_update (fsensor_err_cnt > FSENSOR_ERR_MAX)");
|
||||
// MYSERIAL.println("fsensor_update (fsensor_err_cnt > FSENSOR_ERR_MAX)");
|
||||
/* if (fsensor_ignore_error)
|
||||
{
|
||||
MYSERIAL.println("fsensor_update - error ignored)");
|
||||
|
|
|
@ -743,44 +743,44 @@ void world2machine_initialize()
|
|||
|
||||
bool reset = false;
|
||||
if (vec_undef(cntr) || vec_undef(vec_x) || vec_undef(vec_y)) {
|
||||
SERIAL_ECHOLNPGM("Undefined bed correction matrix.");
|
||||
// SERIAL_ECHOLNPGM("Undefined bed correction matrix.");
|
||||
reset = true;
|
||||
}
|
||||
else {
|
||||
// Length of the vec_x shall be close to unity.
|
||||
float l = sqrt(vec_x[0] * vec_x[0] + vec_x[1] * vec_x[1]);
|
||||
if (l < 0.9 || l > 1.1) {
|
||||
SERIAL_ECHOLNPGM("X vector length:");
|
||||
MYSERIAL.println(l);
|
||||
SERIAL_ECHOLNPGM("Invalid bed correction matrix. Length of the X vector out of range.");
|
||||
// SERIAL_ECHOLNPGM("X vector length:");
|
||||
// MYSERIAL.println(l);
|
||||
// SERIAL_ECHOLNPGM("Invalid bed correction matrix. Length of the X vector out of range.");
|
||||
reset = true;
|
||||
}
|
||||
// Length of the vec_y shall be close to unity.
|
||||
l = sqrt(vec_y[0] * vec_y[0] + vec_y[1] * vec_y[1]);
|
||||
if (l < 0.9 || l > 1.1) {
|
||||
SERIAL_ECHOLNPGM("Y vector length:");
|
||||
MYSERIAL.println(l);
|
||||
SERIAL_ECHOLNPGM("Invalid bed correction matrix. Length of the Y vector out of range.");
|
||||
// SERIAL_ECHOLNPGM("Y vector length:");
|
||||
// MYSERIAL.println(l);
|
||||
// SERIAL_ECHOLNPGM("Invalid bed correction matrix. Length of the Y vector out of range.");
|
||||
reset = true;
|
||||
}
|
||||
// Correction of the zero point shall be reasonably small.
|
||||
l = sqrt(cntr[0] * cntr[0] + cntr[1] * cntr[1]);
|
||||
if (l > 15.f) {
|
||||
SERIAL_ECHOLNPGM("Zero point correction:");
|
||||
MYSERIAL.println(l);
|
||||
SERIAL_ECHOLNPGM("Invalid bed correction matrix. Shift out of range.");
|
||||
// SERIAL_ECHOLNPGM("Zero point correction:");
|
||||
// MYSERIAL.println(l);
|
||||
// SERIAL_ECHOLNPGM("Invalid bed correction matrix. Shift out of range.");
|
||||
reset = true;
|
||||
}
|
||||
// vec_x and vec_y shall be nearly perpendicular.
|
||||
l = vec_x[0] * vec_y[0] + vec_x[1] * vec_y[1];
|
||||
if (fabs(l) > 0.1f) {
|
||||
SERIAL_ECHOLNPGM("Invalid bed correction matrix. X/Y axes are far from being perpendicular.");
|
||||
// SERIAL_ECHOLNPGM("Invalid bed correction matrix. X/Y axes are far from being perpendicular.");
|
||||
reset = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
SERIAL_ECHOLNPGM("Invalid bed correction matrix. Resetting to identity.");
|
||||
// SERIAL_ECHOLNPGM("Invalid bed correction matrix. Resetting to identity.");
|
||||
reset_bed_offset_and_skew();
|
||||
world2machine_reset();
|
||||
} else {
|
||||
|
|
|
@ -255,7 +255,7 @@ void tmc2130_st_isr(uint8_t last_step_mask)
|
|||
if (diag_mask & 0x04) tmc2130_sg_cnt[2]++;
|
||||
if (diag_mask & 0x08) tmc2130_sg_cnt[3]++;
|
||||
}*/
|
||||
if (!is_usb_printing && tmc2130_sg_stop_on_crash && crash)
|
||||
if (/*!is_usb_printing && */tmc2130_sg_stop_on_crash && crash)
|
||||
{
|
||||
tmc2130_sg_crash = true;
|
||||
tmc2130_sg_stop_on_crash = false;
|
||||
|
@ -353,7 +353,7 @@ uint16_t tmc2130_sg_meassure_stop()
|
|||
|
||||
bool tmc2130_wait_standstill_xy(int timeout)
|
||||
{
|
||||
DBG(_n("tmc2130_wait_standstill_xy(timeout=%d)\n"), timeout);
|
||||
// DBG(_n("tmc2130_wait_standstill_xy(timeout=%d)\n"), timeout);
|
||||
bool standstill = false;
|
||||
while (!standstill && (timeout > 0))
|
||||
{
|
||||
|
@ -361,7 +361,7 @@ bool tmc2130_wait_standstill_xy(int timeout)
|
|||
uint32_t drv_status_y = 0;
|
||||
tmc2130_rd(tmc2130_cs[X_AXIS], TMC2130_REG_DRV_STATUS, &drv_status_x);
|
||||
tmc2130_rd(tmc2130_cs[Y_AXIS], TMC2130_REG_DRV_STATUS, &drv_status_y);
|
||||
DBG(_n("\tdrv_status_x=0x%08x drv_status_x=0x%08x\n"), drv_status_x, drv_status_y);
|
||||
// DBG(_n("\tdrv_status_x=0x%08x drv_status_x=0x%08x\n"), drv_status_x, drv_status_y);
|
||||
standstill = (drv_status_x & 0x80000000) && (drv_status_y & 0x80000000);
|
||||
tmc2130_check_overtemp();
|
||||
timeout--;
|
||||
|
|
|
@ -3286,10 +3286,10 @@ static void lcd_silent_mode_set() {
|
|||
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
||||
#ifdef TMC2130
|
||||
st_synchronize();
|
||||
if (tmc2130_wait_standstill_xy(1000))
|
||||
MYSERIAL.print("standstill OK");
|
||||
else
|
||||
MYSERIAL.print("standstill NG!");
|
||||
if (tmc2130_wait_standstill_xy(1000)) {}
|
||||
// MYSERIAL.print("standstill OK");
|
||||
// else
|
||||
// MYSERIAL.print("standstill NG!");
|
||||
cli();
|
||||
tmc2130_mode = SilentModeMenu?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
||||
tmc2130_init();
|
||||
|
|
Loading…
Reference in a new issue