Examples of MBrickServo


Examples of org.openhab.binding.tinkerforge.internal.model.MBrickServo

   *
   * @generated NOT
   */
  @Override
  public void enable() {
    MBrickServo brick = getMbrick();
    if (brick == null) {
      logger.error("No servo brick configured for servo: " + uid);
    } else {
      if (tfConfig != null) {
        logger.debug("found tfConfig");
        if (tfConfig.getVelocity() != 0) setVelocity(tfConfig.getVelocity()); // TODO check for
                                                                              // unset
        // state
        if (tfConfig.getAcceleration() != 0) setAcceleration(tfConfig.getAcceleration());
        if (tfConfig.getPeriod() != 0) setPeriod(tfConfig.getPeriod());
        if (tfConfig.getPulseWidthMax() != 0 && tfConfig.getPulseWidthMin() != 0) {
          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);
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.model.MBrickServo

        getMbrick().getTinkerforgeDevice().setPosition(servoNum, OFF_POSITION);
      } else if (state == OnOffValue.ON) {
        logger.debug("setSwitchState off");

        setServoDestinationPosition(ON_POSITION);
        MBrickServo mbrick = getMbrick();
        mbrick.getTinkerforgeDevice().setPosition(servoNum, ON_POSITION);
      } else {
        logger.error("{} unkown switchstate {}", LoggerConstants.TFMODELUPDATE, state);
      }
      switchState = state == null ? OnOffValue.UNDEF : state;
      setSwitchState(switchState);
View Full Code Here

Examples of org.openhab.binding.tinkerforge.internal.model.MBrickServo

        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case ModelPackage.MBRICK_SERVO:
      {
        MBrickServo mBrickServo = (MBrickServo)theEObject;
        T result = caseMBrickServo(mBrickServo);
        if (result == null) result = caseMDevice(mBrickServo);
        if (result == null) result = caseMSubDeviceHolder(mBrickServo);
        if (result == null) result = caseMBaseDevice(mBrickServo);
        if (result == null) result = defaultCase(theEObject);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.