use of com.tinkerforge.BrickletOLED64x48 in project openhab1-addons by openhab.
the class MBrickletOLE64x48Impl method enable.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/
@Override
public void enable() {
if (tfConfig != null) {
if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("contrast"))) {
Short contrast = tfConfig.getContrast();
logger.debug("contrast {}", contrast);
setContrast(contrast);
}
if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("invert"))) {
boolean invert = tfConfig.isInvert();
logger.debug("invert {}", invert);
setInvert(invert);
}
}
try {
tinkerforgeDevice = new BrickletOLED64x48(getUid(), getIpConnection());
tinkerforgeDevice.setDisplayConfiguration(getContrast(), isInvert());
} catch (TimeoutException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_TIMEOUT_EXCEPTION, e);
} catch (NotConnectedException e) {
TinkerforgeErrorHandler.handleError(this, TinkerforgeErrorHandler.TF_NOT_CONNECTION_EXCEPTION, e);
}
}
use of com.tinkerforge.BrickletOLED64x48 in project openhab1-addons by openhab.
the class MBrickletOLE64x48Impl method setTinkerforgeDevice.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setTinkerforgeDevice(BrickletOLED64x48 newTinkerforgeDevice) {
BrickletOLED64x48 oldTinkerforgeDevice = tinkerforgeDevice;
tinkerforgeDevice = newTinkerforgeDevice;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ModelPackage.MBRICKLET_OLE6_4X48__TINKERFORGE_DEVICE, oldTinkerforgeDevice, tinkerforgeDevice));
}
}
Aggregations