新增P800的配置文件
This commit is contained in:
parent
d3561dae4f
commit
b48fdc708c
131
config/moonraker_P800.conf
Normal file
131
config/moonraker_P800.conf
Normal file
@ -0,0 +1,131 @@
|
||||
[server]
|
||||
host: 0.0.0.0
|
||||
port: %PORT%
|
||||
klippy_uds_address: %UDS%
|
||||
|
||||
[authorization]
|
||||
trusted_clients:
|
||||
%LAN%
|
||||
10.0.0.0/8
|
||||
127.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
FE80::/10
|
||||
::1/128
|
||||
cors_domains:
|
||||
*.lan
|
||||
*.local
|
||||
*://localhost
|
||||
*://localhost:*
|
||||
*://my.mainsail.xyz
|
||||
*://app.fluidd.xyz
|
||||
|
||||
[octoprint_compat]
|
||||
|
||||
[firmware_manager]
|
||||
|
||||
[history]
|
||||
|
||||
[power Printer]
|
||||
type: gpio
|
||||
pin: gpiochip4/gpio13
|
||||
initial_state: on
|
||||
off_when_shutdown: true
|
||||
off_when_shutdown_delay: 86400
|
||||
on_when_job_queued: true
|
||||
locked_while_printing: true
|
||||
restart_klipper_when_powered: true
|
||||
# restart_delay: 1
|
||||
bound_services:
|
||||
klipper
|
||||
KlipperScreen
|
||||
crowsnest
|
||||
|
||||
[button switch_button]
|
||||
type: gpio
|
||||
pin: ^gpiochip4/gpio12
|
||||
debounce_period: .02
|
||||
minimum_event_time: 0
|
||||
on_press:
|
||||
{% if event.elapsed_time > 5.0 %}
|
||||
{% do call_method("machine.shutdown") %}
|
||||
{% endif %}
|
||||
on_release:
|
||||
{% do call_method("machine.device_power.post_device", device="Printer", action="toggle") %}
|
||||
|
||||
[button power_outage]
|
||||
type: gpio
|
||||
pin: ^!gpiochip4/gpio19
|
||||
debounce_period: .01
|
||||
minimum_event_time: 0
|
||||
on_press:
|
||||
{% do call_method("printer.gcode.script", script="TURN_OFF_HEATERS") %}
|
||||
{% do call_method("printer.gcode.script", script="GET_TASKLINE") %}
|
||||
{% set query_objs = {"print_stats": ["state"], "toolhead": ["extruder"], "virtual_sdcard": ["file_path", "file_position", "file_line"]} %}
|
||||
{% set status = call_method("printer.objects.query", objects=query_objs) %}
|
||||
{% do call_method("printer.emergency_stop") %}
|
||||
{% set data = status | tojson | fromjson %}
|
||||
{% set print_state = data['status']['print_stats']['state'] %}
|
||||
# Judging the printer status
|
||||
{% if print_state | string == 'printing' or print_state | string == 'paused' %}
|
||||
{% set hotend = data['status']['toolhead']['extruder'] %}
|
||||
{% set position = data['status']['virtual_sdcard']['file_position'] %}
|
||||
{% set line = data['status']['virtual_sdcard']['file_line'] %}
|
||||
{% set filepath = data['status']['virtual_sdcard']['file_path'] %}
|
||||
# save file position and line
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=power_resume_position VALUE=" + position | string) %}
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=power_resume_line VALUE=" + line | string) %}
|
||||
{% set script = "SAVE_VARIABLE VARIABLE=power_loss_paused VALUE=" ~ ("False" if print_state | string == 'printing' else "True") %}
|
||||
{% if print_state | string in ['printing', 'paused'] %}
|
||||
{% do call_method("printer.gcode.script", script=script) %}
|
||||
{% endif %}
|
||||
# save extruder
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=power_resume_extruder VALUE=\"'" + hotend | string + "'\"") %}
|
||||
# save file
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=filepath VALUE=\"'" + filepath | string + "'\"") %}
|
||||
save interrupt
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=was_interrupted VALUE=True") %}
|
||||
{% else %}
|
||||
{% do call_method("printer.gcode.script", script="SAVE_VARIABLE VARIABLE=was_interrupted VALUE=False") %}
|
||||
{% endif %}
|
||||
# shutdown
|
||||
{% do call_method("machine.shutdown") %}
|
||||
|
||||
[update_manager]
|
||||
channel: stable
|
||||
refresh_interval: 168
|
||||
|
||||
[update_manager klipper]
|
||||
channel: stable
|
||||
|
||||
[update_manager KlipperScreen]
|
||||
type: git_repo
|
||||
path: /home/klipper/KlipperScreen
|
||||
origin: https://github.com/CreatBotOfficail/CreatBotKlipperScreen.git
|
||||
env: /home/klipper/.KlipperScreen-env/bin/python
|
||||
requirements: scripts/KlipperScreen-requirements.txt
|
||||
install_script: scripts/KlipperScreen-install.sh
|
||||
channel: stable
|
||||
primary_branch: P800
|
||||
|
||||
[update_manager mainsail-config]
|
||||
type: git_repo
|
||||
primary_branch: master
|
||||
path: ~/mainsail-config
|
||||
origin: https://github.com/mainsail-crew/mainsail-config.git
|
||||
managed_services: klipper
|
||||
|
||||
[update_manager mainsail]
|
||||
type: web
|
||||
channel: stable
|
||||
repo: mainsail-crew/mainsail
|
||||
path: ~/mainsail
|
||||
|
||||
# Crowsnest update_manager entry
|
||||
[update_manager crowsnest]
|
||||
type: git_repo
|
||||
path: ~/crowsnest
|
||||
origin: https://github.com/CreatBotOfficail/CreatBotCrowsnest.git
|
||||
managed_services: crowsnest
|
||||
install_script: tools/pkglist.sh
|
Loading…
x
Reference in New Issue
Block a user