input_shaper: Fix python3 string encoding

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-26 20:00:33 -04:00
parent b62171f350
commit 573fceefeb
1 changed files with 2 additions and 2 deletions

View File

@ -65,11 +65,11 @@ class AxisInputShaper:
def set_shaper_kinematics(self, sk): def set_shaper_kinematics(self, sk):
ffi_main, ffi_lib = chelper.get_ffi() ffi_main, ffi_lib = chelper.get_ffi()
success = ffi_lib.input_shaper_set_shaper_params( success = ffi_lib.input_shaper_set_shaper_params(
sk, bytes(self.axis), self.n, self.A, self.T) == 0 sk, self.axis.encode(), self.n, self.A, self.T) == 0
if not success: if not success:
self.disable_shaping() self.disable_shaping()
ffi_lib.input_shaper_set_shaper_params( ffi_lib.input_shaper_set_shaper_params(
sk, bytes(self.axis), self.n, self.A, self.T) sk, self.axis.encode(), self.n, self.A, self.T)
return success return success
def get_step_generation_window(self): def get_step_generation_window(self):
ffi_main, ffi_lib = chelper.get_ffi() ffi_main, ffi_lib = chelper.get_ffi()