From b93366277a23c0e234084d0bcb85b91a346d5b86 Mon Sep 17 00:00:00 2001 From: Zeanon Date: Mon, 16 Sep 2024 15:50:26 +0200 Subject: [PATCH] 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