From 7932d73ed99f804d7d6d1f4f8fe3def87f127531 Mon Sep 17 00:00:00 2001 From: Franklyn Tackitt Date: Tue, 17 Sep 2024 08:54:59 -0700 Subject: [PATCH 1/5] Allow overriding the KCONFIG_CONFIG path This lets users keep multiple configs around with `KCONFIG_CONFIG=mcu.config make` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 735d18633..a4bf6903b 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ OUT=out/ # Kconfig includes -export KCONFIG_CONFIG := $(CURDIR)/.config +export KCONFIG_CONFIG ?= $(CURDIR)/.config -include $(KCONFIG_CONFIG) # Common command definitions From 20938403b4212e2815434fcb4bf30fd3804ee1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Ro=C3=9F?= <47773180+P-C-R@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:37:17 +0200 Subject: [PATCH 2/5] Update Config_Reference_Bleeding_Edge.md --- docs/Config_Reference_Bleeding_Edge.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Config_Reference_Bleeding_Edge.md b/docs/Config_Reference_Bleeding_Edge.md index 5bf404903..1579155c0 100644 --- a/docs/Config_Reference_Bleeding_Edge.md +++ b/docs/Config_Reference_Bleeding_Edge.md @@ -66,12 +66,12 @@ smoother_freq_y: 0 ## Test print utilities -### [ringing_tower] +### [ringing_test] Ringing tower test print utility which isolates vibrations to one axis at a time. ``` -[ringing_tower] +[ringing_test] size: 100 # X-Y Size of tower footprint (mm) height: 60 From 91e0fdf8c3ea4fcdd414fe107eb7190a68cff8cc Mon Sep 17 00:00:00 2001 From: Zeanon Date: Mon, 16 Sep 2024 15:44:41 +0200 Subject: [PATCH 3/5] action_log Small change so there is a action to write something to the log, can be usefull for automated z-offset calculation or other stuff that is usefull to be logged --- klippy/extras/gcode_macro.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/klippy/extras/gcode_macro.py b/klippy/extras/gcode_macro.py index 49666b025..a3fc13d32 100644 --- a/klippy/extras/gcode_macro.py +++ b/klippy/extras/gcode_macro.py @@ -127,6 +127,10 @@ def _action_respond_info(self, msg): self.printer.lookup_object("gcode").respond_info(msg) return "" + def _action_log(self, msg): + logging.info(msg) + return "" + def _action_raise_error(self, msg): raise self.printer.command_error(msg) @@ -143,6 +147,7 @@ def create_template_context(self, eventtime=None): "printer": GetStatusWrapper(self.printer, eventtime), "action_emergency_stop": self._action_emergency_stop, "action_respond_info": self._action_respond_info, + "action_log": self._action_log, "action_raise_error": self._action_raise_error, "action_call_remote_method": self._action_call_remote_method, "math": math, From b93366277a23c0e234084d0bcb85b91a346d5b86 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Mon, 16 Sep 2024 15:50:26 +0200 Subject: [PATCH 4/5] test-case, Readme, Doc --- README.md | 2 + docs/Command_Templates.md | 1 + test/klippy/action_log.cfg | 81 +++++++++++++++++++++++++++++++++++++ test/klippy/action_log.test | 5 +++ 4 files changed, 89 insertions(+) create mode 100644 test/klippy/action_log.cfg create mode 100644 test/klippy/action_log.test diff --git a/README.md b/README.md index 032d0c158..212ff0f02 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ See the [Danger Features document](https://dangerklipper.io/Danger_Features.html - [core: non-critical-mcus](https://github.com/DangerKlippers/danger-klipper/pull/339) +- [core: action_log](https://github.com/DangerKlippers/danger-klipper/pull/367) + If you're feeling adventurous, take a peek at the extra features in the bleeding-edge-v2 branch [feature documentation](docs/Bleeding_Edge.md) and [feature configuration reference](docs/Config_Reference_Bleeding_Edge.md): diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md index 3435d6c16..0b1582597 100644 --- a/docs/Command_Templates.md +++ b/docs/Command_Templates.md @@ -190,6 +190,7 @@ Available "action" commands: - `action_respond_info(msg)`: Write the given `msg` to the /tmp/printer pseudo-terminal. Each line of `msg` will be sent with a "// " prefix. +- `action_log(msg)`: Write the given msg to the klippy.log - `action_raise_error(msg)`: Abort the current macro (and any calling macros) and write the given `msg` to the /tmp/printer pseudo-terminal. The first line of `msg` will be sent with a "!! " diff --git a/test/klippy/action_log.cfg b/test/klippy/action_log.cfg new file mode 100644 index 000000000..21ee33b69 --- /dev/null +++ b/test/klippy/action_log.cfg @@ -0,0 +1,81 @@ +[stepper_x] +step_pin: PF0 +dir_pin: PF1 +enable_pin: !PD7 +microsteps: 16 +rotation_distance: 40 +endstop_pin: ^PE5 +position_endstop: 0 +position_max: 200 +homing_speed: 50 + +[stepper_y] +step_pin: PF6 +dir_pin: !PF7 +enable_pin: !PF2 +microsteps: 16 +rotation_distance: 40 +endstop_pin: ^PJ1 +position_endstop: 0 +position_max: 200 +homing_speed: 50 + +[stepper_z] +step_pin: PL3 +dir_pin: PL1 +enable_pin: !PK0 +microsteps: 16 +rotation_distance: 8 +endstop_pin: ^PD3 +position_endstop: 0.5 +position_max: 200 + +[extruder] +step_pin: PA4 +dir_pin: PA6 +enable_pin: !PA2 +microsteps: 16 +rotation_distance: 33.5 +nozzle_diameter: 0.500 +filament_diameter: 3.500 +heater_pin: PB4 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PK5 +control: pid +pid_Kp: 22.2 +pid_Ki: 1.08 +pid_Kd: 114 +min_temp: 0 +max_temp: 210 + +[temperature_fan my_temp_fan] +pin: PB5 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PK6 +target_temp: 65.0 +control: curve +points: + 50.0, 0.0 + 55.0, 0.5 + 60.0, 1.0 +smooth_readings: 100 +cooling_hysteresis: 5.0 +heating_hysteresis: 0.0 +min_temp: 0 +max_temp: 200 +min_speed: 0.0 +max_speed: 1.0 + +[mcu] +serial: /dev/ttyACM0 + +[printer] +kinematics: cartesian +max_velocity: 300 +max_accel: 3000 +max_z_velocity: 5 +max_z_accel: 100 + +[gcode_macro ACTION_LOG] +gcode: + {action_log("TEST")} \ No newline at end of file diff --git a/test/klippy/action_log.test b/test/klippy/action_log.test new file mode 100644 index 000000000..f8f8d59a0 --- /dev/null +++ b/test/klippy/action_log.test @@ -0,0 +1,5 @@ +# Test case for action_log +CONFIG action_log.cfg +DICTIONARY atmega2560.dict + +ACTION_LOG From 936e3d047eaa7541c8e28db2ef4da97fbb9f3935 Mon Sep 17 00:00:00 2001 From: Rogerio Goncalves Date: Tue, 17 Sep 2024 17:32:06 +0100 Subject: [PATCH 5/5] Revert "smart_effector: Define get_position_endstop() wrapper" This reverts commit 82b779a476cd6bf550d6bde53c4544e141f2318e. --- klippy/extras/smart_effector.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/klippy/extras/smart_effector.py b/klippy/extras/smart_effector.py index 043cab17c..cf7ee1307 100644 --- a/klippy/extras/smart_effector.py +++ b/klippy/extras/smart_effector.py @@ -69,13 +69,6 @@ def __init__(self, config): self.query_endstop = self.probe_wrapper.query_endstop self.multi_probe_begin = self.probe_wrapper.multi_probe_begin self.multi_probe_end = self.probe_wrapper.multi_probe_end - self.get_position_endstop = self.probe_wrapper.get_position_endstop - # Common probe implementation helpers - self.cmd_helper = probe.ProbeCommandHelper( - config, self, self.probe_wrapper.query_endstop - ) - self.probe_offsets = probe.ProbeOffsetsHelper(config) - self.probe_session = probe.ProbeSessionHelper(config, self) # SmartEffector control control_pin = config.get("control_pin", None) if control_pin: