Skip to content

Commit 6dc5198

Browse files
committed
fix v4.1 bugs
1 parent 0cadf12 commit 6dc5198

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
bot_config = Config.get()
2424
bot = CoderBot.get_instance(
2525
motor_trim_factor=float(bot_config.get("move_motor_trim", 1.0)),
26-
encoder=bool(bot_config.get("encoder"))
26+
hw_version=bot_config.get("hw_version")
2727
)
2828

2929
def get_serial():

coderbot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ def exit(self):
152152
s.cancel()
153153

154154
@classmethod
155-
def get_instance(cls, motor_trim_factor=1.0, encoder=True, servo=False):
155+
def get_instance(cls, motor_trim_factor=1.0, hw_version="5", servo=False):
156156
if not cls.the_bot:
157-
cls.the_bot = CoderBot(motor_trim_factor=motor_trim_factor, encoder=encoder)
157+
cls.the_bot = CoderBot(motor_trim_factor=motor_trim_factor, hw_version=hw_version)
158158
return cls.the_bot
159159

160160
def move(self, speed=100, elapse=0, distance=0):

0 commit comments

Comments
 (0)