thermferm/thermferm.c

changeset 569
9c69d43bfb06
parent 561
fcfc3dbe85fa
child 570
1e0192b295b9
equal deleted inserted replaced
568:eee0f52170e8 569:9c69d43bfb06
1 /***************************************************************************** 1 /*****************************************************************************
2 * Copyright (C) 2014-2018 2 * Copyright (C) 2014-2019
3 * 3 *
4 * Michiel Broek <mbroek at mbse dot eu> 4 * Michiel Broek <mbroek at mbse dot eu>
5 * 5 *
6 * This file is part of the mbsePi-apps 6 * This file is part of the mbsePi-apps
7 * 7 *
1626 /* 1626 /*
1627 * Set both PID's to their input values. 1627 * Set both PID's to their input values.
1628 */ 1628 */
1629 unit->PID_cool->Mode = unit->PID_heat->Mode = PID_MODE_NONE; 1629 unit->PID_cool->Mode = unit->PID_heat->Mode = PID_MODE_NONE;
1630 if (unit->mode == UNITMODE_FRIDGE) { 1630 if (unit->mode == UNITMODE_FRIDGE) {
1631 unit->PID_cool->SetP = unit->fridge_set + unit->PID_cool->idleRange; 1631 unit->PID_cool->SetP = unit->fridge_set; // + unit->PID_cool->idleRange;
1632 unit->PID_heat->SetP = unit->fridge_set - unit->PID_heat->idleRange; 1632 unit->PID_heat->SetP = unit->fridge_set; // - unit->PID_heat->idleRange;
1633 unit->PID_cool->Input = unit->PID_heat->Input = unit->air_temperature / 1000.0; 1633 unit->PID_cool->Input = unit->PID_heat->Input = unit->air_temperature / 1000.0;
1634 unit->PID_cool->Mode = unit->PID_heat->Mode = PID_MODE_BOO; 1634 unit->PID_cool->Mode = unit->PID_heat->Mode = PID_MODE_BOO;
1635 } else if (unit->mode == UNITMODE_BEER) { 1635 } else if (unit->mode == UNITMODE_BEER) {
1636 unit->PID_cool->SetP = unit->beer_set; 1636 unit->PID_cool->SetP = unit->beer_set;
1637 unit->PID_heat->SetP = unit->beer_set; 1637 unit->PID_heat->SetP = unit->beer_set;

mercurial