From 5af489736084cad3060f7f5d78f3e27524abf9d4 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Tue, 7 Aug 2018 16:05:06 +0200 Subject: [PATCH] Fix compiler warning sketch/stepper.cpp:1553:6: warning: unused parameter 'driver' [-Wunused-parameter] --- Firmware/stepper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Firmware/stepper.cpp b/Firmware/stepper.cpp index 3bc3344b..cb4e680f 100644 --- a/Firmware/stepper.cpp +++ b/Firmware/stepper.cpp @@ -1549,15 +1549,16 @@ uint8_t SilentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT); - +#ifdef MOTOR_CURRENT_PWM_XY_PIN void st_current_set(uint8_t driver, int current) { - #ifdef MOTOR_CURRENT_PWM_XY_PIN if (driver == 0) analogWrite(MOTOR_CURRENT_PWM_XY_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); if (driver == 1) analogWrite(MOTOR_CURRENT_PWM_Z_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); if (driver == 2) analogWrite(MOTOR_CURRENT_PWM_E_PIN, (long)current * 255L / (long)MOTOR_CURRENT_PWM_RANGE); - #endif } +#else //MOTOR_CURRENT_PWM_XY_PIN +void st_current_set(uint8_t, int ){} +#endif //MOTOR_CURRENT_PWM_XY_PIN void microstep_init() {