code: func (g *Driver) GetMotorStatus(motor Motor) (flags uint8, power uint16, encoder, dps int, err error) {
  	message := GET_MOTOR_STATUS_RIGHT
  	if motor == MOTOR_LEFT {
  		message = GET_MOTOR_STATUS_LEFT
  	}
  	response, err := g.readBytes(goPiGo3Address, message, 12)
  	if err != nil {
  		return flags, power, encoder, dps, err
  	}
  	if err := g.responseValid(response); err != nil {
  		return flags, power, encoder, dps, err
  	}
  	// get flags
  	flags = uint8(response[4])
  	// get power
  	power = uint16(response[5])
  	if power&0x80 == 0x80 {
  		power = power - 0x100
  	}
  	// get encoder
  	enc := make([]byte, 4)
  	enc[3] = response[6]
  	enc[2] = response[7]
  	enc[1] = response[8]
  	enc[0] = response[9]
  	e := binary.LittleEndian.Uint32(enc)
  	if e&0x80000000 == 0x80000000 {
  		encoder = int(uint64(e) - 0x100000000)
  	}
  	encoder = int(e)
  	//get dps
  	d := make([]byte, 4)
  	d[1] = response[10]
  	d[0] = response[11]
  	ds := binary.LittleEndian.Uint32(d)
  	if ds&0x8000 == 0x8000 {
  		dps = int(ds - 0x10000)
  	}
  	dps = int(ds)
  	return flags, power, encoder / MOTOR_TICKS_PER_DEGREE, dps / MOTOR_TICKS_PER_DEGREE, nil
  }
docs: // GetMotorStatus returns the status for the given motor.