Package com.tinkerforge

Examples of com.tinkerforge.BrickServo


   * <!-- end-user-doc -->
   * @generated
   */
  public void setTinkerforgeDevice(BrickServo newTinkerforgeDevice)
  {
    BrickServo oldTinkerforgeDevice = tinkerforgeDevice;
    tinkerforgeDevice = newTinkerforgeDevice;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICK_SERVO__TINKERFORGE_DEVICE, oldTinkerforgeDevice, tinkerforgeDevice));
  }
View Full Code Here


   * @generated NOT
   */
  @Override
  public void enable() {
    logger.debug("enable called on MBrickServoImpl");
      tinkerforgeDevice = new BrickServo(getUid(), getIpConnection());
  }
View Full Code Here

          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);
View Full Code Here

TOP

Related Classes of com.tinkerforge.BrickServo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.