X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/70d2e24643727ab1ea48e1793d609d27b7d21fed..6f70c17ffefd6150b68ac0f64a8116e730437408:/Model/src/splitter.cpp?ds=sidebyside diff --git a/Model/src/splitter.cpp b/Model/src/splitter.cpp index bf59c0f..7afa150 100644 --- a/Model/src/splitter.cpp +++ b/Model/src/splitter.cpp @@ -46,6 +46,7 @@ void Splitter::recieve_msg(int msg, IConector *who, void *data) break; case MSG_RESPONSE_MAX_FLOW: { float max = *((float *)data); + std::cout << name << ":Split " << max << std::endl; if (pos == OUT) { if (max < actual_flow) actual_flow = max; if (max_flow < actual_flow) actual_flow = max_flow; @@ -65,7 +66,7 @@ void Splitter::update(int dir) // Si ya me actualice, no lo tengo que hacer de nuevo if (updated) return; // Seteo mi actualizar en true para evitar entrar de nuevo - // actual_flow = 99999; + actual_flow = 99999; updated = true; switch (dir) { case IN: @@ -82,8 +83,12 @@ void Splitter::simulate() return; } + std::list::iterator i = in_list.begin(); + if (i != in_list.end()) { + PlantItem *o = (PlantItem *)(*i); + set_color( o->get_color() ); + } std::cout << name << "::Flujo actual = " << actual_flow << std::endl; updated = false; - actual_flow = 99999; }