fix formatting, run test
This commit is contained in:
		
				
					committed by
					
						 Kyle Brown
						Kyle Brown
					
				
			
			
				
	
			
			
			
						parent
						
							2096f1a950
						
					
				
				
					commit
					fb783c302c
				
			| @@ -107,6 +107,7 @@ class GPIOEncoder(BaseEncoder): | ||||
|         ) | ||||
|  | ||||
|         self._state = (self.pin_a.get_value(), self.pin_b.get_value()) | ||||
|  | ||||
|     def button_event(self): | ||||
|         if self.pin_button: | ||||
|             new_button_state = self.pin_button.get_value() | ||||
| @@ -115,6 +116,7 @@ class GPIOEncoder(BaseEncoder): | ||||
|                 if self.on_button_do is not None: | ||||
|                     self.on_button_do(self.get_state()) | ||||
|  | ||||
|  | ||||
| class EncoderPin: | ||||
|     def __init__(self, pin, button_type=False): | ||||
|         self.pin = pin | ||||
| @@ -232,8 +234,10 @@ class EncoderHandler(Module): | ||||
|                     new_encoder.on_move_do = lambda x, bound_idx=idx: self.on_move_do( | ||||
|                         keyboard, bound_idx, x | ||||
|                     ) | ||||
|                     new_encoder.on_button_do = lambda x, bound_idx=idx: self.on_button_do( | ||||
|                         keyboard, bound_idx, x | ||||
|                     new_encoder.on_button_do = ( | ||||
|                         lambda x, bound_idx=idx: self.on_button_do( | ||||
|                             keyboard, bound_idx, x | ||||
|                         ) | ||||
|                     ) | ||||
|                     self.encoders.append(new_encoder) | ||||
|                 except Exception as e: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user