Пример #1
0
/**
 * Constructor
 * @param thermPins list with formatting of: [ temp busPin ; onewire index ; heating controlPin ; heating powerPin ]
 * NOTE: if a Pin value is not enabled pass -1 as the value for that pin.
 * @param stopTime The time at which the Thermostat should shut off, assuming it isn't otherwise interrupted
 * @param state Whether the Thermostat is ON (or OFF). True => ON, False => OFF
 * @param currentTask The unique identifier of the task that the Thermostat believes it should be processing
 * @param targetTemp The new target temperature in Celsius
 */
Ohmbrewer::Thermostat::Thermostat(std::list<int>* thermPins, int stopTime,
                                  bool state, String currentTask,
                                  const double targetTemp) : Ohmbrewer::Equipment(stopTime, state, currentTask) {
    initThermostat(thermPins);
    _targetTemp->fromC(targetTemp);
//    _timer = pidTime;
//    registerUpdateFunction();
}
Пример #2
0
void SoftReset() {
  BYTE ipl_backup = SRbits.IPL;
  SRbits.IPL = 7;  // disable interrupts
  log_printf("SoftReset()");
  TimersInit();
  PinsInit();
  PWMInit();
  ADCInit();
  UARTInit();
  SPIInit();
  I2CInit();
  InCapInit();

  // TODO: reset all peripherals!
  SRbits.IPL = ipl_backup;  // enable interrupts
  initThermostat(); //ANDROID THERMOSTAT MOD
}
Пример #3
0
/**
 * Constructor
 * @param thermPins list with formatting of: [ temp busPin ; onewire index ; heating controlPin ; heating powerPin ]
 * NOTE: if a Pin value is not enabled pass -1 as the value for that pin.
 * @param stopTime The time at which the Thermostat should shut off, assuming it isn't otherwise interrupted
 * @param state Whether the Thermostat is ON (or OFF). True => ON, False => OFF
 * @param currentTask The unique identifier of the task that the Thermostat believes it should be processing
 */
Ohmbrewer::Thermostat::Thermostat(std::list<int>* thermPins, int stopTime,
                                  bool state, String currentTask) : Ohmbrewer::Equipment(stopTime, state, currentTask) {
    initThermostat(thermPins);
//    _timer = pidTime;
//    registerUpdateFunction();
}
Пример #4
0
/**
 * Constructor
 * @param thermPins list with formatting of: [ temp busPin ; onewire index ; heating controlPin ; heating powerPin ]
 * NOTE: if a Pin value is not enabled pass -1 as the value for that pin.
 * @param targetTemp The new target temperature in Celsius
 */
Ohmbrewer::Thermostat::Thermostat(std::list<int>* thermPins, const double targetTemp) {
    initThermostat(thermPins);
    _targetTemp->fromC(targetTemp);
//    _timer = pidTime;
//    registerUpdateFunction();
}
Пример #5
0
/**
 * Constructor - creating a Thermostat will use up 3 equipment IDs
 * @param thermPins list with formatting of: [ temp busPin ; onewire index ; heating controlPin ; heating powerPin ]
 * NOTE: if a Pin value is not enabled pass -1 as the value for that pin.
 */
Ohmbrewer::Thermostat::Thermostat(std::list<int>* thermPins) {
    initThermostat(thermPins);
//    _timer = pidTime;
//    registerUpdateFunction();
}