Merge pull request #2949 from prusa3d/MK3_3.9.3
Merge 3.9.3 back into MK3
This commit is contained in:
commit
f549ce690a
@ -16,8 +16,8 @@ extern uint16_t nPrinterType;
|
||||
extern PGM_P sPrinterName;
|
||||
|
||||
// Firmware version
|
||||
#define FW_VERSION "3.9.2"
|
||||
#define FW_COMMIT_NR 3524
|
||||
#define FW_VERSION "3.9.3"
|
||||
#define FW_COMMIT_NR 3556
|
||||
// FW_VERSION_UNKNOWN means this is an unofficial build.
|
||||
// The firmware should only be checked into github with this symbol.
|
||||
#define FW_DEV_VERSION FW_VERSION_UNKNOWN
|
||||
|
@ -4681,7 +4681,7 @@ if(eSoundMode!=e_SOUND_MODE_SILENT)
|
||||
The Original i3 Prusa MK2/s uses PINDAv1 and this calibration improves the temperature drift, but not as good as the PINDAv2.
|
||||
|
||||
superPINDA sensor has internal temperature compensation and no thermistor output. There is no point of doing temperature calibration in such case.
|
||||
If PINDA_THERMISTOR and DETECT_SUPERPINDA is defined during compilation, calibration is skipped with serial message "No PINDA thermistor".
|
||||
If PINDA_THERMISTOR and SUPERPINDA_SUPPORT is defined during compilation, calibration is skipped with serial message "No PINDA thermistor".
|
||||
This can be caused also if PINDA thermistor connection is broken or PINDA temperature is lower than PINDA_MINTEMP.
|
||||
|
||||
#### Example
|
||||
@ -10573,9 +10573,9 @@ float temp_comp_interpolation(float inp_temperature) {
|
||||
#ifdef PINDA_THERMISTOR
|
||||
constexpr int start_compensating_temp = 35;
|
||||
temp_C[i] = start_compensating_temp + i * 5; //temperature in degrees C
|
||||
#ifdef DETECT_SUPERPINDA
|
||||
static_assert(start_compensating_temp >= PINDA_MINTEMP, "Temperature compensation start point is lower than PINDA_MINTEMP.");
|
||||
#endif //DETECT_SUPERPINDA
|
||||
#ifdef SUPERPINDA_SUPPORT
|
||||
static_assert(start_compensating_temp >= PINDA_MINTEMP, "Temperature compensation start point is lower than PINDA_MINTEMP.");
|
||||
#endif //SUPERPINDA_SUPPORT
|
||||
#else
|
||||
temp_C[i] = 50 + i * 10; //temperature in C
|
||||
#endif
|
||||
|
@ -93,6 +93,10 @@ void eeprom_init()
|
||||
eeprom_switch_to_next_sheet();
|
||||
}
|
||||
check_babystep();
|
||||
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
if (eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION) == 0xff) eeprom_update_byte((uint8_t *)EEPROM_PINDA_TEMP_COMPENSATION, 0);
|
||||
#endif //PINDA_TEMP_COMP
|
||||
}
|
||||
|
||||
//! @brief Get default sheet name for index
|
||||
|
@ -313,6 +313,9 @@ static_assert(sizeof(Sheets) == EEPROM_SHEETS_SIZEOF, "Sizeof(Sheets) is not EEP
|
||||
| 0x0D2A 3370 | uint8 | EEPROM_EXPERIMENTAL_VISIBILITY | ffh 255 | ffh 255 | Experimental menu visibility unknown state | LCD menu | D3 Ax0d2a C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | Experimental menu visibility hidden | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | Experimental menu visibility visible | ^ | ^
|
||||
| 0x0D29 3369 | uint8 | EEPROM_PINDA_TEMP_COMPENSATION | ffh 255 | ffh 255 | PINDA temp compensation unknown state | LCD menu | D3 Ax0d29 C1
|
||||
| ^ | ^ | ^ | 00h 0 | ^ | PINDA has no temp compensation PINDA v1/2 | ^ | ^
|
||||
| ^ | ^ | ^ | 01h 1 | ^ | PINDA has temp compensation aka SuperPINDA | ^ | ^
|
||||
|
||||
|
||||
| Address begin | Bit/Type | Name | Valid values | Default/FactoryReset | Description | Gcode/Function| Debug code
|
||||
@ -517,9 +520,9 @@ static Sheets * const EEPROM_Sheets_base = (Sheets*)(EEPROM_SHEETS_BASE);
|
||||
|
||||
#define EEPROM_ALTFAN_OVERRIDE (EEPROM_UVLO_LA_K-1) //uint8
|
||||
#define EEPROM_EXPERIMENTAL_VISIBILITY (EEPROM_ALTFAN_OVERRIDE-1) //uint8
|
||||
|
||||
#define EEPROM_PINDA_TEMP_COMPENSATION (EEPROM_EXPERIMENTAL_VISIBILITY-1) //uint8
|
||||
//This is supposed to point to last item to allow EEPROM overrun check. Please update when adding new items.
|
||||
#define EEPROM_LAST_ITEM EEPROM_EXPERIMENTAL_VISIBILITY
|
||||
#define EEPROM_LAST_ITEM EEPROM_PINDA_TEMP_COMPENSATION
|
||||
// !!!!!
|
||||
// !!!!! this is end of EEPROM section ... all updates MUST BE inserted before this mark !!!!!
|
||||
// !!!!!
|
||||
|
@ -2271,7 +2271,7 @@ BedSkewOffsetDetectionResultType find_bed_offset_and_skew(int8_t verbosity_level
|
||||
/*}
|
||||
else {
|
||||
// if first iteration failed, count corrected point coordinates as initial
|
||||
// Use the coorrected coordinate, which is a result of find_bed_offset_and_skew().
|
||||
// Use the corrected coordinate, which is a result of find_bed_offset_and_skew().
|
||||
|
||||
current_position[X_AXIS] = vec_x[0] * pgm_read_float(bed_ref_points_4 + k * 2) + vec_y[0] * pgm_read_float(bed_ref_points_4 + k * 2 + 1) + cntr[0];
|
||||
current_position[Y_AXIS] = vec_x[1] * pgm_read_float(bed_ref_points_4 + k * 2) + vec_y[1] * pgm_read_float(bed_ref_points_4 + k * 2 + 1) + cntr[1];
|
||||
|
@ -2325,11 +2325,22 @@ float unscalePID_d(float d)
|
||||
//!
|
||||
//! @retval true firmware should do temperature compensation and allow calibration
|
||||
//! @retval false PINDA thermistor is not detected, disable temperature compensation and calibration
|
||||
//! @retval true/false when forced via LCD menu Settings->HW Setup->SuperPINDA
|
||||
//!
|
||||
bool has_temperature_compensation()
|
||||
{
|
||||
#ifdef DETECT_SUPERPINDA
|
||||
return (current_temperature_pinda >= PINDA_MINTEMP) ? true : false;
|
||||
#ifdef SUPERPINDA_SUPPORT
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION);
|
||||
if (pinda_temp_compensation == EEPROM_EMPTY_VALUE) //Unkown PINDA temp compenstation, so check it.
|
||||
{
|
||||
#endif //PINDA_TEMP_COMP
|
||||
return (current_temperature_pinda >= PINDA_MINTEMP) ? true : false;
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
}
|
||||
else if (pinda_temp_compensation == 0) return true; //Overwritten via LCD menu SuperPINDA [No]
|
||||
else return false; //Overwritten via LCD menu SuperPINDA [YES]
|
||||
#endif //PINDA_TEMP_COMP
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
@ -5752,6 +5752,15 @@ void lcd_hw_setup_menu(void) // can not be "static"
|
||||
MENU_ITEM_SUBMENU_P(PSTR("Experimental"), lcd_experimental_menu);////MSG_MENU_EXPERIMENTAL c=18
|
||||
}
|
||||
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
//! The SuperPINDA is detected when the PINDA temp is below its defined limit.
|
||||
//! This works well on the EINSY board but not on the miniRAMBo board as
|
||||
//! as a disconnected SuperPINDA will show higher temps compared to an EINSY board.
|
||||
//!
|
||||
//! This menu allows the user to en-/disable the SuperPINDA manualy
|
||||
MENU_ITEM_TOGGLE_P(_N("SuperPINDA"), eeprom_read_byte((uint8_t *)EEPROM_PINDA_TEMP_COMPENSATION) ? _T(MSG_YES) : _T(MSG_NO), lcd_pinda_temp_compensation_toggle);
|
||||
#endif //PINDA_TEMP_COMP
|
||||
|
||||
MENU_END();
|
||||
}
|
||||
|
||||
@ -9253,3 +9262,17 @@ void lcd_experimental_menu()
|
||||
|
||||
MENU_END();
|
||||
}
|
||||
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
void lcd_pinda_temp_compensation_toggle()
|
||||
{
|
||||
uint8_t pinda_temp_compensation = eeprom_read_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION);
|
||||
if (pinda_temp_compensation == EEPROM_EMPTY_VALUE) // On MK2.5/S the EEPROM_EMPTY_VALUE will be set to 0 during eeprom_init.
|
||||
pinda_temp_compensation = 1; // But for MK3/S it should be 1 so SuperPINDA is "active"
|
||||
else
|
||||
pinda_temp_compensation = !pinda_temp_compensation;
|
||||
eeprom_update_byte((uint8_t*)EEPROM_PINDA_TEMP_COMPENSATION, pinda_temp_compensation);
|
||||
SERIAL_ECHOLNPGM("SuperPINDA:");
|
||||
SERIAL_ECHOLN(pinda_temp_compensation);
|
||||
}
|
||||
#endif //PINDA_TEMP_COMP
|
||||
|
@ -262,4 +262,8 @@ void lcd_wizard(WizState state);
|
||||
extern void lcd_experimental_toggle();
|
||||
extern void lcd_experimental_menu();
|
||||
|
||||
#ifdef PINDA_TEMP_COMP
|
||||
extern void lcd_pinda_temp_compensation_toggle();
|
||||
#endif //PINDA_TEMP_COMP
|
||||
|
||||
#endif //ULTRALCD_H
|
||||
|
@ -175,6 +175,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 30 //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
@ -176,6 +176,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 30 //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
@ -175,6 +175,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 30 //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
@ -176,6 +176,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 30 //The miniRAMBo thermistor readings below 30°C aren't very accurate
|
||||
#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
|
||||
// Maxtemps
|
||||
#if defined(E3D_PT100_EXTRUDER_WITH_AMP) || defined(E3D_PT100_EXTRUDER_NO_AMP)
|
||||
|
@ -294,8 +294,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define DETECT_SUPERPINDA
|
||||
#define PINDA_MINTEMP BED_MINTEMP
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 10
|
||||
//#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
#define AMBIENT_MINTEMP -30
|
||||
|
||||
// Maxtemps
|
||||
|
@ -296,8 +296,9 @@
|
||||
#if BED_MINTEMP_DELAY>USHRT_MAX
|
||||
#error "Check maximal allowed value @ ShortTimer (see BED_MINTEMP_DELAY definition)"
|
||||
#endif
|
||||
#define DETECT_SUPERPINDA
|
||||
#define PINDA_MINTEMP BED_MINTEMP
|
||||
#define SUPERPINDA_SUPPORT
|
||||
#define PINDA_MINTEMP 10
|
||||
//#define PINDA_TEMP_COMP //Used to enable SuperPINDA toggle menu/function
|
||||
#define AMBIENT_MINTEMP -30
|
||||
|
||||
// Maxtemps
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -17,20 +17,6 @@ extern bool xyzcal_spiral8(int16_t cx, int16_t cy, int16_t z0, int16_t dz, int16
|
||||
|
||||
//extern int8_t xyzcal_meassure_pinda_hysterezis(int16_t min_z, int16_t max_z, uint16_t delay_us, uint8_t samples);
|
||||
|
||||
extern void xyzcal_scan_pixels_32x32(int16_t cx, int16_t cy, int16_t min_z, int16_t max_z, uint16_t delay_us, uint8_t* pixels);
|
||||
|
||||
extern void xyzcal_histo_pixels_32x32(uint8_t* pixels, uint16_t* histo);
|
||||
|
||||
extern void xyzcal_adjust_pixels(uint8_t* pixels, uint16_t* histo);
|
||||
|
||||
extern int16_t xyzcal_match_pattern_12x12_in_32x32(uint16_t* pattern, uint8_t* pixels, uint8_t x, uint8_t y);
|
||||
|
||||
extern int16_t xyzcal_find_pattern_12x12_in_32x32(uint8_t* pixels, uint16_t* pattern, uint8_t* pc, uint8_t* pr);
|
||||
|
||||
extern int8_t xyzcal_find_point_center2(uint16_t delay_us);
|
||||
|
||||
//extern int8_t xyzcal_find_point_center(int16_t x0, int16_t y0, int16_t z0, int16_t min_z, int16_t max_z, uint16_t delay_us, uint8_t turns);
|
||||
|
||||
extern bool xyzcal_searchZ(void);
|
||||
|
||||
extern bool xyzcal_scan_and_process(void);
|
||||
|
Loading…
Reference in New Issue
Block a user