// variables - must be declared globally!
//char outTemp_newValue[6];
//boolean outTemp_parseNewValue;
//char outHum_newValue[4];
//boolean outHum_parseNewValue;

void outTempHum_updateOnNewValue() {
  if(outTemp_parseNewValue) outTemp_update();
  if(outHum_parseNewValue) outHum_update();
}

void outTemp_update() {
  outTemp = atof(outTemp_newValue);
  outTempHumLastUpdate = millis();

  char buf[40];
  sprintf(buf, "MQTT: received OUTTemp=%2.1f", outTemp);
  sendLog(buf, LOGLEVEL_INFO);
  //Serial.print("outTemp=");
  //Serial.println(outTemp);
  outTemp_parseNewValue = false;
}

void outHum_update() {
  outHum = atoi(outHum_newValue);
  outTempHumLastUpdate = millis();
  char buf[40];
  sprintf(buf, "MQTT: received OUTHum=%u", outHum);
  sendLog(buf, LOGLEVEL_INFO);
  //Serial.print("outHum=");
  //Serial.println(outHum);
  outHum_parseNewValue = false;
}
