mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	Minor changes
This commit is contained in:
		| @@ -738,9 +738,10 @@ class MCP3xxx(AnalogInputDevice): | |||||||
|         #     Rx   xxxxxxxx x0RRRRRR RRRRRRxx for the 3204/08 |         #     Rx   xxxxxxxx x0RRRRRR RRRRRRxx for the 3204/08 | ||||||
|         # |         # | ||||||
|         # The transmit bits start with 3 preamble bits "000" (to warm up), a |         # 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 |         # start bit "1" followed by the single/differential bit (M) which is 1 | ||||||
|         # read, and 0 for differential read, followed by 3-bits for the channel |         # for single-ended read, and 0 for differential read, followed by | ||||||
|         # (C).  The remainder of the transmission are "don't care" bits (x). |         # 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 |         # 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 |         # 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 |         #     Rx   xxxxxxxx x0SRRRRR RRRRRRRx | ||||||
|         # |         # | ||||||
|         # The transmit bits start with 3 preamble bits "000" (to warm up), a |         # 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 |         # start bit "1" followed by the single/differential bit (M) which is 1 | ||||||
|         # read, and 0 for differential read, followed by 3-bits for the channel |         # for single-ended read, and 0 for differential read, followed by | ||||||
|         # (C).  The remainder of the transmission are "don't care" bits (x). |         # 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 |         # 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 |         # don't care bits (x). These are followed by a null bit (0), then the | ||||||
|   | |||||||
| @@ -389,13 +389,13 @@ class PWMOutputDevice(OutputDevice): | |||||||
|         if fade_in_time > 0.0: |         if fade_in_time > 0.0: | ||||||
|             sequence += [ |             sequence += [ | ||||||
|                 (i * (1 / fps) / fade_in_time, 1 / fps) |                 (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)) |         sequence.append((1.0, on_time)) | ||||||
|         if fade_out_time > 0.0: |         if fade_out_time > 0.0: | ||||||
|             sequence += [ |             sequence += [ | ||||||
|                 (1 - (i * (1 / fps) / fade_out_time), 1 / fps) |                 (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)) |         sequence.append((0.0, off_time)) | ||||||
|         if not self.active_high: |         if not self.active_high: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user