diff --git a/examples/vernie/android_remote.py b/examples/vernie/android_remote.py index 1ec4be4..dcc463e 100644 --- a/examples/vernie/android_remote.py +++ b/examples/vernie/android_remote.py @@ -85,7 +85,7 @@ try: sa = round(c + b / divider, 1) sb = round(c - b / divider, 1) logging.info("SpeedA=%s, SpeedB=%s", sa, sb) - robot.motor_AB.start_power(sa, sb) + robot.motor_AB.start_speed(sa, sb) # time.sleep(0.5) finally: robot.motor_AB.stop() diff --git a/pylgbst/peripherals.py b/pylgbst/peripherals.py index b0db421..cfa1cf7 100644 --- a/pylgbst/peripherals.py +++ b/pylgbst/peripherals.py @@ -240,8 +240,8 @@ class LEDRGB(Peripheral): class Motor(Peripheral): - SUBCMD_START_POWER = 0x01 - # SUBCMD_START_POWER = 0x02 + SUBCMD_START_POWER = 0x00 + SUBCMD_START_POWER_GROUPED = 0x03 SUBCMD_SET_ACC_TIME = 0x05 SUBCMD_SET_DEC_TIME = 0x06 SUBCMD_START_SPEED = 0x07 @@ -271,9 +271,6 @@ class Motor(Peripheral): return int(absolute) def _write_direct_mode(self, subcmd, params): - if self.virtual_ports: - subcmd += 1 # de-facto rule - params = pack("