X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/f031c89fa8a00ea12ff7290569ec507f44402458..0bf4e9e2336a15ee267bd39b6ac325326fb10d9d:/Model/src/pump.cpp?ds=inline diff --git a/Model/src/pump.cpp b/Model/src/pump.cpp index 78d4dcd..7f1ace4 100644 --- a/Model/src/pump.cpp +++ b/Model/src/pump.cpp @@ -11,6 +11,9 @@ Pump::Pump(const std::string &_name):Source(_name),Control(_name) active = true; open = true; max_flow = actual_flow = 0.0f; + input = new ByPass(); + output = new ByPass(); + ((ByPass *)output)->set_control(this); } Pump::~Pump() @@ -20,6 +23,8 @@ 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