优化关于温度的报警提示
(cherry picked from commit f4afd87318f42e53fa235bc1b3062ceda9d5d8a7)
This commit is contained in:
parent
4ea52d07b4
commit
248a4e48a0
@ -115,8 +115,9 @@ heater_pin: PD12
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC0
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 130
|
||||
min_temp: -20
|
||||
max_temp: 100
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 17.22
|
||||
# pid_ki: 0.9
|
||||
@ -133,8 +134,9 @@ heater_pin:PD15
|
||||
max_power:1.0
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin:PC3
|
||||
min_temp: 0
|
||||
max_temp: 70
|
||||
min_temp: -20
|
||||
max_temp: 60
|
||||
overshoot: 10
|
||||
pwm_cycle_time: 0.3
|
||||
# control: pid
|
||||
# pid_kp: 30.68
|
||||
@ -252,8 +254,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: tool:PC6
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -20
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.03
|
||||
pressure_advance_smooth_time:0.040
|
||||
@ -301,8 +304,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: tool:PC7
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -20
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
|
@ -112,8 +112,9 @@ heater_pin: PD12
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC0
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 130
|
||||
min_temp: -20
|
||||
max_temp: 100
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 17.22
|
||||
# pid_ki: 0.9
|
||||
@ -130,8 +131,9 @@ heater_pin:PD15
|
||||
max_power:1.0
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin:PC3
|
||||
min_temp: 0
|
||||
max_temp: 70
|
||||
min_temp: -20
|
||||
max_temp: 60
|
||||
overshoot: 10
|
||||
pwm_cycle_time: 0.3
|
||||
# control: pid
|
||||
# pid_kp: 30.68
|
||||
@ -205,8 +207,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: PD13
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -1
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.03
|
||||
pressure_advance_smooth_time:0.040
|
||||
@ -242,8 +245,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: PD14
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -1
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
|
@ -115,8 +115,9 @@ heater_pin: PD12
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC0
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 130
|
||||
min_temp: -20
|
||||
max_temp: 100
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 59.368
|
||||
# pid_ki: 1.656
|
||||
@ -133,8 +134,9 @@ heater_pin:PD15
|
||||
max_power:1.0
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin:PC3
|
||||
min_temp: 0
|
||||
max_temp: 80
|
||||
min_temp: -20
|
||||
max_temp: 70
|
||||
overshoot: 10
|
||||
pwm_cycle_time: 0.3
|
||||
# control: pid
|
||||
# pid_kp: 30.68
|
||||
@ -252,8 +254,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: tool:PC6
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -20
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.03
|
||||
pressure_advance_smooth_time:0.040
|
||||
@ -301,8 +304,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: tool:PC7
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -20
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
|
@ -112,8 +112,9 @@ heater_pin: PD12
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC0
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 130
|
||||
min_temp: -20
|
||||
max_temp: 100
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 59.368
|
||||
# pid_ki: 1.656
|
||||
@ -130,8 +131,9 @@ heater_pin:PD15
|
||||
max_power:1.0
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin:PC3
|
||||
min_temp: 0
|
||||
max_temp: 80
|
||||
min_temp: -20
|
||||
max_temp: 70
|
||||
overshoot: 10
|
||||
pwm_cycle_time: 0.3
|
||||
# control: pid
|
||||
# pid_kp: 30.68
|
||||
@ -206,8 +208,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: PD13
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -1
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.03
|
||||
pressure_advance_smooth_time:0.040
|
||||
@ -243,8 +246,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: PD14
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 435
|
||||
min_temp: -1
|
||||
max_temp: 420
|
||||
overshoot: 20
|
||||
min_extrude_temp: 180
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
|
@ -153,8 +153,9 @@ heater_pin: PD12
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC0
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
max_temp: 150
|
||||
min_temp: -20
|
||||
max_temp: 140
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 40.673
|
||||
# pid_ki: 0.837
|
||||
@ -171,8 +172,9 @@ heater_pin: PD15
|
||||
max_power: 1.0
|
||||
sensor_type: Generic 3950
|
||||
sensor_pin: PC3
|
||||
min_temp: 0
|
||||
max_temp: 80
|
||||
min_temp: -20
|
||||
max_temp: 70
|
||||
overshoot: 10
|
||||
# control: pid
|
||||
# pid_kp: 30.68
|
||||
# pid_ki: 0.21
|
||||
@ -299,8 +301,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: L_tool:PA8
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
min_temp: -20
|
||||
max_temp: 450
|
||||
overshoot: 20
|
||||
min_extrude_temp: 150
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
@ -392,8 +395,9 @@ max_extrude_only_accel: 1000.0
|
||||
max_extrude_cross_section:5
|
||||
heater_pin: R_tool:PA8
|
||||
max_power: 1.0
|
||||
min_temp: 0
|
||||
min_temp: -20
|
||||
max_temp: 450
|
||||
overshoot: 20
|
||||
min_extrude_temp: 150
|
||||
pressure_advance: 0.032
|
||||
pressure_advance_smooth_time:0.040
|
||||
|
@ -24,7 +24,8 @@ class Heater:
|
||||
self.sensor = sensor
|
||||
self.min_temp = config.getfloat('min_temp', minval=KELVIN_TO_CELSIUS)
|
||||
self.max_temp = config.getfloat('max_temp', above=self.min_temp)
|
||||
self.sensor.setup_minmax(self.min_temp, self.max_temp)
|
||||
self.overshoot = config.getfloat('overshoot', default=20., above=0.)
|
||||
self.sensor.setup_minmax(self.min_temp, self.max_temp + self.overshoot)
|
||||
self.sensor.setup_callback(self.temperature_callback)
|
||||
self.pwm_delay = self.sensor.get_report_time_delta()
|
||||
# Setup temperature checks
|
||||
|
@ -9,7 +9,7 @@ import mcu
|
||||
SAMPLE_TIME = 0.001
|
||||
SAMPLE_COUNT = 8
|
||||
REPORT_TIME = 0.300
|
||||
RANGE_CHECK_COUNT = 4
|
||||
RANGE_CHECK_COUNT = 8
|
||||
|
||||
class PrinterTemperatureMCU:
|
||||
def __init__(self, config):
|
||||
|
@ -16,7 +16,8 @@ class PrinterSensorGeneric:
|
||||
minval=KELVIN_TO_CELSIUS)
|
||||
self.max_temp = config.getfloat('max_temp', 99999999.9,
|
||||
above=self.min_temp)
|
||||
self.sensor.setup_minmax(self.min_temp, self.max_temp)
|
||||
self.overshoot = config.getfloat('overshoot', default=20., above=0.)
|
||||
self.sensor.setup_minmax(self.min_temp, self.max_temp + self.overshoot)
|
||||
self.sensor.setup_callback(self.temperature_callback)
|
||||
pheaters.register_sensor(config, self)
|
||||
self.last_temp = 0.
|
||||
|
Loading…
x
Reference in New Issue
Block a user