]> gitweb.maison.local Git - pyowl.git/commitdiff
TODO : why using a special cp210x driver ?
authorlionel <lionel@stargate.enneade.fdn.org>
Wed, 2 Sep 2015 14:01:26 +0000 (16:01 +0200)
committerlionel <lionel@stargate.enneade.fdn.org>
Wed, 2 Sep 2015 14:01:26 +0000 (16:01 +0200)
cm160Server.py

index 1de1cb153bde20cede6bef16de0b7148ae3f3503..53ad88b27de9af581a14b41fe6bb6b7dd447b255 100755 (executable)
@@ -370,13 +370,15 @@ class CM160:
   def openSerialPort(self):
     """Open a serial port with the required settings
        Returns the serialPort object or None if an error occured opening the serial port. """
-    #Ifthe serial port is open, close it
+    #If the serial port is open, close it
     if self.__ser != None:
        self.__ser.close()
        self.__ser = None
        
     self.__ser = None
     try:
+    # WHY : why must we use a custom cp210x driver ? why can't we just specify the baud rate here ?
+    # self.__ser = serial.Serial(self.__serialPortName, 250000, bytesize=8, parity='N', stopbits=1, xonxoff=False, rtscts=False, dsrdtr = False, timeout=30)
       #Assume we have the custom cp210x driver loaded that maps the requested baud rate of 0 to a physical port speed of 250000 Bps required 
       #for the CM160 device.
       self.__ser = serial.Serial(self.__serialPortName, 0, bytesize=8, parity='N', stopbits=1, xonxoff=False, rtscts=False, dsrdtr = False, timeout=30)