X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/b3b888e4ef034ddc35249ba97ea68ea3fb755ab2..c89fed66c4fa3004270e84562e62b796f1208293:/Model/src/pump.cpp diff --git a/Model/src/pump.cpp b/Model/src/pump.cpp index d42bc58..7332c91 100644 --- a/Model/src/pump.cpp +++ b/Model/src/pump.cpp @@ -14,6 +14,8 @@ 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() @@ -42,6 +44,7 @@ void Pump::simulate() std::cout << ((active && open)?" (funcionando)":" (apagada)") << std::endl; #endif updated = false; + color_updated = true; } bool Pump::get_output() @@ -62,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); }