SSL multi-sensor
Diff: DS1820.cpp
- Revision:
- 9:3821ca0b7f14
- Parent:
- 8:d87e11e8d012
- Child:
- 10:d297ce9ce422
diff -r d87e11e8d012 -r 3821ca0b7f14 DS1820.cpp --- a/DS1820.cpp Tue Jul 08 18:55:54 2014 +0000 +++ b/DS1820.cpp Thu Jan 29 19:27:32 2015 +0000 @@ -6,8 +6,8 @@ DS1820::DS1820 (PinName data_pin, PinName power_pin, bool power_polarity) : _datapin(data_pin), _parasitepin(power_pin) { int byte_counter; _power_polarity = power_polarity; - if (power_pin != NC) - _power_mosfet = true; + + _power_mosfet = power_pin != NC; for(byte_counter=0;byte_counter<9;byte_counter++) RAM[byte_counter] = 0x00;