Adds shutdown to ouput driver
This commit is contained in:
@@ -47,6 +47,8 @@ public:
|
|||||||
void activate_all_flipper_relays() const;
|
void activate_all_flipper_relays() const;
|
||||||
void deactivate_all_flipper_relays() const;
|
void deactivate_all_flipper_relays() const;
|
||||||
|
|
||||||
|
void shut_down_driver() const;
|
||||||
|
|
||||||
// todo driver board run for activate/deactivate?
|
// todo driver board run for activate/deactivate?
|
||||||
// todo what is flipper_relay ?
|
// todo what is flipper_relay ?
|
||||||
std::vector<std::shared_ptr<items::Lamp>> get_lamps() const;
|
std::vector<std::shared_ptr<items::Lamp>> get_lamps() const;
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ void FlippRServer::parse_server_config_file()
|
|||||||
|
|
||||||
void FlippRServer::uninitialize()
|
void FlippRServer::uninitialize()
|
||||||
{
|
{
|
||||||
this->output_driver->deactivate_all_lamps();
|
this->output_driver->shut_down_driver();
|
||||||
this->output_driver->deactivate_displays();
|
|
||||||
this->output_server->stop();
|
this->output_server->stop();
|
||||||
|
|
||||||
ServerApplication::uninitialize();
|
ServerApplication::uninitialize();
|
||||||
@@ -125,6 +124,7 @@ void FlippRServer::initialize(Application &self)
|
|||||||
|
|
||||||
this->input_server = std::unique_ptr<TCPServer>(this->build_input_server());
|
this->input_server = std::unique_ptr<TCPServer>(this->build_input_server());
|
||||||
//this->input_server->start();
|
//this->input_server->start();
|
||||||
|
logger().warning(FRED("Input server not started!"));
|
||||||
|
|
||||||
//https://gist.github.com/NIPE-SYSTEMS/5a06428c0880ed7ff3cc4304be436e3e
|
//https://gist.github.com/NIPE-SYSTEMS/5a06428c0880ed7ff3cc4304be436e3e
|
||||||
ServerApplication::initialize(self);
|
ServerApplication::initialize(self);
|
||||||
|
|||||||
@@ -153,6 +153,13 @@ boost::optional<std::shared_ptr<items::Display>> OutputDriver::get_display(uint8
|
|||||||
return this->displays.find(num)->second;
|
return this->displays.find(num)->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OutputDriver::shut_down_driver() const
|
||||||
|
{
|
||||||
|
this->deactivate_all_flipper_relays();
|
||||||
|
this->deactivate_all_lamps();
|
||||||
|
this->deactivate_displays();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
} /* namespace output */
|
} /* namespace output */
|
||||||
|
|||||||
Reference in New Issue
Block a user