mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 09:21:12 +03:00
sensortemplate: Use SensorTemplate as class name in json
Replace TemplateItem with SensorTemplate in the sensortemplate.json and json ctest. Change to contributions.md which removes all objects with a key starting with "//" from the generated sensor .json file. This allows the json ctest to pass OOTB for new sensor libraries generated from the make_new_sensor function. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -68,11 +68,11 @@ function checkObjectSpecs(object, target) {
|
||||
var realKeyName = key.replace('// ', '');
|
||||
|
||||
/**
|
||||
* "TemplateItem" is a special case
|
||||
* For objects, the TemplateItem define
|
||||
* "SensorTemplate" is a special case
|
||||
* For objects, the SensorTemplate define
|
||||
* the specs for each of the items in the object
|
||||
*/
|
||||
if (realKeyName === 'TemplateItem') {
|
||||
if (realKeyName === 'SensorTemplate') {
|
||||
for (var key in target) {
|
||||
(function(key, target){
|
||||
/**
|
||||
@ -89,7 +89,7 @@ function checkObjectSpecs(object, target) {
|
||||
describe(key, function () {
|
||||
checkObjectSpecs(object, target);
|
||||
});
|
||||
})(object['TemplateItem'], target[key]);
|
||||
})(object['SensorTemplate'], target[key]);
|
||||
}
|
||||
})(key, target);
|
||||
}
|
||||
|
Reference in New Issue
Block a user