新增CreatBot_P800机型相关功能
# Conflicts: # config/CreatBot_P800/base.cfg resolved by 700a45ab02541488c7f9cfc58fc1669a4dcd54c9 version # klippy/extras/filament_airpump_sensor.py resolved by 700a45ab02541488c7f9cfc58fc1669a4dcd54c9 version # scripts/graph_mesh.py resolved by 700a45ab02541488c7f9cfc58fc1669a4dcd54c9 version
This commit is contained in:
parent
5cd9e09192
commit
9dc434aa23
1
config/CreatBot_P800/1.0/door_detect.cfg
Normal file
1
config/CreatBot_P800/1.0/door_detect.cfg
Normal file
@ -0,0 +1 @@
|
||||
../../module/door_detect.cfg
|
@ -10,6 +10,10 @@ filename: ~/printer_data/config/config_variables.cfg
|
||||
|
||||
[exclude_object]
|
||||
|
||||
[board_pins]
|
||||
aliases:
|
||||
DOOR_PIN=PE7
|
||||
|
||||
[gcode_arcs]
|
||||
resolution: 1.0
|
||||
|
||||
@ -193,6 +197,7 @@ off_below: 0.10
|
||||
[filament_airpump_sensor extruder]
|
||||
switch_pin: !PE13
|
||||
airpump_pin: PE2
|
||||
motor_pin: PE4
|
||||
pause_on_runout: False
|
||||
runout_gcode: _RUNOUT_HANDLE
|
||||
max_run_time: 30
|
||||
@ -698,4 +703,4 @@ gcode:
|
||||
RESPOND TYPE=command MSG="action:prompt_end"
|
||||
_CLEAR_LAST_FILE
|
||||
|
||||
[include module/*.cfg]
|
||||
[include module/*.cfg]
|
@ -25,6 +25,11 @@ class AirPump:
|
||||
self.airpump_mcu = self.airpump_pin.get_mcu()
|
||||
self.timeout_event_handler = timeout_event_handler
|
||||
|
||||
self.motor_pin = None
|
||||
motor_pin = config.get('motor_pin')
|
||||
self.motor_pin = ppins.setup_pin('digital_out', motor_pin)
|
||||
self.motor_pin.setup_max_duration(0.)
|
||||
|
||||
def set_power(self, power, eventtime):
|
||||
print_time = self.airpump_mcu.estimated_print_time(eventtime + 0.1)
|
||||
logging.info(f"set air pump to {power} at {print_time}")
|
||||
@ -34,6 +39,7 @@ class AirPump:
|
||||
self.is_running = True
|
||||
self.timeout_timer = self.reactor.register_timer(
|
||||
self._check_timeout, self.start_time + self.max_run_time)
|
||||
self.motor_pin.set_digital(print_time, 1)
|
||||
self.airpump_pin.set_digital(print_time, 1)
|
||||
else:
|
||||
if self.timeout_timer is not None:
|
||||
@ -41,6 +47,7 @@ class AirPump:
|
||||
self.timeout_timer = None
|
||||
self.is_running = False
|
||||
self.start_time = None
|
||||
self.motor_pin.set_digital(print_time, 0)
|
||||
self.airpump_pin.set_digital(print_time, 0)
|
||||
|
||||
def _check_timeout(self, eventtime):
|
||||
|
Loading…
x
Reference in New Issue
Block a user