X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/bed1e8f7b596cf1aa73c25b8b39dcffe145fa018..bd2c5ebb465f2265d618feefb66479e5259dcfaa:/Model/src/tank.cpp?ds=sidebyside diff --git a/Model/src/tank.cpp b/Model/src/tank.cpp index 3f2fe43..4abbc6b 100644 --- a/Model/src/tank.cpp +++ b/Model/src/tank.cpp @@ -1,16 +1,23 @@ #include "tank.h" #include +#include "condition.h" using namespace PlaQui::Model; Tank::Tank(const std::string &_name):Source(_name),Drain(_name),Control(_name) { litros = 0.0f; + + /* Utilizo en input como el flotante de arriba y el output como el de abajo */ + input = new Condition(Condition::GT, 0.9, this); + output = new Condition(Condition::LT, 0.1, this); } Tank::~Tank() { + delete input; + delete output; } bool Tank::get_output()