added standard header to .py files

This commit is contained in:
Félix Boisselier
2024-06-12 13:17:07 +02:00
parent ecd57ea3dc
commit 8408152093
24 changed files with 244 additions and 40 deletions

View File

@@ -0,0 +1,6 @@
# Shake&Tune: 3D printer analysis tools
#
# Copyright (C) 2024 Félix Boisselier <felix@fboisselier.fr> (Frix_x on Discord)
# Licensed under the GNU General Public License v3.0 (GPL-3.0)
#
# File: __init__.py

View File

@@ -1,5 +1,12 @@
# Common functions for the Shake&Tune package
# Written by Frix_x#0161 #
# Shake&Tune: 3D printer analysis tools
#
# Copyright (C) 2024 Félix Boisselier <felix@fboisselier.fr> (Frix_x on Discord)
# Licensed under the GNU General Public License v3.0 (GPL-3.0)
#
# File: common_func.py
# Description: Contains common functions and constants used across the Shake&Tune
# package for 3D printer vibration analysis and diagnostics.
import math
import os

View File

@@ -1,3 +1,13 @@
# Shake&Tune: 3D printer analysis tools
#
# Copyright (C) 2024 Félix Boisselier <felix@fboisselier.fr> (Frix_x on Discord)
# Licensed under the GNU General Public License v3.0 (GPL-3.0)
#
# File: console_output.py
# Description: Defines the ConsoleOutput class for printing output to stdout or an alternative
# callback function, such as the Klipper console.
import io
from typing import Callable, Optional

View File

@@ -1,6 +1,12 @@
# Classes to retrieve a couple of motors infos and extract the relevant information
# from the Klipper configuration and the TMC registers
# Written by Frix_x#0161 #
# Shake&Tune: 3D printer analysis tools
#
# Copyright (C) 2024 Félix Boisselier <felix@fboisselier.fr> (Frix_x on Discord)
# Licensed under the GNU General Public License v3.0 (GPL-3.0)
#
# File: motors_config_parser.py
# Description: Contains classes to retrieve motor information and extract relevant data
# from the Klipper configuration and TMC registers.
from typing import Any, Dict, List, Optional

View File

@@ -1,11 +1,20 @@
# The logic in this file was "extracted" from Klipper's orignal resonance_tester.py file
# Courtesy of Dmitry Butyugin <dmbutyugin@google.com> for the original implementation
# Shake&Tune: 3D printer analysis tools
#
# Adapted from Klipper's original resonance_tester.py file by Dmitry Butyugin <dmbutyugin@google.com>
# Copyright (C) 2024 Félix Boisselier <felix@fboisselier.fr> (Frix_x on Discord)
# Licensed under the GNU General Public License v3.0 (GPL-3.0)
#
# File: resonance_test.py
# Description: Contains functions to test the resonance frequency of the printer and its components
# by vibrating the toolhead in specific axis directions. This derive a bit from Klipper's
# implementation as there are two main changes:
# 1. Original code doesn't use euclidean distance with projection for the coordinates calculation.
# The new approach implemented here ensures that the vector's total length remains constant (= L),
# regardless of the direction components. It's especially important when the direction vector
# involves combinations of movements along multiple axes like for the diagonal belt tests.
# 2. Original code doesn't allow Z axis movements that was added in order to test the Z axis resonance
# or CoreXZ belts frequency profiles as well.
# This derive a bit from Klipper's implementation as there are two main changes:
# 1. Original code doesn't use euclidean distance for the moves calculation with projection. The new approach implemented here
# ensures that the vector's total length remains constant (= L), regardless of the direction components. It's especially
# important when the direction vector involves combinations of movements along multiple axes like for the diagonal belt tests.
# 2. Original code doesn't allow Z axis movement that was added here for later use
import math