commit
527b870700
6 changed files with 15180 additions and 77 deletions
|
@ -8,10 +8,10 @@
|
|||
#define STR(x) STR_HELPER(x)
|
||||
|
||||
// Firmware version
|
||||
#define FW_version "3.1.1-RC2"
|
||||
#define FW_build 137
|
||||
#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) "z"
|
||||
#define FW_version_build FW_version " b" STR(FW_build)
|
||||
|
||||
|
||||
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
|
||||
|
|
|
@ -96,7 +96,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
// this value is litlebit higher that real limit, because ambient termistor is on the board and is temperated from it,
|
||||
// temperature inside the case is around 31C for ambient temperature 25C, when the printer is powered on long time and idle
|
||||
// the real limit is 15C (same as MINTEMP limit), this is because 15C is end of scale for both used thermistors (bed, heater)
|
||||
#define MINTEMP_MINAMBIENT 18
|
||||
#define MINTEMP_MINAMBIENT 18
|
||||
#define MINTEMP_MINAMBIENT_RAW 991
|
||||
|
||||
|
||||
//DEBUG
|
||||
|
@ -181,8 +182,8 @@ const bool Z_MIN_ENDSTOP_INVERTING = false; // set to true to invert the logic o
|
|||
#define TMC2130_SG_THRS_E 3 // stallguard sensitivity for E axis
|
||||
|
||||
//new settings is possible for vsense = 1, running current value > 31 set vsense to zero and shift both currents by 1 bit right (Z axis only)
|
||||
#define TMC2130_CURRENTS_H {13, 20, 20, 35} // default holding currents for all axes
|
||||
#define TMC2130_CURRENTS_R {13, 20, 20, 35} // default running currents for all axes
|
||||
#define TMC2130_CURRENTS_H {13, 20, 25, 35} // default holding currents for all axes
|
||||
#define TMC2130_CURRENTS_R {13, 20, 25, 35} // default running currents for all axes
|
||||
|
||||
//#define TMC2130_DEBUG
|
||||
//#define TMC2130_DEBUG_WR
|
||||
|
|
15129
Firmware/Firmware.ino.rambo.hex
Normal file
15129
Firmware/Firmware.ino.rambo.hex
Normal file
File diff suppressed because it is too large
Load diff
|
@ -660,7 +660,7 @@ void manage_heater()
|
|||
#endif
|
||||
|
||||
// Check if temperature is within the correct range
|
||||
if((current_temperature[e] > minttemp[e]) && (current_temperature[e] < maxttemp[e]))
|
||||
if(((current_temperature_ambient < MINTEMP_MINAMBIENT) || (current_temperature[e] > minttemp[e])) && (current_temperature[e] < maxttemp[e]))
|
||||
{
|
||||
soft_pwm[e] = (int)pid_output >> 1;
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ void manage_heater()
|
|||
pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER);
|
||||
#endif //PID_OPENLOOP
|
||||
|
||||
if((current_temperature_bed > BED_MINTEMP) && (current_temperature_bed < BED_MAXTEMP))
|
||||
if(((current_temperature_bed > BED_MINTEMP) || (current_temperature_ambient < MINTEMP_MINAMBIENT)) && (current_temperature_bed < BED_MAXTEMP))
|
||||
{
|
||||
soft_pwm_bed = (int)pid_output >> 1;
|
||||
}
|
||||
|
@ -1418,7 +1418,7 @@ void min_temp_error(uint8_t e) {
|
|||
#ifdef DEBUG_DISABLE_MINTEMP
|
||||
return;
|
||||
#endif
|
||||
if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
||||
//if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
||||
disable_heater();
|
||||
if(IsStopped() == false) {
|
||||
SERIAL_ERROR_START;
|
||||
|
@ -1452,7 +1452,7 @@ void bed_min_temp_error(void) {
|
|||
#ifdef DEBUG_DISABLE_MINTEMP
|
||||
return;
|
||||
#endif
|
||||
if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
||||
//if (current_temperature_ambient < MINTEMP_MINAMBIENT) return;
|
||||
#if HEATER_BED_PIN > -1
|
||||
WRITE(HEATER_BED_PIN, 0);
|
||||
#endif
|
||||
|
@ -1544,6 +1544,11 @@ void adc_ready(void) //callback from adc when sampling finished
|
|||
ISR(TIMER0_COMPB_vect)
|
||||
{
|
||||
if (!temp_meas_ready) adc_cycle();
|
||||
else
|
||||
{
|
||||
check_max_temp();
|
||||
check_min_temp();
|
||||
}
|
||||
lcd_buttons_update();
|
||||
|
||||
static unsigned char pwm_count = (1 << SOFT_PWM_SCALE);
|
||||
|
@ -1879,85 +1884,49 @@ ISR(TIMER0_COMPB_vect)
|
|||
check_fans();
|
||||
}
|
||||
|
||||
void check_min_max_temp()
|
||||
void check_max_temp()
|
||||
{
|
||||
/*
|
||||
//heater
|
||||
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
|
||||
if(current_temperature_raw[0] <= maxttemp_raw[0]) {
|
||||
if (current_temperature_raw[0] <= maxttemp_raw[0]) {
|
||||
#else
|
||||
if(current_temperature_raw[0] >= maxttemp_raw[0]) {
|
||||
if (current_temperature_raw[0] >= maxttemp_raw[0]) {
|
||||
#endif
|
||||
max_temp_error(0);
|
||||
}
|
||||
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
|
||||
if(current_temperature_raw[0] >= minttemp_raw[0]) {
|
||||
#else
|
||||
if(current_temperature_raw[0] <= minttemp_raw[0]) {
|
||||
#endif
|
||||
min_temp_error(0);
|
||||
}
|
||||
#if EXTRUDERS > 1
|
||||
#if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP
|
||||
if(current_temperature_raw[1] <= maxttemp_raw[1]) {
|
||||
#else
|
||||
if(current_temperature_raw[1] >= maxttemp_raw[1]) {
|
||||
#endif
|
||||
max_temp_error(1);
|
||||
}
|
||||
#if HEATER_1_RAW_LO_TEMP > HEATER_1_RAW_HI_TEMP
|
||||
if(current_temperature_raw[1] >= minttemp_raw[1]) {
|
||||
#else
|
||||
if(current_temperature_raw[1] <= minttemp_raw[1]) {
|
||||
#endif
|
||||
min_temp_error(1);
|
||||
}
|
||||
#endif
|
||||
#if EXTRUDERS > 2
|
||||
#if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP
|
||||
if(current_temperature_raw[2] <= maxttemp_raw[2]) {
|
||||
#else
|
||||
if(current_temperature_raw[2] >= maxttemp_raw[2]) {
|
||||
#endif
|
||||
max_temp_error(2);
|
||||
}
|
||||
#if HEATER_2_RAW_LO_TEMP > HEATER_2_RAW_HI_TEMP
|
||||
if(current_temperature_raw[2] >= minttemp_raw[2]) {
|
||||
#else
|
||||
if(current_temperature_raw[2] <= minttemp_raw[2]) {
|
||||
#endif
|
||||
min_temp_error(2);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// No bed MINTEMP error?
|
||||
|
||||
|
||||
//bed
|
||||
#if defined(BED_MAXTEMP) && (TEMP_SENSOR_BED != 0)
|
||||
# if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP
|
||||
if(current_temperature_bed_raw <= bed_maxttemp_raw) {
|
||||
#if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP
|
||||
if (current_temperature_bed_raw <= bed_maxttemp_raw) {
|
||||
#else
|
||||
if(current_temperature_bed_raw >= bed_maxttemp_raw) {
|
||||
if (current_temperature_bed_raw >= bed_maxttemp_raw) {
|
||||
#endif
|
||||
target_temperature_bed = 0;
|
||||
bed_max_temp_error();
|
||||
}
|
||||
}
|
||||
|
||||
# if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP
|
||||
if(current_temperature_bed_raw >= bed_minttemp_raw) {
|
||||
#else
|
||||
if(current_temperature_bed_raw <= bed_minttemp_raw) {
|
||||
#endif
|
||||
bed_min_temp_error();
|
||||
}
|
||||
|
||||
#endif*/
|
||||
|
||||
}
|
||||
|
||||
void check_min_temp()
|
||||
{
|
||||
if (current_temperature_raw_ambient > OVERSAMPLENR*MINTEMP_MINAMBIENT_RAW) return;
|
||||
//heater
|
||||
#if HEATER_0_RAW_LO_TEMP > HEATER_0_RAW_HI_TEMP
|
||||
if (current_temperature_raw[0] >= minttemp_raw[0]) {
|
||||
#else
|
||||
if (current_temperature_raw[0] <= minttemp_raw[0]) {
|
||||
#endif
|
||||
min_temp_error(0);
|
||||
}
|
||||
//bed
|
||||
#if HEATER_BED_RAW_LO_TEMP > HEATER_BED_RAW_HI_TEMP
|
||||
if (current_temperature_bed_raw >= bed_minttemp_raw) {
|
||||
#else
|
||||
if (current_temperature_bed_raw <= bed_minttemp_raw) {
|
||||
#endif
|
||||
bed_min_temp_error();
|
||||
}
|
||||
}
|
||||
|
||||
void check_fans() {
|
||||
|
|
|
@ -231,6 +231,8 @@ void checkFanSpeed();
|
|||
void fanSpeedError(unsigned char _fan);
|
||||
|
||||
void check_fans();
|
||||
void check_min_temp();
|
||||
void check_max_temp();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -221,6 +221,8 @@ uint8_t tmc2130_sample_diag()
|
|||
return mask;
|
||||
}
|
||||
|
||||
extern bool is_usb_printing;
|
||||
|
||||
void tmc2130_st_isr(uint8_t last_step_mask)
|
||||
{
|
||||
if (tmc2130_mode == TMC2130_MODE_SILENT || tmc2130_sg_stop_on_crash == false) return;
|
||||
|
@ -253,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 (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;
|
||||
|
|
Loading…
Reference in a new issue