From a26bbe1e4435b4af442ec63399f46b11e9bd9cf6 Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Sat, 5 Oct 2024 04:57:52 -1000 Subject: [PATCH] Removed old/unused read_settings() interface --- FluidNC/src/Motors/Dynamixel2.cpp | 2 -- FluidNC/src/Motors/Dynamixel2.h | 1 - FluidNC/src/Motors/MotorDriver.h | 5 ----- FluidNC/src/Motors/RcServo.h | 3 ++- FluidNC/src/Motors/StandardStepper.cpp | 6 ------ FluidNC/src/Motors/StandardStepper.h | 1 - 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/FluidNC/src/Motors/Dynamixel2.cpp b/FluidNC/src/Motors/Dynamixel2.cpp index 33ffb77f1..769bbbecf 100644 --- a/FluidNC/src/Motors/Dynamixel2.cpp +++ b/FluidNC/src/Motors/Dynamixel2.cpp @@ -106,8 +106,6 @@ namespace MotorDrivers { return true; } - void Dynamixel2::read_settings() {} - // sets the PWM to zero. This allows most servos to be manually moved void IRAM_ATTR Dynamixel2::set_disable(bool disable) { if (_disabled == disable) { diff --git a/FluidNC/src/Motors/Dynamixel2.h b/FluidNC/src/Motors/Dynamixel2.h index 0a2b05b83..a45ba37e1 100644 --- a/FluidNC/src/Motors/Dynamixel2.h +++ b/FluidNC/src/Motors/Dynamixel2.h @@ -107,7 +107,6 @@ namespace MotorDrivers { // Overrides for inherited methods void init() override; - void read_settings() override; bool set_homing_mode(bool isHoming) override; void set_disable(bool disable) override; void update() override; diff --git a/FluidNC/src/Motors/MotorDriver.h b/FluidNC/src/Motors/MotorDriver.h index c62e03c24..2233e6077 100644 --- a/FluidNC/src/Motors/MotorDriver.h +++ b/FluidNC/src/Motors/MotorDriver.h @@ -48,11 +48,6 @@ namespace MotorDrivers { // the stallguard debugging problem. virtual void debug_message(); - // read_settings(), called from init(), re-establishes the motor - // setup from configurable arameters. - // TODO Architecture: Maybe this should be subsumed by init() - virtual void read_settings() {} - // set_homing_mode() is called from motors_set_homing_mode(), // which in turn is called at the beginning of a homing cycle // with isHoming true, and at the end with isHoming false. diff --git a/FluidNC/src/Motors/RcServo.h b/FluidNC/src/Motors/RcServo.h index 37aca7ca4..fb812f41a 100644 --- a/FluidNC/src/Motors/RcServo.h +++ b/FluidNC/src/Motors/RcServo.h @@ -41,9 +41,10 @@ namespace MotorDrivers { } } + void read_settings(); + // Overrides for inherited methods void init() override; - void read_settings() override; bool set_homing_mode(bool isHoming) override; void set_disable(bool disable) override; void update() override; diff --git a/FluidNC/src/Motors/StandardStepper.cpp b/FluidNC/src/Motors/StandardStepper.cpp index e66c9c961..520bcf989 100644 --- a/FluidNC/src/Motors/StandardStepper.cpp +++ b/FluidNC/src/Motors/StandardStepper.cpp @@ -19,11 +19,7 @@ using namespace Machine; namespace MotorDrivers { void StandardStepper::init() { - read_settings(); config_message(); - } - - void StandardStepper::read_settings() { init_step_dir_pins(); } @@ -41,8 +37,6 @@ namespace MotorDrivers { if (_step_pin.canStep()) { Stepping::assignMotor(axisIndex, dualAxisIndex, _step_pin.index(), _step_pin.inverted(), _dir_pin.index(), _dir_pin.inverted()); } - - auto dir_gpio = _step_pin.getNative(Pin::Capabilities::Output); } void StandardStepper::config_message() { diff --git a/FluidNC/src/Motors/StandardStepper.h b/FluidNC/src/Motors/StandardStepper.h index fb060f7ef..3f1e594d5 100644 --- a/FluidNC/src/Motors/StandardStepper.h +++ b/FluidNC/src/Motors/StandardStepper.h @@ -15,7 +15,6 @@ namespace MotorDrivers { // No special action, but return true to say homing is possible bool set_homing_mode(bool isHoming) override { return true; } void set_disable(bool) override; - void read_settings() override; void init_step_dir_pins();