Use TransitionTo in Plugins

This commit is contained in:
Alexey Rybalchenko
2019-07-16 17:12:24 +02:00
committed by Dennis Klein
parent 857ef0c9d3
commit 8bb6a9518a
7 changed files with 75 additions and 88 deletions

View File

@@ -379,6 +379,10 @@ auto DDS::SubscribeForCustomCommands() -> void
fStateChangeSubscribers.erase(senderId);
}
fDDSCustomCmd.send("state-changes-unsubscription: " + id + ",OK", to_string(senderId));
} else if (cmd == "SHUTDOWN") {
TransitionDeviceStateTo(DeviceState::Exiting);
} else if (cmd == "STARTUP") {
TransitionDeviceStateTo(DeviceState::Ready);
} else {
LOG(warn) << "Unknown command: " << cmd;
LOG(warn) << "Origin: " << senderId;