Compare commits
2 Commits
fix/valida
...
75d16c620a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75d16c620a | ||
|
|
024db5533a |
@@ -153,7 +153,7 @@
|
|||||||
100
|
100
|
||||||
],
|
],
|
||||||
"y": [
|
"y": [
|
||||||
52.14679487594751,
|
11.142207365162072,
|
||||||
20.746724065725342,
|
20.746724065725342,
|
||||||
31.960270693111905,
|
31.960270693111905,
|
||||||
45.6989826531509,
|
45.6989826531509,
|
||||||
@@ -411,7 +411,7 @@
|
|||||||
"y": [
|
"y": [
|
||||||
8.219999984177646,
|
8.219999984177646,
|
||||||
13.426327986363882,
|
13.426327986363882,
|
||||||
57.998168647814666,
|
25.971821741448165,
|
||||||
42.997354839160536,
|
42.997354839160536,
|
||||||
64.33911122026377
|
64.33911122026377
|
||||||
]
|
]
|
||||||
@@ -427,7 +427,7 @@
|
|||||||
"y": [
|
"y": [
|
||||||
8.219999984177646,
|
8.219999984177646,
|
||||||
13.426327986363882,
|
13.426327986363882,
|
||||||
53.35067019159144,
|
25.288156424842576,
|
||||||
42.48429874246399,
|
42.48429874246399,
|
||||||
64.03769740244357
|
64.03769740244357
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class ConfigManager {
|
|||||||
functionality: {
|
functionality: {
|
||||||
softwareType: nodeName.toLowerCase(),
|
softwareType: nodeName.toLowerCase(),
|
||||||
positionVsParent: uiConfig.positionVsParent || 'atEquipment',
|
positionVsParent: uiConfig.positionVsParent || 'atEquipment',
|
||||||
distance: uiConfig.hasDistance ? uiConfig.distance : undefined
|
distance: uiConfig.hasDistance ? uiConfig.distance : null
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
process: uiConfig.processOutputFormat || 'process',
|
process: uiConfig.processOutputFormat || 'process',
|
||||||
|
|||||||
@@ -91,6 +91,54 @@
|
|||||||
],
|
],
|
||||||
"description": "Defines the position of the measurement relative to its parent equipment or system."
|
"description": "Defines the position of the measurement relative to its parent equipment or system."
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"distance": {
|
||||||
|
"default": null,
|
||||||
|
"rules": {
|
||||||
|
"type": "number",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Optional spatial offset from the parent equipment reference. Populated from the editor when hasDistance is enabled; null otherwise."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"distanceUnit": {
|
||||||
|
"default": "m",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unit for the functionality.distance offset (e.g. 'm', 'cm')."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"distanceDescription": {
|
||||||
|
"default": "",
|
||||||
|
"rules": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Free-text description of what the distance offset represents (e.g. 'cable length from control panel to motor')."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"output": {
|
||||||
|
"process": {
|
||||||
|
"default": "process",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{ "value": "process", "description": "Delta-compressed process message (default)." },
|
||||||
|
{ "value": "json", "description": "Raw JSON payload." },
|
||||||
|
{ "value": "csv", "description": "CSV-formatted payload." }
|
||||||
|
],
|
||||||
|
"description": "Format of the process payload emitted on output port 0."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dbase": {
|
||||||
|
"default": "influxdb",
|
||||||
|
"rules": {
|
||||||
|
"type": "enum",
|
||||||
|
"values": [
|
||||||
|
{ "value": "influxdb", "description": "InfluxDB line-protocol payload (default)." },
|
||||||
|
{ "value": "json", "description": "Raw JSON payload." },
|
||||||
|
{ "value": "csv", "description": "CSV-formatted payload." }
|
||||||
|
],
|
||||||
|
"description": "Format of the telemetry payload emitted on output port 1."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"asset": {
|
"asset": {
|
||||||
|
|||||||
@@ -85,9 +85,23 @@ class state{
|
|||||||
this.emitter.emit("movementComplete", { position: targetPosition });
|
this.emitter.emit("movementComplete", { position: targetPosition });
|
||||||
await this.transitionToState("operational");
|
await this.transitionToState("operational");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// Abort path: return to 'operational' so a subsequent shutdown/emergency
|
||||||
|
// sequence can proceed. Without this, the FSM remains stuck in
|
||||||
|
// accelerating/decelerating and blocks stopping/idle transitions.
|
||||||
|
const msg = typeof error === 'string' ? error : error?.message;
|
||||||
|
if (msg === 'Transition aborted' || msg === 'Movement aborted') {
|
||||||
|
this.logger.debug(`Movement aborted; returning to 'operational' to unblock further transitions.`);
|
||||||
|
try {
|
||||||
|
await this.transitionToState("operational");
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.debug(`Post-abort transition to operational failed: ${e?.message || e}`);
|
||||||
|
}
|
||||||
|
this.emitter.emit("movementAborted", { position: targetPosition });
|
||||||
|
} else {
|
||||||
this.logger.error(error);
|
this.logger.error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// -------- State Transition Methods -------- //
|
// -------- State Transition Methods -------- //
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user