Compare commits
1 Commits
8e684203a8
...
b7c40b0ddc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7c40b0ddc |
@@ -1121,15 +1121,17 @@ class MachineGroup {
|
|||||||
this.logger.debug(this.machines[machineId].state);
|
this.logger.debug(this.machines[machineId].state);
|
||||||
const currentState = this.machines[machineId].state.getCurrentState();
|
const currentState = this.machines[machineId].state.getCurrentState();
|
||||||
|
|
||||||
if (flow <= 0 && (currentState === "operational" || currentState === "accelerating" || currentState === "decelerating")) {
|
// Same dispatch shape as optimalControl — see the comment
|
||||||
await machine.handleInput("parent", "execsequence", "shutdown");
|
// there for the rationale. flowmovement BEFORE startup so
|
||||||
}
|
// concurrent retargets can update delayedMove without a
|
||||||
else if (currentState === "idle" && flow > 0) {
|
// stale chained flowmovement overwriting it after startup.
|
||||||
|
if (flow > 0) {
|
||||||
|
await machine.handleInput("parent", "flowmovement", this._canonicalToOutputFlow(flow));
|
||||||
|
if (currentState === "idle") {
|
||||||
await machine.handleInput("parent", "execsequence", "startup");
|
await machine.handleInput("parent", "execsequence", "startup");
|
||||||
await machine.handleInput("parent", "flowmovement", this._canonicalToOutputFlow(flow));
|
|
||||||
}
|
}
|
||||||
else if (currentState === "operational" && flow > 0) {
|
} else if (currentState === "operational" || currentState === "accelerating" || currentState === "decelerating") {
|
||||||
await machine.handleInput("parent", "flowmovement", this._canonicalToOutputFlow(flow));
|
await machine.handleInput("parent", "execsequence", "shutdown");
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user