From 02f803ea8478c9040c2715d36450b1f182da213b Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 2 Dec 2013 16:16:22 -0800 Subject: [PATCH] Documentation fixes. --- pyad2/ad2.py | 18 ++++++++++++++---- pyad2/devices.py | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pyad2/ad2.py b/pyad2/ad2.py index 8008f2e..865ad38 100644 --- a/pyad2/ad2.py +++ b/pyad2/ad2.py @@ -257,10 +257,6 @@ class AD2(object): :param baudrate: The baudrate used for the device. :type baudrate: int - :param interface: The interface used for the device. - :type interface: varies depends on device type.. FIXME - :param index: Interface index.. can probably remove. FIXME - :type index: int :param no_reader_thread: Specifies whether or not the automatic reader thread should be started or not :type no_reader_thread: bool """ @@ -278,6 +274,12 @@ class AD2(object): self._device = None def send(self, data): + """ + Sends data to the AD2 device. + + :param data: The data to send. + :type data: str + """ if self._device: self._device.write(data) @@ -404,6 +406,14 @@ class AD2(object): return msg def _handle_rfx(self, data): + """ + Handle RF messages. + + :param data: RF message to parse. + :type data: str + + :returns: An object representing the RF message. + """ msg = RFMessage(data) self.on_rfx_message(msg) diff --git a/pyad2/devices.py b/pyad2/devices.py index 31c6870..d00ba5e 100644 --- a/pyad2/devices.py +++ b/pyad2/devices.py @@ -223,7 +223,7 @@ class USBDevice(Device): """ Constructor - :param interface: Tuple containing the device number and endpoint number to use. + :param interface: Tuple containing the serial number and endpoint number to use. :type interface: tuple """ Device.__init__(self) @@ -629,7 +629,7 @@ class SocketDevice(Device): """ Sets the interface used to connect to the device. - :param value: Tuple containing the device number and endpoint number to use. + :param value: Tuple containing the host and port to use. :type value: tuple """ self._host = value[0]