@ -290,7 +290,7 @@ void Config_StoreSettings() {
EEPROM_WRITE ( PID_PARAM ( Kp , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Kp , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Ki , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Ki , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Kd , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Kd , e ) ) ;
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
EEPROM_WRITE ( PID_PARAM ( Kc , e ) ) ;
EEPROM_WRITE ( PID_PARAM ( Kc , e ) ) ;
# else
# else
dummy = 1.0f ; // 1.0 = default kc
dummy = 1.0f ; // 1.0 = default kc
@ -308,7 +308,7 @@ void Config_StoreSettings() {
} // Hotends Loop
} // Hotends Loop
# if DISABLED(PID_ ADD_EXTRUSION_RATE )
# if DISABLED(PID_ EXTRUSION_SCALING )
int lpq_len = 20 ;
int lpq_len = 20 ;
# endif
# endif
EEPROM_WRITE ( lpq_len ) ;
EEPROM_WRITE ( lpq_len ) ;
@ -481,7 +481,7 @@ void Config_RetrieveSettings() {
PID_PARAM ( Kp , e ) = dummy ;
PID_PARAM ( Kp , e ) = dummy ;
EEPROM_READ ( PID_PARAM ( Ki , e ) ) ;
EEPROM_READ ( PID_PARAM ( Ki , e ) ) ;
EEPROM_READ ( PID_PARAM ( Kd , e ) ) ;
EEPROM_READ ( PID_PARAM ( Kd , e ) ) ;
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
EEPROM_READ ( PID_PARAM ( Kc , e ) ) ;
EEPROM_READ ( PID_PARAM ( Kc , e ) ) ;
# else
# else
EEPROM_READ ( dummy ) ;
EEPROM_READ ( dummy ) ;
@ -496,7 +496,7 @@ void Config_RetrieveSettings() {
for ( uint8_t q = MAX_EXTRUDERS * 4 ; q - - ; ) EEPROM_READ ( dummy ) ; // Kp, Ki, Kd, Kc
for ( uint8_t q = MAX_EXTRUDERS * 4 ; q - - ; ) EEPROM_READ ( dummy ) ; // Kp, Ki, Kd, Kc
# endif // !PIDTEMP
# endif // !PIDTEMP
# if DISABLED(PID_ ADD_EXTRUSION_RATE )
# if DISABLED(PID_ EXTRUSION_SCALING )
int lpq_len ;
int lpq_len ;
# endif
# endif
EEPROM_READ ( lpq_len ) ;
EEPROM_READ ( lpq_len ) ;
@ -641,11 +641,11 @@ void Config_ResetDefault() {
PID_PARAM ( Kp , e ) = DEFAULT_Kp ;
PID_PARAM ( Kp , e ) = DEFAULT_Kp ;
PID_PARAM ( Ki , e ) = scalePID_i ( DEFAULT_Ki ) ;
PID_PARAM ( Ki , e ) = scalePID_i ( DEFAULT_Ki ) ;
PID_PARAM ( Kd , e ) = scalePID_d ( DEFAULT_Kd ) ;
PID_PARAM ( Kd , e ) = scalePID_d ( DEFAULT_Kd ) ;
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
PID_PARAM ( Kc , e ) = DEFAULT_Kc ;
PID_PARAM ( Kc , e ) = DEFAULT_Kc ;
# endif
# endif
}
}
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
lpq_len = 20 ; // default last-position-queue size
lpq_len = 20 ; // default last-position-queue size
# endif
# endif
# endif // PIDTEMP
# endif // PIDTEMP
@ -863,7 +863,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR ( " P " , PID_PARAM ( Kp , e ) ) ;
SERIAL_ECHOPAIR ( " P " , PID_PARAM ( Kp , e ) ) ;
SERIAL_ECHOPAIR ( " I " , unscalePID_i ( PID_PARAM ( Ki , e ) ) ) ;
SERIAL_ECHOPAIR ( " I " , unscalePID_i ( PID_PARAM ( Ki , e ) ) ) ;
SERIAL_ECHOPAIR ( " D " , unscalePID_d ( PID_PARAM ( Kd , e ) ) ) ;
SERIAL_ECHOPAIR ( " D " , unscalePID_d ( PID_PARAM ( Kd , e ) ) ) ;
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
SERIAL_ECHOPAIR ( " C " , PID_PARAM ( Kc , e ) ) ;
SERIAL_ECHOPAIR ( " C " , PID_PARAM ( Kc , e ) ) ;
if ( e = = 0 ) SERIAL_ECHOPAIR ( " L " , lpq_len ) ;
if ( e = = 0 ) SERIAL_ECHOPAIR ( " L " , lpq_len ) ;
# endif
# endif
@ -878,7 +878,7 @@ void Config_PrintSettings(bool forReplay) {
SERIAL_ECHOPAIR ( " M301 P " , PID_PARAM ( Kp , 0 ) ) ; // for compatibility with hosts, only echo values for E0
SERIAL_ECHOPAIR ( " M301 P " , PID_PARAM ( Kp , 0 ) ) ; // for compatibility with hosts, only echo values for E0
SERIAL_ECHOPAIR ( " I " , unscalePID_i ( PID_PARAM ( Ki , 0 ) ) ) ;
SERIAL_ECHOPAIR ( " I " , unscalePID_i ( PID_PARAM ( Ki , 0 ) ) ) ;
SERIAL_ECHOPAIR ( " D " , unscalePID_d ( PID_PARAM ( Kd , 0 ) ) ) ;
SERIAL_ECHOPAIR ( " D " , unscalePID_d ( PID_PARAM ( Kd , 0 ) ) ) ;
# if ENABLED(PID_ ADD_EXTRUSION_RATE )
# if ENABLED(PID_ EXTRUSION_SCALING )
SERIAL_ECHOPAIR ( " C " , PID_PARAM ( Kc , 0 ) ) ;
SERIAL_ECHOPAIR ( " C " , PID_PARAM ( Kc , 0 ) ) ;
SERIAL_ECHOPAIR ( " L " , lpq_len ) ;
SERIAL_ECHOPAIR ( " L " , lpq_len ) ;
# endif
# endif