From 00cb1865780bec12ed500e8c2ac96036e1bca1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Thu, 18 Jul 2024 09:53:58 +0200 Subject: [PATCH] updated CI smoke tests --- .github/workflows/test.yml | 2 +- ci/smoke-test/klipper-smoketest.kconfig | 38 ++---------- ci/smoke-test/klippy-tests/simple.cfg | 82 ++++++++++++++++++++++++- ci/smoke-test/klippy-tests/simple.test | 2 +- 4 files changed, 85 insertions(+), 39 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f726d7..5f1cfd4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: - name: Install build dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential + sudo apt-get install -y build-essential gcc-avr avr-libc - name: Build klipper dict run: | pushd klipper diff --git a/ci/smoke-test/klipper-smoketest.kconfig b/ci/smoke-test/klipper-smoketest.kconfig index b37fbb0..42376d4 100644 --- a/ci/smoke-test/klipper-smoketest.kconfig +++ b/ci/smoke-test/klipper-smoketest.kconfig @@ -1,34 +1,4 @@ -CONFIG_LOW_LEVEL_OPTIONS=y -# CONFIG_MACH_AVR is not set -# CONFIG_MACH_ATSAM is not set -# CONFIG_MACH_ATSAMD is not set -# CONFIG_MACH_LPC176X is not set -# CONFIG_MACH_STM32 is not set -# CONFIG_MACH_HC32F460 is not set -# CONFIG_MACH_RP2040 is not set -# CONFIG_MACH_PRU is not set -# CONFIG_MACH_AR100 is not set -CONFIG_MACH_LINUX=y -# CONFIG_MACH_SIMU is not set -CONFIG_BOARD_DIRECTORY="linux" -CONFIG_CLOCK_FREQ=50000000 -CONFIG_LINUX_SELECT=y -CONFIG_USB_VENDOR_ID=0x1d50 -CONFIG_USB_DEVICE_ID=0x614e -CONFIG_USB_SERIAL_NUMBER="12345" -CONFIG_WANT_GPIO_BITBANGING=y -CONFIG_WANT_DISPLAYS=y -CONFIG_WANT_SENSORS=y -CONFIG_WANT_LIS2DW=y -CONFIG_WANT_LDC1612=y -CONFIG_WANT_SOFTWARE_I2C=y -CONFIG_WANT_SOFTWARE_SPI=y -CONFIG_NEED_SENSOR_BULK=y -CONFIG_CANBUS_FREQUENCY=1000000 -CONFIG_INITIAL_PINS="" -CONFIG_HAVE_GPIO=y -CONFIG_HAVE_GPIO_ADC=y -CONFIG_HAVE_GPIO_SPI=y -CONFIG_HAVE_GPIO_I2C=y -CONFIG_HAVE_GPIO_HARD_PWM=y -CONFIG_INLINE_STEPPER_HACK=y +# Base Kconfig file for atmega2560 +CONFIG_MACH_AVR=y +CONFIG_MACH_atmega2560=y +CONFIG_CLOCK_FREQ=16000000 diff --git a/ci/smoke-test/klippy-tests/simple.cfg b/ci/smoke-test/klippy-tests/simple.cfg index 8604aa1..80a194a 100644 --- a/ci/smoke-test/klippy-tests/simple.cfg +++ b/ci/smoke-test/klippy-tests/simple.cfg @@ -1,9 +1,85 @@ +# Test config with a minimal setup to have kind +# of a machine ready with an ADXL345 and an MPU9250 +# to have the required the resonance_tester section +# and allow loading and initializing Shake&Tune into Klipper + +[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 + +[heater_bed] +heater_pin: PH5 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PK6 +control: watermark +min_temp: 0 +max_temp: 110 + [mcu] -serial: /tmp/klipper_host_mcu +serial: /dev/ttyACM0 [printer] -kinematics: none +kinematics: cartesian max_velocity: 300 -max_accel: 300 +max_accel: 3000 +max_z_velocity: 5 +max_z_accel: 100 + +[adxl345] +cs_pin: PK7 +axes_map: -x,-y,z + +[mpu9250 my_mpu] + +[resonance_tester] +probe_points: 20,20,20 +accel_chip_x: adxl345 +accel_chip_y: mpu9250 my_mpu [shaketune] diff --git a/ci/smoke-test/klippy-tests/simple.test b/ci/smoke-test/klippy-tests/simple.test index 3de2790..1cc7e27 100644 --- a/ci/smoke-test/klippy-tests/simple.test +++ b/ci/smoke-test/klippy-tests/simple.test @@ -1,4 +1,4 @@ -DICTIONARY linux_basic.dict CONFIG simple.cfg +DICTIONARY atmega2560.dict G4 P1000