Skip to content

Commit

Permalink
Merge pull request apollo-ng#23 from davelloper/master
Browse files Browse the repository at this point in the history
unary operation made safe in error handler for Thermocouple
  • Loading branch information
chron0 authored Sep 15, 2017
2 parents c205365 + 9ca2842 commit c6b5ca1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/max31855.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def checkErrors(self, data_32 = None):
if data_32 is None:
data_32 = self.data
anyErrors = (data_32 & 0x10000) != 0 # Fault bit, D16
noConnection = (data_32 & 1) != 0 # OC bit, D0
shortToGround = (data_32 & 2) != 0 # SCG bit, D1
shortToVCC = (data_32 & 4) != 0 # SCV bit, D2
noConnection = (data_32 & 0x00000001) != 0 # OC bit, D0
shortToGround = (data_32 & 0x00000002) != 0 # SCG bit, D1
shortToVCC = (data_32 & 0x00000004) != 0 # SCV bit, D2
if anyErrors:
if noConnection:
raise MAX31855Error("No Connection")
Expand Down

0 comments on commit c6b5ca1

Please sign in to comment.