reducing disconnected error

This commit is contained in:
2026-06-16 08:07:59 +02:00
parent 7f37ea0636
commit ea5ec56f2e
+3 -3
View File
@@ -11,8 +11,8 @@ Outlet::Outlet(int index, std::string inputRecordName,
this->index = index;
this->innerState = State::UNKNOWN;
this->wasOutputConnected = true;
this->wasInputConnected = true;
this->wasOutputConnected = false;
this->wasInputConnected = false;
this->gracePeriod = 3;
}
@@ -174,7 +174,7 @@ std::string Outlet::stateToString(State state) {
}
Outlet::State Outlet::_getCommand() {
if (this->isInputConnected())
if (!this->isInputConnected())
return this->lastCommand;
std::string value;
int returnCode = this->output.get(&value);