Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated special channels in streaming.

  • Loading branch information...
commit 0a69701500f1d1f7ed5afe185ab19ffc890b8ded 1 parent 2cddc4a
authored April 13, 2011

Showing 2 changed files with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 2  src/u3.py
  2. 6  src/u6.py
2  src/u3.py
@@ -991,7 +991,7 @@ def processStreamData(self, result, numBytes = None):
991 991
                 
992 992
                 if self.streamChannelNumbers[self.streamPacketOffset] in (193, 194):
993 993
                     value = struct.unpack('<BB', sample )
994  
-                elif self.streamChannelNumbers[self.streamPacketOffset] in (200, 201, 210, 211, 224):
  994
+                elif self.streamChannelNumbers[self.streamPacketOffset] >= 200:
995 995
                     value = struct.unpack('<H', sample )[0]
996 996
                 else:  
997 997
                     if self.streamNegChannels[self.streamPacketOffset] != 31:
6  src/u6.py
@@ -665,9 +665,9 @@ def processStreamData(self, result, numBytes = None):
665 665
                 if j >= len(self.streamChannelNumbers):
666 666
                     j = 0
667 667
                 
668  
-                if self.streamChannelNumbers[j] == 193:
  668
+                if self.streamChannelNumbers[j] in (193, 194):
669 669
                     value = struct.unpack('<BB', sample )
670  
-                elif self.streamChannelNumbers[j] in (200, 201, 210, 211, 224):
  670
+                elif self.streamChannelNumbers[j] >= 200:
671 671
                     value = struct.unpack('<H', sample )[0]
672 672
                 else:                
673 673
                     if (self.streamChannelOptions[j] >> 7) == 1:
@@ -1172,8 +1172,6 @@ def binaryToCalibratedAnalogVoltage(self, gainIndex, bytesVoltage, is16Bits=Fals
1172 1172
             return (center - bits) * negSlope
1173 1173
         else:
1174 1174
             return (bits - center) * posSlope
1175  
-            
1176  
-            
1177 1175
     
1178 1176
     def binaryToCalibratedAnalogTemperature(self, bytesTemperature):
1179 1177
         voltage = self.binaryToCalibratedAnalogVoltage(0, bytesTemperature)

0 notes on commit 0a69701

Please sign in to comment.
Something went wrong with that request. Please try again.