Permalink
Browse files

Updated special channels in streaming.

  • Loading branch information...
1 parent 2cddc4a commit 0a69701500f1d1f7ed5afe185ab19ffc890b8ded labjack committed Apr 13, 2011
Showing with 3 additions and 5 deletions.
  1. +1 −1 src/u3.py
  2. +2 −4 src/u6.py
View
@@ -991,7 +991,7 @@ def processStreamData(self, result, numBytes = None):
if self.streamChannelNumbers[self.streamPacketOffset] in (193, 194):
value = struct.unpack('<BB', sample )
- elif self.streamChannelNumbers[self.streamPacketOffset] in (200, 201, 210, 211, 224):
+ elif self.streamChannelNumbers[self.streamPacketOffset] >= 200:
value = struct.unpack('<H', sample )[0]
else:
if self.streamNegChannels[self.streamPacketOffset] != 31:
View
@@ -665,9 +665,9 @@ def processStreamData(self, result, numBytes = None):
if j >= len(self.streamChannelNumbers):
j = 0
- if self.streamChannelNumbers[j] == 193:
+ if self.streamChannelNumbers[j] in (193, 194):
value = struct.unpack('<BB', sample )
- elif self.streamChannelNumbers[j] in (200, 201, 210, 211, 224):
+ elif self.streamChannelNumbers[j] >= 200:
value = struct.unpack('<H', sample )[0]
else:
if (self.streamChannelOptions[j] >> 7) == 1:
@@ -1172,8 +1172,6 @@ def binaryToCalibratedAnalogVoltage(self, gainIndex, bytesVoltage, is16Bits=Fals
return (center - bits) * negSlope
else:
return (bits - center) * posSlope
-
-
def binaryToCalibratedAnalogTemperature(self, bytesTemperature):
voltage = self.binaryToCalibratedAnalogVoltage(0, bytesTemperature)

0 comments on commit 0a69701

Please sign in to comment.