Comparing version 0.1.15 to 0.1.16
{ | ||
"name": "soef", | ||
"version": "0.1.15", | ||
"version": "0.1.16", | ||
"description": "library for ioBroker", | ||
@@ -5,0 +5,0 @@ "author": { |
32
soef.js
@@ -1,2 +0,2 @@ | ||
/** | ||
/** | ||
tools for an ioBroker Adapter v0.0.0.1 | ||
@@ -1116,2 +1116,22 @@ | ||
function changeAdapterConfig (_adapter, changeCallback, doneCallback) { | ||
_adapter.getForeignObject("system.adapter." + _adapter.namespace, function (err, obj) { | ||
if (!err && obj && !obj.native) obj['native'] = {}; | ||
if (!err && obj && changeCallback(obj.native) !== false) { | ||
_adapter.setForeignObject(obj._id, obj, {}, function (err, s_obj) { | ||
_adapter.log.info("config changed"); | ||
//_adapter.config = obj.native; //?!? nrmalisieren fehlt dann!! | ||
//_adapter.normalizeConfig ... | ||
if (doneCallback) doneCallback(err, obj); | ||
}); | ||
} | ||
}); | ||
} | ||
exports.changeAdapterConfig = changeAdapterConfig; | ||
exports.changeConfig = function changeConfig(changeCallback, doneCallback) { | ||
if (!adapter) return false; | ||
return changeAdapterConfig(adapter, changeCallback, doneCallback) | ||
} | ||
//module.exports = function(useGlobalNamespace) { | ||
@@ -1236,6 +1256,8 @@ // if (useGlobalNamespace) { | ||
this.clear = function() { | ||
if (timer) clearTimeout(timer); | ||
var ret = !!timer; | ||
timer = null; | ||
return ret; | ||
if (timer) { | ||
clearTimeout(timer); | ||
timer = null; | ||
return true; | ||
} | ||
return false; | ||
} | ||
@@ -1242,0 +1264,0 @@ if (func) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46670
1247