setPulseWidthMax(tfConfig.getPulseWidthMax());
setPulseWidthMin(tfConfig.getPulseWidthMin());
}
if (tfConfig.getOutputVoltage() != 0) setOutputVoltage(tfConfig.getOutputVoltage());
}
BrickServo tinkerBrickServo = brick.getTinkerforgeDevice();
try {
servoNum = Short.parseShort(String.valueOf(subId.charAt(subId.length() - 1)));
tinkerBrickServo.setVelocity(servoNum, velocity);
tinkerBrickServo.setAcceleration(servoNum, acceleration);
tinkerBrickServo.setPulseWidth(servoNum, pulseWidthMin, pulseWidthMax);
tinkerBrickServo.setPeriod(servoNum, period);
tinkerBrickServo.setOutputVoltage(outputVoltage);
tinkerBrickServo.addPositionReachedListener(new PositionReachedListener());
tinkerBrickServo.enable(servoNum);
fetchSwitchState();
} catch (NumberFormatException e) {
TinkerforgeErrorHandler.handleError(this, "can not determine servoNum", e);
} catch (TimeoutException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);