Skip to content

Commit c8e4307

Browse files
authored
Merge pull request #23 from rootiest/dev-4.1
Version 4.1.0 Bug Fixes and Refinements
2 parents a1a70d8 + 450c973 commit c8e4307

29 files changed

+2390
-495
lines changed

.github/linters/.shellchekrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source-path=SCRIPTDIR
2+
disable=SC1090

.github/workflows/linter.yml

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,59 @@
11
---
2-
#################################
3-
#################################
4-
## Super Linter GitHub Actions ##
5-
#################################
6-
#################################
2+
#################################
3+
#################################
4+
## Super Linter GitHub Actions ##
5+
#################################
6+
#################################
7+
name: Lint Code Base
8+
9+
#############################
10+
# Start the job on all push #
11+
#############################
12+
on:
13+
push:
14+
branches-ignore: [master, main]
15+
# Remove the line above to run when pushing to master
16+
pull_request:
17+
18+
###############
19+
# Set the Job #
20+
###############
21+
jobs:
22+
build:
23+
# Name the Job
724
name: Lint Code Base
8-
9-
#############################
10-
# Start the job on all push #
11-
#############################
12-
on:
13-
push:
14-
branches-ignore: [master, main]
15-
# Remove the line above to run when pushing to master
16-
pull_request:
17-
branches: [master, main]
18-
19-
###############
20-
# Set the Job #
21-
###############
22-
jobs:
23-
build:
24-
# Name the Job
25-
name: Lint Code Base
26-
# Set the agent to run on
27-
runs-on: ubuntu-latest
28-
29-
############################################
30-
# Grant status permission for MULTI_STATUS #
31-
############################################
32-
permissions:
33-
contents: read
34-
packages: read
35-
statuses: write
36-
37-
##################
38-
# Load all steps #
39-
##################
40-
steps:
41-
##########################
42-
# Checkout the code base #
43-
##########################
44-
- name: Checkout Code
45-
uses: actions/checkout@v3
46-
with:
47-
# Full git history is needed to get a proper
48-
# list of changed files within `super-linter`
49-
fetch-depth: 0
50-
51-
################################
52-
# Run Linter against code base #
53-
################################
54-
- name: Lint Code Base
55-
uses: github/super-linter@v5
56-
env:
57-
VALIDATE_ALL_CODEBASE: false
58-
DEFAULT_BRANCH: master
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
VALIDATE_JSCPD: false
25+
# Set the agent to run on
26+
runs-on: ubuntu-latest
27+
28+
############################################
29+
# Grant status permission for MULTI_STATUS #
30+
############################################
31+
permissions:
32+
contents: read
33+
packages: read
34+
statuses: write
35+
36+
##################
37+
# Load all steps #
38+
##################
39+
steps:
40+
##########################
41+
# Checkout the code base #
42+
##########################
43+
- name: Checkout Code
44+
uses: actions/checkout@v3
45+
with:
46+
# Full git history is needed to get a proper
47+
# list of changed files within `super-linter`
48+
fetch-depth: 0
49+
50+
################################
51+
# Run Linter against code base #
52+
################################
53+
- name: Lint Code Base
54+
uses: github/super-linter@v5
55+
env:
56+
VALIDATE_ALL_CODEBASE: false
57+
DEFAULT_BRANCH: master
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
VALIDATE_JSCPD: false

.github/workflows/opencommit.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
name: 'OpenCommit Action'
1+
---
2+
#################################
3+
#################################
4+
## OpenCommit Action ##
5+
#################################
6+
#################################
7+
name: "OpenCommit Action"
28

39
on:
410
push:
511
# this list of branches is often enough,
612
# but you may still ignore other public branches
7-
branches-ignore: [master, main, dev]
13+
branches: [test]
814
paths:
915
- "src/**"
1016
- "scripts/**"
@@ -28,7 +34,7 @@ jobs:
2834
- name: Setup Node.js Environment
2935
uses: actions/setup-node@v2
3036
with:
31-
node-version: '16'
37+
node-version: "16"
3238
- uses: actions/checkout@v3
3339
with:
3440
fetch-depth: 0
@@ -44,8 +50,8 @@ jobs:
4450

4551
# customization
4652
OCO_OPENAI_MAX_TOKENS: 500
47-
OCO_OPENAI_BASE_PATH: ''
53+
OCO_OPENAI_BASE_PATH: ""
4854
OCO_DESCRIPTION: false
4955
OCO_EMOJI: false
5056
OCO_MODEL: gpt-3.5-turbo
51-
OCO_LANGUAGE: en
57+
OCO_LANGUAGE: en
Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
---
2+
#################################
3+
#################################
4+
## Release to Discord ##
5+
#################################
6+
#################################
7+
18
name: Release to Discord
29

310
on:
4-
release:
5-
types: [published]
11+
release:
12+
types: [published]
613
jobs:
7-
github-releases-to-discord:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v3
12-
- name: Github Releases To Discord
13-
uses: sillyangel/releases-to-discord@v1
14-
with:
15-
webhook_url: ${{ secrets.WEBHOOK_URL }}
16-
color: "2105893"
17-
username: "PrintCFG Release"
18-
avatar_url: "https://raw.githubusercontent.com/rootiest/zippy_guides/main/resources/logo.png"
14+
github-releases-to-discord:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Github Releases To Discord
20+
uses: LeGitHubDeTai/github-to-discord@main
21+
env:
22+
DISCORD_WEBHOOK: ${{ secrets.WEBHOOK_URL }}
23+
MESSAGE_COLOR: 2105893
24+
DISCORD_USERNAME: PrintCFG Release
25+
DISCORD_AVATAR: https://raw.githubusercontent.com/rootiest/zippy_guides/main/resources/logo.png
26+
MESSAGE_TITLE: New PrintCFG release!
27+
MESSAGE_DESCRIPTION: "@PrintCFG Updates"
28+
FOOTER_TEXT: PrintCFG Klipper Suite

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ user_profile.cfg
22
user_config.cfg
33
logs/*
44
src/**.service
5-
log4bash.sh
5+
log4bash.sh
6+
printcfg.conf

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!--
2121
#####################################
2222
## Printcfg Documentation ##
23-
## Version 4.0.0 2023-6-5 ##
23+
## Version 4.1.0 2023-7-3 ##
2424
#####################################
2525
-->
2626

@@ -59,13 +59,13 @@ All of this can be configured and used with absolutely no knowledge of creating
5959

6060
## Contact
6161

62-
Rootiest#5668 on Discord (Voron and Klipper servers)
62+
Rootiest on Discord (Voron and Klipper servers)
6363

6464
Donate to support my work:
6565

6666
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/rootiest)
6767

68-
Join the [Rootiest Discord server](https://discord.gg/AYjVSvrVF2) for information and support for my projects.
68+
Join the [Rootiest Discord server](http://rootiest.com/discord.html) for information and support for my projects.
6969

7070
<picture>
7171
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/rootiest/zippy_guides/main/resources/github-snake-dark.svg">

print_debug.cfg

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#####################################
1919
## Print Debugging ##
20-
## Version 4.0.0 2023-6-5 ##
20+
## Version 4.1.0 2023-7-3 ##
2121
#####################################
2222

2323
## This file contains optional macros
@@ -592,28 +592,31 @@ gcode:
592592
[gcode_macro WHERE_AM_I]
593593
description: Respond with the current position of the toolhead
594594
gcode:
595-
{ action_respond_info( "The toolhead is at: \n X: {} \n Y: {} \n Z: {}".format( printer.toolhead.position.x, printer.toolhead.position.y, printer.toolhead.position.z ) ) }
596-
{ action_respond_info( "The toolhead is at: \n {}".format( printer.motion_report.live_position ) ) }
597-
598-
[gcode_macro TEMP_Z_OFFSET_SET]
599-
variable_offset: 0
600-
gcode:
601-
{% set TEMP_Z_OFFSET = params.TEMP_Z_OFFSET|default(0.0)|float %}
602-
#SET_GCODE_OFFSET Z={TEMP_Z_OFFSET}
603-
SET_GCODE_VARIABLE MACRO=TEMP_Z_OFFSET_SET VARIABLE=offset VALUE={TEMP_Z_OFFSET}
595+
# Define variables
596+
{% set tool = printer.toolhead %}
597+
{% set mr = printer.motion_report %}
598+
{% set x = tool.position.x %}
599+
{% set y = tool.position.y %}
600+
{% set z = tool.position.z %}
601+
{% set x_live = mr.live_position.x %}
602+
{% set y_live = mr.live_position.y %}
603+
{% set z_live = mr.live_position.z %}
604+
# Check if the printer is homed
605+
{% if "xyz" in tool.homed_axes %} ; If the printer is homed
606+
# Output the current position
607+
{ action_respond_info( "The toolhead is at: \n X: {} \n Y: {} \n Z: {}".format( x, y, z ) ) }
608+
{ action_respond_info( "The live position is: \n X: {} \n Y: {} \n Z: {}".format( x_live, y_live, z_live ) ) }
609+
{% else %} ; If the printer is not homed
610+
{ action_respond_info( "The toolhead is not homed" ) } ; Respond with "not homed" status
611+
{% endif %}
612+
# Output the current position
604613

605-
[gcode_macro TEMP_Z_OFFSET_FORGET]
614+
[gcode_macro GET_SHAPERS]
615+
description: Respond with the current shaper settings
606616
gcode:
607-
{% set TEMP_Z_FORGET = printer["gcode_macro TEMP_Z_OFFSET_SET"].offset %}
608-
M118 Offset: {TEMP_Z_FORGET}
609-
#SET_GCODE_OFFSET Z=-{TEMP_Z_FORGET}
617+
{% set config = printer.configfile.settings %} ; Make code cleaner
618+
{% set is = config.input_shaper %} ; by defining these vars
610619

611-
[gcode_macro button_test]
612-
gcode:
613-
{% if printer['gcode_button my_button'].state == 'PRESSED' %}
614-
M118 Button is Pressed
615-
{% elif printer['gcode_button my_button'].state == 'RELEASED' %}
616-
M118 Button is Released
617-
{% else %}
618-
M118 Somebody done fucked up, this shouldn't happen.
619-
{% endif %}
620+
# Output the shaper types and frequencies
621+
{ action_respond_info( "X shaper: {} at {} Hz".format( is.shaper_type_x, is.shaper_freq_x ) ) }
622+
{ action_respond_info( "Y shaper: {} at {} Hz".format( is.shaper_type_y, is.shaper_freq_y ) ) }

print_extras.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#####################################
1919
## Print Extras ##
20-
## Version 4.0.0 2023-6-5 ##
20+
## Version 4.1.0 2023-7-3 ##
2121
#####################################
2222

2323
## This file contains optional config

0 commit comments

Comments
 (0)