using namespace PlaQui::Model;
-Pump::Pump(const std::string &_name):Source(_name)
+Pump::Pump(const std::string &_name):Source(_name),Control(_name)
{
in_slots = 0;
out_slots = 1;
active = true;
open = true;
max_flow = actual_flow = 0.0f;
+ input = new ByPass();
+ output = new ByPass();
+ ((ByPass *)output)->set_control(this);
}
Pump::~Pump()
void Pump::update(int dir)
{
if (updated) return;
+ // Me fijo si me tengo que apagar automaticamente
+ open = input->get_output();
if (active && open)
actual_flow = max_flow;
else