[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -128,13 +128,13 @@ NUM_WRITE_RETRY = 20
|
|||||||
def convert_ticks_to_degrees(ticks, model):
|
def convert_ticks_to_degrees(ticks, model):
|
||||||
resolutions = MODEL_RESOLUTION[model]
|
resolutions = MODEL_RESOLUTION[model]
|
||||||
# Convert the ticks to degrees
|
# Convert the ticks to degrees
|
||||||
return ticks * (360.0/resolutions)
|
return ticks * (360.0 / resolutions)
|
||||||
|
|
||||||
|
|
||||||
def convert_degrees_to_ticks(degrees, model):
|
def convert_degrees_to_ticks(degrees, model):
|
||||||
resolutions = MODEL_RESOLUTION[model]
|
resolutions = MODEL_RESOLUTION[model]
|
||||||
# Convert degrees to motor ticks
|
# Convert degrees to motor ticks
|
||||||
return int(degrees * (resolutions/360.0))
|
return int(degrees * (resolutions / 360.0))
|
||||||
|
|
||||||
|
|
||||||
def adjusted_to_homing_ticks(
|
def adjusted_to_homing_ticks(
|
||||||
@@ -508,7 +508,6 @@ class FeetechMotorsBus:
|
|||||||
values = np.round(values).astype(np.int32)
|
values = np.round(values).astype(np.int32)
|
||||||
return values
|
return values
|
||||||
|
|
||||||
|
|
||||||
def read_with_motor_ids(self, motor_models, motor_ids, data_name, num_retry=NUM_READ_RETRY):
|
def read_with_motor_ids(self, motor_models, motor_ids, data_name, num_retry=NUM_READ_RETRY):
|
||||||
if self.mock:
|
if self.mock:
|
||||||
import tests.mock_scservo_sdk as scs
|
import tests.mock_scservo_sdk as scs
|
||||||
@@ -736,4 +735,3 @@ class FeetechMotorsBus:
|
|||||||
def __del__(self):
|
def __del__(self):
|
||||||
if getattr(self, "is_connected", False):
|
if getattr(self, "is_connected", False):
|
||||||
self.disconnect()
|
self.disconnect()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user