Skip to content

Commit

Permalink
GITBOOK-165: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored and gitbook-bot committed Oct 24, 2023
1 parent 8aae974 commit 5e3d169
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions setup/configuration.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Configuration
---
description: >-
Mainsail requires a minimum configuration to function properly and will
display a warning at startup if the required parts are not found in your
configuration file(s).
---

{% hint style="warning" %}
Mainsail requires a minimum configuration to function properly and will display a warning at startup if the required parts are not found in your configuration file(s).
{% endhint %}
# Configuration

## Required
## Fast way (mainsail.cfg)

The following configuration elements are required and must be configured for Mainsail to function properly. In **MainsailOS** they are stored by default in [mainsail.cfg](https://github.com/mainsail-crew/mainsail-config/blob/master/client.cfg) and only need to be included in `printer.cfg`.

Expand All @@ -16,6 +19,12 @@ This ensures that your printer config file includes the mainsail.cfg. If you are
[include mainsail.cfg]
```

## Manual way

{% hint style="info" %}
This step is not necessary if you are already using mainsail.cfg.
{% endhint %}

### Virtual SD Card <a href="#virtual-sd-card" id="virtual-sd-card"></a>

The `Virtual SD Card` allows G-Code file uploads.
Expand All @@ -41,9 +50,7 @@ These macros enable pause and resume in Klipper.
[pause_resume]
```

### Macros <a href="#macros" id="macros"></a>

#### Add pause / resume / cancel functionality <a href="#add-pause--resume--cancel-functionality" id="add-pause--resume--cancel-functionality"></a>
#### Add pause / resume / cancel macros <a href="#add-pause--resume--cancel-functionality" id="add-pause--resume--cancel-functionality"></a>

You can modify the below macros to fit your needs.

Expand All @@ -63,8 +70,8 @@ rename_existing: RESUME_BASE
gcode:
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####

{% raw %}
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
{% raw %}
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
Expand All @@ -82,6 +89,7 @@ gcode:
{% endraw %}



RESUME_BASE {get_params}
```

Expand All @@ -93,13 +101,14 @@ variable_park: True
gcode:
## Move head and retract only if not already in the pause state and park set to true

{% raw %}
{% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
{% raw %}
{% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
_TOOLHEAD_PARK_PAUSE_CANCEL
{% endif %}
{% endraw %}



TURN_OFF_HEATERS
CANCEL_PRINT_BASE
```
Expand All @@ -112,8 +121,8 @@ gcode:
##### set park positon for x and y #####
# default is your max posion from your printer.cfg

{% raw %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% raw %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set z_park_delta = 2.0 %}
##### calculate save lift position #####
Expand Down

0 comments on commit 5e3d169

Please sign in to comment.