Subversion Repositories HomeAutomation

Rev

Rev 578 | Rev 640 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 578 Rev 620
Line 91... Line 91...
91
#if defined(USE_DS18S20)
91
#if defined(USE_DS18S20)
92
        /* check temperature and send on CAN */
92
        /* check temperature and send on CAN */
93
        if( Timebase_PassedTimeMillis(timeStamp_DS) >= DS_SEND_PERIOD ){
93
        if( Timebase_PassedTimeMillis(timeStamp_DS) >= DS_SEND_PERIOD ){
94
            timeStamp_DS = Timebase_CurrentTime();
94
            timeStamp_DS = Timebase_CurrentTime();
95
 
95
 
-
 
96
/*          txMsg.Id = 0xffffffff;
-
 
97
            txMsg.DataLength = 0;
-
 
98
            BIOS_CanSend(&txMsg);
-
 
99
*/
96
            if ( DS18X20_start_meas( DS18X20_POWER_PARASITE, NULL ) == DS18X20_OK) {
100
            if ( DS18X20_start_meas( DS18X20_POWER_PARASITE, NULL ) == DS18X20_OK) {
97
                delay_ms(DS18B20_TCONV_12BIT);
101
                delay_ms(DS18B20_TCONV_12BIT);
98
                for ( i=0; i<nSensors; i++ ) {
102
                for ( i=0; i<nSensors; i++ ) {
99
                    if ( DS18X20_read_meas( &gSensorIDs[i][0], &subzero, &cel, &cel_frac_bits) == DS18X20_OK ) {
103
                    if ( DS18X20_read_meas( &gSensorIDs[i][0], &subzero, &cel, &cel_frac_bits) == DS18X20_OK ) {
100
 
104