| 309 | } |
| 310 | |
| 311 | int GoPiGo3::offset_motor_encoder(uint8_t port, int32_t position){ |
| 312 | spi_array_out[0] = Address; |
| 313 | spi_array_out[1] = GPGSPI_MESSAGE_OFFSET_MOTOR_ENCODER; |
| 314 | spi_array_out[2] = port; |
| 315 | spi_array_out[3] = ((position >> 24) & 0xFF); |
| 316 | spi_array_out[4] = ((position >> 16) & 0xFF); |
| 317 | spi_array_out[5] = ((position >> 8) & 0xFF); |
| 318 | spi_array_out[6] = (position & 0xFF); |
| 319 | return spi_transfer_array(7, spi_array_out, spi_array_in); |
| 320 | } |
| 321 | |
| 322 | int32_t GoPiGo3::get_motor_encoder(uint8_t port){ |
| 323 | int32_t value; |
no test coverage detected