mirror of
				https://github.com/KevinMidboe/python-gpiozero.git
				synced 2025-10-29 17:50:37 +00:00 
			
		
		
		
	Fix #279
Permit replacement of pin_factory without closing old factory. However, continue closing devices associated with extant pin factory at script termination.
This commit is contained in:
		@@ -21,7 +21,7 @@ from gpiozero import *
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def teardown_function(function):
 | 
			
		||||
    Device._pin_factory.reset()
 | 
			
		||||
    Device.pin_factory.reset()
 | 
			
		||||
 | 
			
		||||
def clamp(v, min_value, max_value):
 | 
			
		||||
    return min(max_value, max(min_value, v))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user