Set the motor speed limit Keyword arguments: port -- The motor port(s). MOTOR_LEFT and/or MOTOR_RIGHT. power -- The power limit in percent (0 to 100), with 0 being no limit (100) dps -- The speed limit in degrees per second, with 0 being no limit
(self, port, power = 0, dps = 0)
| 491 | self.spi_transfer_array(outArray) |
| 492 | |
| 493 | def set_motor_limits(self, port, power = 0, dps = 0): |
| 494 | """ |
| 495 | Set the motor speed limit |
| 496 | |
| 497 | Keyword arguments: |
| 498 | port -- The motor port(s). MOTOR_LEFT and/or MOTOR_RIGHT. |
| 499 | power -- The power limit in percent (0 to 100), with 0 being no limit (100) |
| 500 | dps -- The speed limit in degrees per second, with 0 being no limit |
| 501 | """ |
| 502 | dps = int(dps * self.MOTOR_TICKS_PER_DEGREE) |
| 503 | outArray = [self.SPI_Address, self.SPI_MESSAGE_TYPE.SET_MOTOR_LIMITS, int(port), int(power),\ |
| 504 | ((dps >> 8) & 0xFF), (dps & 0xFF)] |
| 505 | self.spi_transfer_array(outArray) |
| 506 | |
| 507 | def get_motor_status(self, port): |
| 508 | """ |
no test coverage detected