first publish
Fork of MAX31855 by
Revision 2:b0c2b7f72cb9, committed 2014-11-10
- Comitter:
- mehatfie
- Date:
- Mon Nov 10 22:56:04 2014 +0000
- Parent:
- 1:5eeee89cb281
- Commit message:
- don''t know;
Changed in this revision
max31855.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/max31855.cpp Tue Oct 23 10:51:21 2012 +0000 +++ b/max31855.cpp Mon Nov 10 22:56:04 2014 +0000 @@ -36,10 +36,12 @@ //Set CS to stop transfer and restart conversion deselect(); + printf("%f\n", chipTemp); + //Check for a fault (last bit of transfer is fault bit) if ((tempProbeLow & 1)==1){ //Chip reports a fault, extract fault from Chip Temperature data - int faultType = (tempChipLow & 7); + int faultType = (tempChipLow & 0x07); faultCode=faultType; @@ -64,7 +66,7 @@ temp = (value*0.25); // Multiply the value by 0.25 to get temp in C or // * (9.0/5.0)) + 32.0; // Convert value to F (ensure proper floats!) - return temp; + return value; } }else{ //Chip not ready for reading