MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / set_motor_limits

Method set_motor_limits

Software/C/GoPiGo3.cpp:270–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270int GoPiGo3::set_motor_limits(uint8_t port, uint8_t power, uint16_t dps){
271 spi_array_out[0] = Address;
272 spi_array_out[1] = GPGSPI_MESSAGE_SET_MOTOR_LIMITS;
273 spi_array_out[2] = port;
274 spi_array_out[3] = power;
275 spi_array_out[4] = ((dps >> 8) & 0xFF);
276 spi_array_out[5] = (dps & 0xFF);
277 return spi_transfer_array(6, spi_array_out, spi_array_in);
278}
279
280int GoPiGo3::get_motor_status(uint8_t port, uint8_t &state, int8_t &power, int32_t &position, int16_t &dps){
281 uint8_t msg_type;

Callers

nothing calls this directly

Calls 1

spi_transfer_arrayFunction · 0.85

Tested by

no test coverage detected