X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/be1908f8097dbbc871bfd7c55432de43d25647b7..HEAD:/Model/src/pump.cpp diff --git a/Model/src/pump.cpp b/Model/src/pump.cpp index 679866f..7332c91 100644 --- a/Model/src/pump.cpp +++ b/Model/src/pump.cpp @@ -14,10 +14,14 @@ Pump::Pump(const std::string &_name):Source(_name),Control(_name) input = new ByPass(); output = new ByPass(); ((ByPass *)output)->set_control(this); + /* El color de la bomba siempre esta actualizado */ + color_updated = true; } Pump::~Pump() { + delete input; + delete output; } void Pump::update(int dir) @@ -40,6 +44,7 @@ void Pump::simulate() std::cout << ((active && open)?" (funcionando)":" (apagada)") << std::endl; #endif updated = false; + color_updated = true; } bool Pump::get_output() @@ -60,6 +65,10 @@ void Pump::recieve_msg(int msg, IConector *who, void *data) if (tmp < actual_flow) actual_flow = tmp; } break; + case MSG_RESPONSE_COLOR: + /* Por las dudas, la bomba no debe cambiar de color */ + ; + break; default: Source::recieve_msg(msg, who, data); }