From d5226d1feeabe44f0bd0f912f25526fe967dc58a Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Sun, 31 Jan 2016 14:31:55 +0000 Subject: [PATCH] Minor changes --- gpiozero/input_devices.py | 14 ++++++++------ gpiozero/output_devices.py | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/gpiozero/input_devices.py b/gpiozero/input_devices.py index 7382a23..685e180 100644 --- a/gpiozero/input_devices.py +++ b/gpiozero/input_devices.py @@ -738,9 +738,10 @@ class MCP3xxx(AnalogInputDevice): # Rx xxxxxxxx x0RRRRRR RRRRRRxx for the 3204/08 # # The transmit bits start with 3 preamble bits "000" (to warm up), a - # start bit "1" followed by the mode bit(M) which is 1 for single-ended - # read, and 0 for differential read, followed by 3-bits for the channel - # (C). The remainder of the transmission are "don't care" bits (x). + # start bit "1" followed by the single/differential bit (M) which is 1 + # for single-ended read, and 0 for differential read, followed by + # 3-bits for the channel (C). The remainder of the transmission are + # "don't care" bits (x). # # The first byte received and the top 1 bit of the second byte are # don't care bits (x). These are followed by a null bit (0), and then @@ -771,9 +772,10 @@ class MCP33xx(MCP3xxx): # Rx xxxxxxxx x0SRRRRR RRRRRRRx # # The transmit bits start with 3 preamble bits "000" (to warm up), a - # start bit "1" followed by the mode bit(M) which is 1 for single-ended - # read, and 0 for differential read, followed by 3-bits for the channel - # (C). The remainder of the transmission are "don't care" bits (x). + # start bit "1" followed by the single/differential bit (M) which is 1 + # for single-ended read, and 0 for differential read, followed by + # 3-bits for the channel (C). The remainder of the transmission are + # "don't care" bits (x). # # The first byte received and the top 1 bit of the second byte are # don't care bits (x). These are followed by a null bit (0), then the diff --git a/gpiozero/output_devices.py b/gpiozero/output_devices.py index 9523a9f..70d9b1b 100644 --- a/gpiozero/output_devices.py +++ b/gpiozero/output_devices.py @@ -389,13 +389,13 @@ class PWMOutputDevice(OutputDevice): if fade_in_time > 0.0: sequence += [ (i * (1 / fps) / fade_in_time, 1 / fps) - for i in range(int(50 * fade_in_time)) + for i in range(int(fps * fade_in_time)) ] sequence.append((1.0, on_time)) if fade_out_time > 0.0: sequence += [ (1 - (i * (1 / fps) / fade_out_time), 1 / fps) - for i in range(int(50 * fade_out_time)) + for i in range(int(fps * fade_out_time)) ] sequence.append((0.0, off_time)) if not self.active_high: