@ -142,13 +142,13 @@ void updateOperationMode() {
//------------------------------------------------------------------------------
void updateRemoteTemp ( bool remote_temp_actual ) {
# if WEB_SUPPORT
char tmp_str [ 6 ] ;
char tmp_str [ 1 6] ;
if ( remote_temp_actual ) {
dtostrf ( _remote_temp . temp , 1 - sizeof ( tmp_str ) , 1 , tmp_str ) ;
dtostrf ( _remote_temp . temp , 1 , 1 , tmp_str ) ;
} else {
strcpy ( tmp_str , " \" ? \" " ) ;
}
char buffer [ 100 ] ;
char buffer [ 128 ] ;
snprintf_P ( buffer , sizeof ( buffer ) , PSTR ( " { \" thermostatVisible \" : 1, \" remoteTmp \" : %s} " ) , tmp_str ) ;
wsSend ( buffer ) ;
# endif
@ -387,8 +387,8 @@ void setThermostatState(bool state) {
//------------------------------------------------------------------------------
void debugPrintSwitch ( bool state , double temp ) {
char tmp_str [ 6 ] ;
dtostrf ( temp , 1 - sizeof ( tmp_str ) , 1 , tmp_str ) ;
char tmp_str [ 1 6] ;
dtostrf ( temp , 1 , 1 , tmp_str ) ;
DEBUG_MSG_P ( PSTR ( " [THERMOSTAT] switch %s, temp: %s, min: %d, max: %d, mode: %s, relay: %s, last switch %d \n " ) ,
state ? " ON " : " OFF " , tmp_str , _temp_range . min , _temp_range . max , _thermostat_mode_cooler ? " COOLER " : " HEATER " , relayStatus ( THERMOSTAT_RELAY ) ? " ON " : " OFF " , millis ( ) - _thermostat . last_switch ) ;
}
@ -486,8 +486,8 @@ double getLocalTemperature() {
for ( byte i = 0 ; i < magnitudeCount ( ) ; i + + ) {
if ( magnitudeType ( i ) = = MAGNITUDE_TEMPERATURE ) {
double temp = magnitudeValue ( i ) ;
char tmp_str [ 6 ] ;
dtostrf ( temp , 1 - sizeof ( tmp_str ) , 1 , tmp_str ) ;
char tmp_str [ 1 6] ;
dtostrf ( temp , 1 , 1 , tmp_str ) ;
DEBUG_MSG_P ( PSTR ( " [THERMOSTAT] getLocalTemperature temp: %s \n " ) , tmp_str ) ;
return temp > - 0.1 & & temp < 0.1 ? DBL_MIN : temp ;
}
@ -502,8 +502,8 @@ double getLocalHumidity() {
for ( byte i = 0 ; i < magnitudeCount ( ) ; i + + ) {
if ( magnitudeType ( i ) = = MAGNITUDE_HUMIDITY ) {
double hum = magnitudeValue ( i ) ;
char tmp_str [ 4 ] ;
dtostrf ( hum , 1 - sizeof ( tmp_str ) , 0 , tmp_str ) ;
char tmp_str [ 16 ] ;
dtostrf ( hum , 1 , 0 , tmp_str ) ;
DEBUG_MSG_P ( PSTR ( " [THERMOSTAT] getLocalHumidity hum: %s \ % \n " ) , tmp_str ) ;
return hum > - 0.1 & & hum < 0.1 ? DBL_MIN : hum ;
}