reducing disconnected error
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user