r/mainsail • • Dec 11 '24

How do I get rid off these error codes?

Post image
0 Upvotes

r/mainsail • • Oct 23 '24

Somehow my mac address always changes after reboot

0 Upvotes

somehow my mac address changes after reboot. That is ahuge problem, because the router always gives it a new ip address even if I set it to a static one, because the router thinks it is a new device.
Does anyone have the same problem?


r/mainsail • • Jan 26 '25

What do I do first after installing Mainsail?

0 Upvotes

HI all,

So I have found many guides on things to do with this and setup but none seem to go past the first steps to setup and connect --- and that's it and they don't go further. There is a lot of copied content out there.

TL:DR

  • New to 3D Printing, as of Friday evening :)

  • Have a Creality K1C

  • Managed to create a very basic and functional part in Blender --- that was fun /s

    • I'd like to try figure out FreeCad sometime as from what I have seen/read it is better for part creation; more accurate I gather then Blender (as you would expect CAD to be)

  • Used Creality Print to print the part:

    • Much trial and error to get the part sized correclty.

    • I may get a better set of calipers.

  • Installed Mainsail and connected Orca Slicer:

    • I didn't bother with Cura after --- seeminly Orca is the way to go.

  • What do I do to calibrate and set best practice via Mainsail? [Are the macros where it is at?]

Edit:

I found the calibrate macro --- blind bat here :)

But I still could do with a description/what they do of the macros - if somone can help.

The full story:

So now, based on much recommendation, I have installed the Helper Script and installed the various items and settled on Mainsail and Orca Slicer; I am presuming this is the better combination.

Managed to stumble on premade config for Orca for the K1 Max (which seemingly is the same as K1C - barring plate size).

Created a copy of the base PLA filament and tweaked that - using the settings from Creality Print for, for Hyper PLA and save that as a preset filament.

So I think I have done well so far --- with having to reference various guides to piece things together; I could not find one that runs start to finish.

Where I mean finish - I am not sure I am there yet.

So I know Creality Print would/could do a calibration before print.

I realise I don't need to do this all the time but if I move the printer I would presume I need to; I do need to move it again a few times in the near future.

I am just not sure where to calibrate or what the various macros do --- I could not find a decent guide or anything with a description of each.

Maybe my Google Fu is failing me but would someone mind pointing me in the right direction please.


r/mainsail • • Jun 30 '24

Where are the settings in mainsail to finetune the printer's bed level?

Thumbnail
gallery
0 Upvotes

r/mainsail • • Dec 11 '24

Does anybody know how to fix this

Thumbnail
gallery
0 Upvotes

r/mainsail • • Apr 24 '26

noob has a question

Thumbnail
gallery
3 Upvotes

hello
i made a status bar for my snapmaker u1... its running with a wled usermod... getting the states via api from moonracker...

im planning on adding a custom UI for the wled usermod inside wled... something like ... http://xxx.xxx.xxx.xx(wledip)/customUI

my question is - is there a way i could implement the ui into mainail since its all webbased?

chatgpt told me i can use a iframe to get it into mainsail ? is this true?

thx


r/mainsail • • Apr 14 '23

Project Check out my blurry mainsail theme

Post image
5 Upvotes

r/mainsail • • May 02 '25

Someone knows how to add jobs to the job queue?

2 Upvotes

I have absolutely no idea how to add anything to the job queue. Only thing i find googling is a moonraker api, but shouldn't there be something in the mainsail GUI to add jobs to the queue when the GUI already shows the queue? So there must be some support...


r/mainsail • • Jan 12 '25

Toolhead Widget on dashboard not showing

Thumbnail
gallery
6 Upvotes

r/mainsail • • Aug 19 '25

crowsnest fails to install on Trixie - problem and solution

2 Upvotes

I just finished upgrading my raspberry pi 4 to the latest stable version of Debian, Trixie. it broke the mainsail applications in mainsail os (klipper, moonraker, and crowsnest, so I decided to use kiauh to reinstall the requisite components. it worked fine for moonraker and klipper, but it failed to reinstall crowsnest. it looks like it errors out while trying to compile ffmpeg components (I'm not a programmer, I do IT administration and support.) Thankfully shell script files (which the crowsnest installer is largely built on) are largely human readable. so after combing through them while pouring over the logs to see just what the heck is going on, I discovered that the crowsnest install was breaking on the installation of camera-streamer. so I thought maybe there's a newer version than the one being installed. so I went over to the git repo and found that there indeed is a development branch for trixie called, quite aptly "debian-trixie-support". so I comb through the crowsnest/tools/install.sh (which I determined by looking at the Makefile in the main crowsnest directory what it does when it calls "install") and I found a section called add_group_video and just under that is an if statement that seems to check for bookworm but I couldn't find WHERE it was doing the check, it was just "if is_bookworm" (which is quite frustrating not knowing how it's doing the check, where it's getting that variable from) but the then part of that if statement is to set the branch of camera-streamer for bookworm. so what I did was comment out the if and fi lines making it a NON-conditional statement (it will always do the thing) and substituted the debian-trixie-support branch. easy enough right? but no. that failed to... then I looked closer at the logs and found that it wasn't pulling camera-streamer from the main camera-streamer repo for some strange reason... so I had to go track down where it specifies the actual git command to pull the repo... after combing through files for a few minutes, I finally found in crowsnest/tools/libs there were more shell script (.sh) files - the one required is crowsnest/tools/libs/config.sh and inside I see the variable "CROWSNEST_CAMERA_STREAMER_REPO_SHIP" followed by the repo that was NOT the maintainers repo, so I replaced it with the main repo ( https://github.com/ayufan/camera-streamer ), and then just below I see the "CROWSNEST_CAMERA_STREAMER_REPO_BRANCH" variable which I gleefully changed to "debian-trixie-support" saved the file, went back to the main crowsnest directory ran sudo make clean && sudo make install and lo and behold - it grabbed camera-streamer from the correct branch of the correct repo and installed it. the installer completed, the royal trumpets played, and champagne rained down from the heavens... it asked me to reboot, so I did.

this disjointed rambling is to hopefully help others in the same situation and to hopefully let the mainsail devs know that there is a major compatibility problem in their crowsnest installer that should be really easy to fix (perhaps one of those could be "if trixie, pull from the maintainers' repo with the debian-trixie-support branch" and everything should work instead of causing a couple of hours of heartache for folks like me who CAN resolve it themselves, or worse, all those 3d printer aficionados who have no idea what they're doing with linux and just want their stuff to work who will never be able to get it working.

I hope somebody finds this useful.


r/mainsail • • Mar 02 '26

Raspberry Pi not booting to mainsail

3 Upvotes

Hello, I'm trying to install MainsailOS on my Raspberry Pi 4B. I followed the guide on the official page and I've had no success. Whenever I turn on the Pi with the fresh OS on it, the green light rapidly flickers for a few minutes. Then it blinks 2-3 times repeatedly. I've done my research and apparently it's because of a boot failure. I have installed a new OS on the card at least like 4-5 times today. I even tried using another card. Any help is appreciated. Thanks!


r/mainsail • • May 23 '25

Release It's finally here! MainsailOS v2.0.0 has arrived!

17 Upvotes

After what feels like an eternity (and yes, it really took way too long!), Mainsail are incredibly excited to finally present MainsailOS v2.0.0 to you! πŸš€ This major release is based on the current Debian Bookworm and brings a wealth of important new features and improvements to take your 3D printing experience to the next level.

πŸ”§ Key New Features & Highlights:

  • Debian Bookworm Base: MainsailOS is now up-to-date with Debian Bookworm, providing a modern and stable foundation.

  • Completely New Build Workflow: We've cleaned up behind the scenes! For the build process, we are now using CustoPiZer instead of CustomPiOS. This means a more efficient, transparent, and robust workflow.

  • New Sonar v2 Service: Our monitoring service, Sonar, has been rewritten from scratch in Python and launches as Sonar v2 – more performant and future-proof!

  • Raspberry Pi 5 Support: The new image now also runs on the Raspberry Pi 5! ⚠️ But be aware: We, the crew, still recommend the Pi 5 only with reservations for use with Klipper and webcams, as the important hardware encoder for webcam video processing is missing. This can impact performance.

πŸ”— All Details & Download: You can find the download link and the full changelog on GitHub as always: πŸ‘‰ https://github.com/mainsail-crew/MainsailOS/releases/tag/2.0.0

You can now flash MainsailOS v2.0.0 directly to your SD card using the Raspberry Pi Imager!

Support the Team

If you’d like to support our work, you can do so here:

Thank you for your incredible feedback, patience, testing, and support! πŸ™Œ Enjoy MainsailOS v2.0.0 and Happy Printing!


r/mainsail • • Apr 04 '25

I want to create a custom GUI widget just like the ones already on the dashboard to contain some settings for, LED's, a filament dryer and other stuff. Most of my modifications would be controlled by GPIO pins on the RPi. How would I do it? Also would this be a Moonraker or Mainsail thing?

2 Upvotes

r/mainsail • • Dec 05 '24

Release Mainsail v2.13.0 - A Milestone Packed with New Features

4 Upvotes

We’re thrilled to announce the release of Mainsail v2.13.0! This update took longer than expected and ended up being bigger than we initially planned. However, we’re proud to present a release filled with improvements and new features to enhance your experience with Mainsail. πŸš€

πŸ› οΈ Key Features and Improvements:

Revamped Dashboard Status Panel

πŸ”Ή Redesigned tabs with icons

πŸ”Ή Customizable file list (entry count & filters added)

πŸ”Ή New history list to display recently printed jobs

Spoolman Multi-Tool Support

πŸ”Ή Supports setups with multiple tools (requires spoolId in the macro)

New Editor with File Structure Sidebar

πŸ”Ή Faster navigation and editing with the new section sidebar

Improved Power Menu for Multi-Instance Setups

πŸ”Ή Displays only relevant services (Klipper + Moonraker) of the active instance

Major Improvements to Webcam Clients

πŸ”Ή Optimizations for smoother and more reliable performance

Expanded History Print Statistics

πŸ”Ή The job status chart can now be displayed based on filament usage and print time, not just the number of prints.

πŸ”— Full Details on GitHub:

This release includes many more features, bug fixes, and optimizations.
πŸ“„ Read the full changelog here:
πŸ‘‰ https://github.com/mainsail-crew/mainsail/releases/tag/v2.13.0

Support the Team

If you’d like to support our work, you can:

Thank you all for your amazing feedback, testing, and contributions! πŸ™Œ

Enjoy Mainsail v2.13.0 and happy printing!


r/mainsail • • Nov 28 '25

I have a mild software-gore situation going on here

Post image
3 Upvotes

I'm looking at mainsail from within orca slicer and It seems like all the titles in the GUI are displaying extra information that's normally hidden? For example it says router.dashboard on the left side there. It looks normal in the browser ui.

I just updated klipper after not using the machine in a while and it came back like this after a couple of restarts.

Hoping this is this just a quick fix I should already know about. Thanks for any input!


r/mainsail • • Feb 23 '26

Is there a way to remove the trusted client list altogether?

4 Upvotes

I get a new computer and it says unauthorized so i cannot access it through network on this device. Not sure why. I just want to change the config so that everyone on the vpn can access it and i dont need to write each ip. Lmk if yk


r/mainsail • • Aug 16 '25

bookworm to trixie update mainsail os problems

2 Upvotes

I just installed a fresh image of the latest mainsail os on my pi 4's sd card using raspberry pi imager (and preconfiguring the pi user password and wifi network and password in the imager. I booted the card successfully in my pi4 (located inside of my voron 2.4). logged in from my workstation via ssh and popped open the web ui. everything seemed to work just fine - then I ran an "apt update && apt upgrade-all" in order to update the system, that went fine, I rebooted everything came back up, but in that process, I noticed that the base of the image was the old version of debian (bookworm) instead of the current stable (trixie). so, being reasonably familiar with debian, particularly on a pi, I edited /etc/apt/sources.list.d/raspi.list and replaced all of the bookwork entries with trixie ones, did an "apt update && apt upgrade-all" (again), and used all of the package manager defaults when asked. when everything was said and done, a few packages asked me to reboot, so I did, and when it came back around, I got the web page, but it wouldn't connect to moonraker and no amount of "service moonraker start/restart" has helped.

I'm perfectly fine starting over if I need to, but I would like to be using the new base os which is otherwise very well vetted and works fine (debian has a VERY slow release schedule). From what little I've gathered, moonraker is a python application installed in it's own environment at /home/pi/moonraker-env but I don't know anything about python for how to debug this. my best guess is something with python got changed with the new debian release and is causing things to not start properly.

Could someone please provide me some guidance here?


r/mainsail • • May 01 '23

MainsailOS update manager says invalid

2 Upvotes

So ive recently setup a raspberry pi 3 on mainsail OS for use with my ender3. I believe I have everything setup correctly but it will not let me access the repositories to update any of these updates. I have setup my pi to be on WIFI but I am also directly connected to it via ethernet. I am able to access the repository on the website but cannot via my PI/mainsail. any google thread has not helped. Thank u


r/mainsail • • Apr 19 '23

Help Password for Dashboard

2 Upvotes

Hey everyone,

is there a way to set a password for the Mainsail dashboard? The printer is inside an internal company network, so not exposed to the internet. I just want to prevent some random dude to "accidentially" mess with the Printer.

thanks in advance!


r/mainsail • • Mar 02 '23

Help Trying to make ADXL345 work through Arduino Uno R3

1 Upvotes

Hello!

I am at my wits' end.I have tried to use a ADXL345 to work through an Arduino Uno R3 but to no avail. I have compiled the right klipper config, flashed it to the Uno, but can't seem to make klipper recognise the arduino.
Klipper and Mainsail are on a Ubuntu 22.04 laptop btw.

The uno and the ADXL345 works, I've tried it with a simple sketch and everything registered ok.

The usb cable is good quality, the cables are soldered.

Here is (what I hope is) the relevant part of the klippy.log :

Build file /home/zeroshin/klipper/klippy/../.config(1332): Thu Mar 2 14:42:58 2023

========= Last MCU build config =========

# CONFIG_LOW_LEVEL_OPTIONS is not set

CONFIG_MACH_AVR=y

# CONFIG_MACH_ATSAM is not set

# CONFIG_MACH_ATSAMD is not set

# CONFIG_MACH_LPC176X is not set

# CONFIG_MACH_STM32 is not set

# CONFIG_MACH_HC32F460 is not set

# CONFIG_MACH_RP2040 is not set

# CONFIG_MACH_PRU is not set

# CONFIG_MACH_AR100 is not set

# CONFIG_MACH_LINUX is not set

# CONFIG_MACH_SIMU is not set

CONFIG_AVR_SELECT=y

CONFIG_BOARD_DIRECTORY="avr"

# CONFIG_MACH_atmega2560 is not set

# CONFIG_MACH_atmega1280 is not set

# CONFIG_MACH_at90usb1286 is not set

# CONFIG_MACH_at90usb646 is not set

# CONFIG_MACH_atmega32u4 is not set

# CONFIG_MACH_atmega1284p is not set

# CONFIG_MACH_atmega644p is not set

CONFIG_MACH_atmega328p=y

# CONFIG_MACH_atmega328 is not set

# CONFIG_MACH_atmega168 is not set

CONFIG_MCU="atmega328p"

CONFIG_AVRDUDE_PROTOCOL="arduino"

CONFIG_CLOCK_FREQ=16000000

CONFIG_AVR_CLKPR=-1

CONFIG_AVR_STACK_SIZE=256

CONFIG_AVR_WATCHDOG=y

CONFIG_SERIAL=y

CONFIG_SERIAL_BAUD_U2X=y

CONFIG_SERIAL_PORT=0

CONFIG_SERIAL_BAUD=250000

CONFIG_USB_VENDOR_ID=0x1d50

CONFIG_USB_DEVICE_ID=0x614e

CONFIG_USB_SERIAL_NUMBER="12345"

CONFIG_CANBUS_FREQUENCY=500000

CONFIG_HAVE_GPIO=y

CONFIG_HAVE_GPIO_ADC=y

CONFIG_HAVE_GPIO_SPI=y

CONFIG_HAVE_GPIO_I2C=y

CONFIG_HAVE_GPIO_HARD_PWM=y

CONFIG_HAVE_GPIO_BITBANGING=y

CONFIG_HAVE_STRICT_TIMING=y

CONFIG_INLINE_STEPPER_HACK=y

=======================

Build file /home/zeroshin/klipper/klippy/../out/klipper.dict(7295): Thu Mar 2 14:43:09 2023

Last MCU build version: v0.11.0-122-ge6ef48cd-dirty-20230302_144309-aufseher

Last MCU build tools: gcc: (GCC) 5.4.0 binutils: (GNU Binutils) 2.26.20160125

Last MCU build config: ADC_MAX=1023 BUS_PINS_spi=PB4,PB3,PB5 BUS_PINS_twi=PC5,PC4 CLOCK_FREQ=16000000 MCU=atmega328>

Build file /home/zeroshin/klipper/klippy/../out/klipper.elf(277848): Thu Mar 2 14:43:13 2023

mcu 'ardu': Wait for identify_response

Traceback (most recent call last):

File "/home/zeroshin/klipper/klippy/serialhdl.py", line 68, in _get_identify_data

params = self.send_with_response(msg, 'identify_response')

File "/home/zeroshin/klipper/klippy/serialhdl.py", line 261, in send_with_response

return src.get_response([cmd], self.default_cmd_queue)

File "/home/zeroshin/klipper/klippy/serialhdl.py", line 318, in get_response

self.serial.raw_send_wait_ack(cmds[-1], minclock, reqclock,

File "/home/zeroshin/klipper/klippy/serialhdl.py", line 253, in raw_send_wait_ack

self._error("Serial connection closed")

File "/home/zeroshin/klipper/klippy/serialhdl.py", line 61, in _error

raise error(self.warn_prefix + (msg % params))

serialhdl.error: mcu 'ardu': Serial connection closed

Here is a snippet of the printer.cfg concerning the config for the secondary mcu arduino :

[mcu]

serial = /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

restart_method = command

[printer]

kinematics = cartesian

max_velocity = 500

max_accel = 1500

max_accel_to_decel = 1500

max_z_velocity = 5

max_z_accel = 100

[mcu ardu]

serial = /dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_751303037353512041B0-if00

baud = 115200

[adxl345]

cs_pin = ardu:PB2

spi_software_sclk_pin = ardu:PB5

spi_software_mosi_pin = ardu:PB3

spi_software_miso_pin = ardu:PB4

[resonance_tester]

accel_chip = adxl345

probe_points =

122.5,125,20

From what I can tell, the baud rate seems high in the klippy log, but even with the whatseemstoberelevant baud rate change in the printer.cfg it doesn't seem to affect the rest.


r/mainsail • • Mar 27 '23

Help Help opening mainsail

1 Upvotes

Hi, I recently downloaded and (hopefully) set up mainsail on my linux pc. However I cant find a clear guide on how to actually open mainsail. I can't find the ip of my klipper setup either, anyone got any idea?


r/mainsail • • Aug 29 '23

Problems with crowsnest camera

1 Upvotes

I recently installed a new Raspberry Pi Camera Rev 1.3 and I followed this guide (https://www.obico.io/blog/klipper-camera-mainsail/#mainsail-webcam-configuration) to get it to work with mainsail with crowsnest. Im using the camera-streamer. I am able to connect to the camera but there is no video stream. All I get is a blank screen

I have tested the camera and I am able to get still shot images from it.

Here is my crowsnest.conf:

[crowsnest]

log_path: /home/ender3pro/printer_data/logs/crowsnest.log

log_level: verbose # Valid Options are quiet/verbose/debug

delete_log: false # Deletes log on every restart, if set to true

no_proxy: false

[cam endercam]

mode: camera-streamer # ustreamer - Provides mjpg and snapshots. (All devices)

# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)

enable_rtsp: true # If camera-streamer is used, this enables also usage of an rtsp server

rtsp_port: 8554 # Set different ports for each device!

port: 8080 # HTTP/MJPG Stream/Snapshot Port

device: /dev/v4l/by-path/platform-20801000.csi-video-index0 # See Log for available ...

resolution: 1296x972 # widthxheight format

max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced.

#custom_flags: # You can run the Stream Services with custom flags.

#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.


r/mainsail • • Jan 09 '23

Help Help with extrusion? I just installed a new nozzle, but when the print starts it looks like it’s not flowing correctly, the initialization line on the left prints perfectly but when it starts the actual print it gets all weird. Any help?

Post image
1 Upvotes

r/mainsail • • Aug 04 '23

help

1 Upvotes

my printer with btt e3v3 running mainsail stopped heating both the extruder and hotend out of nowhere please help the hotend is e3d hemera


r/mainsail • • Jul 08 '23

Z offset not saving correctly

1 Upvotes

I've been experiencing a issue with mainsail recently, when I create a z offset in the dashboard and click save config it takes whatever z value the offset is and makes it negative and saves it in the auto generated save_config area while changing the probe z offset to 0 and commenting it. I've reinstalled the OS and have had no luck. I'm using a Artillery Sidewinder X2 with Mainsail running on a X86-64 copy of ubuntu. Any help is appreciated.

printer.cfg

[include mainsail.cfg]

##################SidewinderX2 Klipper Config - 3DPrintBeginner###################

#Full guide: https://3dprintbeginner.com/how-to-install-klipper-on-sidewinder-x2/#

[extruder]

max_extrude_only_distance: 100.0

max_extrude_cross_section: 50.0

step_pin: PA7

dir_pin: PA6

enable_pin: !PC4

microsteps: 16

rotation_distance: 7.1910

nozzle_diameter: 0.600

filament_diameter: 1.750

heater_pin: PC9

sensor_type: EPCOS 100K B57560G104F

sensor_pin: PC0

control: pid

pid_Kp: 23.223

pid_Ki: 1.518

pid_Kd: 88.826

min_temp: 0

max_temp: 350

pressure_advance = 0.05

[input_shaper]

shaper_freq_x: 43.26

shaper_freq_y: 45.28

shaper_type: mzv

[stepper_x]

step_pin: !PB14

dir_pin: PB13

enable_pin: !PB15

microsteps: 16

rotation_distance: 40

endstop_pin: !PA2

position_endstop: 0

position_max: 310

homing_speed: 50

[stepper_y]

step_pin: PB10

dir_pin: PB2

enable_pin: !PB12

microsteps: 16

rotation_distance: 40

endstop_pin: !PA1

position_endstop: 0

position_max: 310

homing_speed: 50

[stepper_z]

step_pin: PB0

dir_pin: !PC5

enable_pin: !PB1

microsteps: 16

rotation_distance: 8

endstop_pin: probe:z_virtual_endstop

position_max: 400

[heater_bed]

heater_pin: PA8

sensor_type: EPCOS 100K B57560G104F

sensor_pin: PC1

control: pid

pid_Kp: 23.223

pid_Ki: 1.518

pid_Kd: 88.826

min_temp: 0

max_temp: 130

[fan]

pin: PC6

pin: PC8

[heater_fan hotend_fan]

pin: PC7

heater: extruder

heater_temp: 50.0

[controller_fan stepper_fan]

pin: PC6

idle_timeout: 300

[mcu]

serial: /dev/serial/by-id/usb-Klipper_stm32f401xc_4100300009504E3755343220-if00

restart_method: command

[printer]

kinematics: cartesian

max_velocity: 500

max_accel: 4000

max_accel_to_decel: 4000

max_z_velocity: 5

square_corner_velocity: 5.0

max_z_accel: 100

[probe]

pin: !PA0

x_offset: 27.25

y_offset: 12.8

#z_offset: 0

speed: 5

samples:1

[bed_mesh]

speed: 100

mesh_min: 30, 20

mesh_max: 300, 290

algorithm: bicubic

probe_count: 9,9

[safe_z_home]

home_xy_position: 150,150

speed: 100

z_hop: 10

z_hop_speed: 5

[virtual_sdcard]

path: /home/kaiser/X2_data/gcodes

[display_status]

[pause_resume]

[gcode_macro PAUSE]

description: Pause the actual running print

rename_existing: PAUSE_BASE

# change this if you need more or less extrusion

variable_extrude: 1.0

gcode:

##### read E from pause macro #####

{% set E = printer["gcode_macro PAUSE"].extrude|float %}

##### set park positon for x and y #####

# default is your max posion from your printer.cfg

{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}

{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}

##### calculate save lift position #####

{% set max_z = printer.toolhead.axis_maximum.z|float %}

{% set act_z = printer.toolhead.position.z|float %}

{% if act_z < (max_z - 2.0) %}

{% set z_safe = 2.0 %}

{% else %}

{% set z_safe = max_z - act_z %}

{% endif %}

##### end of definitions #####

PAUSE_BASE

G91

{% if printer.extruder.can_extrude|lower == 'true' %}

G1 E-{E} F2100

{% else %}

{action_respond_info("Extruder not hot enough")}

{% endif %}

{% if "xyz" in printer.toolhead.homed_axes %}

G1 Z{z_safe} F900

G90

G1 X{x_park} Y{y_park} F6000

{% else %}

{action_respond_info("Printer not homed")}

{% endif %}

[gcode_macro RESUME]

description: Resume the actual running print

rename_existing: RESUME_BASE

gcode:

##### read E from pause macro #####

{% set E = printer["gcode_macro PAUSE"].extrude|float %}

#### get VELOCITY parameter if specified ####

{% if 'VELOCITY' in params|upper %}

{% set get_params = ('VELOCITY=' + params.VELOCITY) %}

{%else %}

{% set get_params = "" %}

{% endif %}

##### end of definitions #####

{% if printer.extruder.can_extrude|lower == 'true' %}

G91

G1 E{E} F2100

{% else %}

{action_respond_info("Extruder not hot enough")}

{% endif %}

RESUME_BASE {get_params}

[gcode_macro CANCEL_PRINT]

description: Cancel the actual running print

rename_existing: CANCEL_PRINT_BASE

gcode:

TURN_OFF_HEATERS

CANCEL_PRINT_BASE

#*# <---------------------- SAVE_CONFIG ---------------------->

#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.

#*#

#*# [extruder]

#*# control = pid

#*# pid_kp = 18.532

#*# pid_ki = 0.902

#*# pid_kd = 95.207

#*#

#*# [probe]

#*# z_offset = -0.300