Cell voltages fork (SoC)
Dependencies: CUER_CAN CUER_DS1820 LTC2943 LTC6804 mbed PowerControl
Diff: Temperature.cpp
- Revision:
- 38:b1f5bfe38d70
- Parent:
- 21:d461d58e70fc
- Child:
- 66:c884fba9eaea
--- a/Temperature.cpp Sat Jul 22 10:45:41 2017 +0000 +++ b/Temperature.cpp Sat Jul 22 11:11:53 2017 +0000 @@ -4,6 +4,7 @@ * Currently tested using DS18S20 1-Wire Thermometers in an array, parasite power yet to be tested */ #include "Temperature.h" +#define DEBUG 0 DS1820* probe[MAX_PROBES]; int devices_found; @@ -30,14 +31,16 @@ devices_found++; if (devices_found==0) - printf("No devices found"); + if (DEBUG) printf("No devices found"); else { - printf("\n%d device(s) found!\r\n\n" ,devices_found); + if (DEBUG) printf("\n%d device(s) found!\r\n\n" ,devices_found); for (int i=0; i<devices_found; i++) { - printf("Device %d address is: \r\n", i+1); + if (DEBUG) printf("Device %d address is: \r\n", i+1); for(address_byte_count=0; address_byte_count<8; address_byte_count++) { - printf("0x%02x", probe[i]->ROM[address_byte_count]); - if(address_byte_count == 7) printf("\r\n\n"); + if (DEBUG) printf("0x%02x", probe[i]->ROM[address_byte_count]); + if(address_byte_count == 7) { + if (DEBUG) printf("\r\n\n"); + } else printf(", "); } }