From 309b8e030f68329d04573042ffc53a2745ac088b Mon Sep 17 00:00:00 2001 From: Dmitry Butyugin Date: Wed, 8 Dec 2021 21:44:07 +0100 Subject: [PATCH] scripts: Migrated shaper calibration scripts to Python3 Also updated instructions to install python3-numpy and python3-matplotlib Python packages. Signed-off-by: Dmitry Butyugin --- docs/Config_Changes.md | 10 ++++++++++ docs/Measuring_Resonances.md | 2 +- scripts/calibrate_shaper.py | 2 +- scripts/graph_accelerometer.py | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 11447d4d..e9bcd120 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -8,6 +8,16 @@ All dates in this document are approximate. ## Changes +20211230: Scripts to tune input shaper (`scripts/calibrate_shaper.py` +and `scripts/graph_accelerometer.py`) were migrated to use Python3 +by default. As a result, users must install Python3 versions of certain +packages (e.g. `sudo apt install python3-numpy python3-matplotlib`) to +continue using these scripts. For more details, refer to +[Software installation](Measuring_Resonances.md#software-installation). +Alternatively, users can temporarily force the execution of these scripts +under Python 2 by explicitly calling Python2 interpretor in the console: +`python2 ~/klipper/scripts/calibrate_shaper.py ...` + 20211110: The "NTC 100K beta 3950" temperature sensor is deprecated. This sensor will be removed in the near future. Most users will find the "Generic 3950" temperature sensor more accurate. To continue to diff --git a/docs/Measuring_Resonances.md b/docs/Measuring_Resonances.md index e940713a..32a7413d 100644 --- a/docs/Measuring_Resonances.md +++ b/docs/Measuring_Resonances.md @@ -77,7 +77,7 @@ too little RAM, the installation may fail and you will need to enable swap. Next, run the following commands to install the additional dependencies: ``` sudo apt update -sudo apt install python-numpy python-matplotlib +sudo apt install python3-numpy python3-matplotlib ``` Afterwards, check and follow the instructions in the diff --git a/scripts/calibrate_shaper.py b/scripts/calibrate_shaper.py index 3d4bceff..8a0fcdf0 100755 --- a/scripts/calibrate_shaper.py +++ b/scripts/calibrate_shaper.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # Shaper auto-calibration script # # Copyright (C) 2020 Dmitry Butyugin diff --git a/scripts/graph_accelerometer.py b/scripts/graph_accelerometer.py index 990bd23b..8c09e847 100755 --- a/scripts/graph_accelerometer.py +++ b/scripts/graph_accelerometer.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python3 # Generate adxl345 accelerometer graphs # # Copyright (C) 2020 Kevin O'Connor