feat: add reset method
This commit is contained in:
parent
e18d1fb7a0
commit
c487ce3072
@ -139,6 +139,7 @@ class A1Motor(MotorInstance):
|
||||
def temp(self):
|
||||
return self.motor_data.temp
|
||||
|
||||
@override
|
||||
@timeit
|
||||
def reset(self):
|
||||
self.init_motor_cmd()
|
||||
|
@ -12,3 +12,6 @@ class MotorInstance(object):
|
||||
|
||||
def sendrecv(self, cmd: MotorCmd) -> MotorData:
|
||||
pass
|
||||
|
||||
def reset(self):
|
||||
pass
|
||||
|
@ -57,6 +57,7 @@ class MotorManager(object):
|
||||
|
||||
def register_motor(self, motor: MotorInstance):
|
||||
self.motor_dict[motor.get_motor_name()] = motor
|
||||
motor.reset()
|
||||
return motor.get_motor_name()
|
||||
|
||||
def get_motor(self, motor_name: str) -> MotorInstance:
|
||||
|
Loading…
x
Reference in New Issue
Block a user