itersolve: Remove unused gen_steps()

Eliminate the old gen_steps() call now that all callers have been
converted to the newer trapq based generate_steps().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-10-29 12:23:19 -04:00
parent bd3c8920f6
commit 797dcfcb12
5 changed files with 1 additions and 22 deletions

View File

@ -44,7 +44,6 @@ defs_stepcompress = """
"""
defs_itersolve = """
int32_t itersolve_gen_steps(struct stepper_kinematics *sk, struct move *m);
int32_t itersolve_generate_steps(struct stepper_kinematics *sk
, double flush_time);
double itersolve_check_active(struct stepper_kinematics *sk

View File

@ -8,7 +8,7 @@
#include <stddef.h> // offsetof
#include <string.h> // memset
#include "compiler.h" // __visible
#include "itersolve.h" // itersolve_gen_steps
#include "itersolve.h" // itersolve_generate_steps
#include "pyhelper.h" // errorf
#include "stepcompress.h" // queue_append_start
#include "trapq.h" // struct move
@ -128,14 +128,6 @@ itersolve_gen_steps_range(struct stepper_kinematics *sk, struct move *m
return 0;
}
// Generate step times for a move
int32_t __visible
itersolve_gen_steps(struct stepper_kinematics *sk, struct move *m)
{
return itersolve_gen_steps_range(sk, m, m->print_time
, m->print_time + m->move_t);
}
// Check if a move is likely to cause movement on a stepper
static inline int
check_active(struct stepper_kinematics *sk, struct move *m)

View File

@ -24,7 +24,6 @@ struct stepper_kinematics {
sk_post_callback post_cb;
};
int32_t itersolve_gen_steps(struct stepper_kinematics *sk, struct move *m);
int32_t itersolve_generate_steps(struct stepper_kinematics *sk
, double flush_time);
double itersolve_check_active(struct stepper_kinematics *sk, double flush_time);

View File

@ -27,7 +27,6 @@ class MCU_stepper:
self._ffi_lib.stepcompress_free)
self._mcu.register_stepqueue(self._stepqueue)
self._stepper_kinematics = None
self._itersolve_gen_steps = self._ffi_lib.itersolve_gen_steps
self._itersolve_generate_steps = self._ffi_lib.itersolve_generate_steps
self._itersolve_check_active = self._ffi_lib.itersolve_check_active
self._trapq = ffi_main.NULL
@ -116,10 +115,6 @@ class MCU_stepper:
mcu_pos_dist = -mcu_pos_dist
self._ffi_lib.itersolve_set_commanded_pos(
self._stepper_kinematics, mcu_pos_dist - self._mcu_position_offset)
def step_itersolve(self, cmove):
ret = self._itersolve_gen_steps(self._stepper_kinematics, cmove)
if ret:
raise error("Internal error in stepcompress")
def set_trapq(self, tq):
if tq is None:
ffi_main, self._ffi_lib = chelper.get_ffi()

View File

@ -76,7 +76,6 @@ class PrinterStepper:
force_move = printer.try_load_module(config, 'force_move')
force_move.register_stepper(self)
# Wrappers
self.step_itersolve = mcu_stepper.step_itersolve
self.setup_itersolve = mcu_stepper.setup_itersolve
self.generate_steps = mcu_stepper.generate_steps
self.set_trapq = mcu_stepper.set_trapq
@ -133,7 +132,6 @@ class PrinterRail:
stepper = PrinterStepper(config)
self.steppers = [stepper]
self.name = stepper.get_name(short=True)
self.step_itersolve = stepper.step_itersolve
self.get_commanded_position = stepper.get_commanded_position
self.is_motor_enabled = stepper.is_motor_enabled
# Primary endstop and its position
@ -199,7 +197,6 @@ class PrinterRail:
def add_extra_stepper(self, config):
stepper = PrinterStepper(config)
self.steppers.append(stepper)
self.step_itersolve = self.step_multi_itersolve
mcu_endstop = self.endstops[0][0]
endstop_pin = config.get('endstop_pin', None)
if endstop_pin is not None:
@ -214,9 +211,6 @@ class PrinterRail:
def add_to_endstop(self, mcu_endstop):
for stepper in self.steppers:
stepper.add_to_endstop(mcu_endstop)
def step_multi_itersolve(self, cmove):
for stepper in self.steppers:
stepper.step_itersolve(cmove)
def setup_itersolve(self, alloc_func, *params):
for stepper in self.steppers:
stepper.setup_itersolve(alloc_func, *params)