//------------------------------------------------------------------------------
// CSimpleThermostatService::GetCurrentTemp
//------------------------------------------------------------------------------
HRESULT CSimpleThermostatService::GetCurrentTemp(
    LONG* plTempOut
    )
{
    //
    // Since this function does the same thing as get_currentTemp, just call
    // get_currentTemp.
    //
    return get_currentTemp( plTempOut );
}// CSimpleThermostatService::GetCurrentTemp
Esempio n. 2
0
char measure_humidity(unsigned int *p_value)
{ 
    unsigned error=0;
    unsigned int i;

    //send command to actual sensor
    //error+=sensor_write_byte(MEASURE); 
    //for (i=0;i<65535;i++) if(DATA==0) break; //wait until sensor has finished the measurement
    //if(DATA) error+=1;                // or timeout (~2 sec.) is reached
    //*((unsigned char*)p_value)  =sensor_read_byte(ACK);    //read the first byte (MSB)
    //*(((unsigned char*)p_value)+1)=sensor_read_byte(ACK);  */  //read the second byte (LSB)
    
    //Simulated Value
    *(p_value) = convertHumidityToADC_Val(get_sim_relativeHumidity(),
                                           get_currentTemp());   //read the ADC Value
    return error;
}