Standardize softwareType to lowercase everywhere
- ConfigManager.buildConfig() now lowercases softwareType - Updated config JSON defaults to lowercase - childRegistrationUtils lowercases softwareType on extraction - Closes #8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"functionality": {
|
||||
"softwareType": {
|
||||
"default": "pumpingStation",
|
||||
"default": "pumpingstation",
|
||||
"rules": {
|
||||
"type": "string",
|
||||
"description": "Specified software type used to locate the proper default configuration."
|
||||
@@ -150,7 +150,7 @@
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"default": "pumpingStation",
|
||||
"default": "pumpingstation",
|
||||
"rules": {
|
||||
"type": "string",
|
||||
"description": "Specific asset type used to identify this configuration."
|
||||
|
||||
@@ -6,7 +6,7 @@ class ChildRegistrationUtils {
|
||||
}
|
||||
|
||||
async registerChild(child, positionVsParent, distance) {
|
||||
const { softwareType } = child.config.functionality;
|
||||
const softwareType = (child.config.functionality.softwareType || '').toLowerCase();
|
||||
const { name, id } = child.config.general;
|
||||
|
||||
this.logger.debug(`Registering child: ${name} (${id}) as ${softwareType} at ${positionVsParent}`);
|
||||
|
||||
@@ -295,7 +295,7 @@ class ValidationUtils {
|
||||
value.y = uniqueY;
|
||||
}
|
||||
// Validate that y values are numbers
|
||||
else if (!this.areNumbers(value.y)) {
|
||||
if (!this.areNumbers(value.y)) {
|
||||
this.logger.warn(`Dimension '${name}' key '${key}' has non-numeric y values. Ignoring this key.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user