fix logging
This commit is contained in:
		
							parent
							
								
									da255625c9
								
							
						
					
					
						commit
						2bd3645d90
					
				
					 2 changed files with 5 additions and 5 deletions
				
			
		
							
								
								
									
										6
									
								
								leds.py
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								leds.py
									
										
									
									
									
								
							|  | @ -23,7 +23,7 @@ this.color_state = 0 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def lightlevel(lcd, level): | def lightlevel(lcd, level): | ||||||
|     logging.debug("display level") |     logger.debug("display level") | ||||||
|     lcd.clear() |     lcd.clear() | ||||||
|     lcd.message("Light Level:\n]" + "-"*level + "[") |     lcd.message("Light Level:\n]" + "-"*level + "[") | ||||||
| 
 | 
 | ||||||
|  | @ -35,7 +35,7 @@ def query(): | ||||||
| def color(lcd): | def color(lcd): | ||||||
|     lcd.clear() |     lcd.clear() | ||||||
|     lcd.message("new pattern loaded.") |     lcd.message("new pattern loaded.") | ||||||
|     logging.debug("NYI") |     logger.debug("NYI") | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def get_state(): | def get_state(): | ||||||
|  | @ -66,7 +66,7 @@ def loop(): | ||||||
|     lights = light_manager.LightStrip() |     lights = light_manager.LightStrip() | ||||||
|     this.lights = lights |     this.lights = lights | ||||||
|     while True: |     while True: | ||||||
|         logging.debug("loop") |         logger.debug("loop") | ||||||
|         lights.tick() |         lights.tick() | ||||||
|         query() |         query() | ||||||
|         state = get_state() |         state = get_state() | ||||||
|  |  | ||||||
|  | @ -53,12 +53,12 @@ class LightStrip: | ||||||
|         for i in range(ind, n): |         for i in range(ind, n): | ||||||
|             col = self.cur_pattern[i] |             col = self.cur_pattern[i] | ||||||
|             self.cur_index = i |             self.cur_index = i | ||||||
|             logging.debug("TEST VALUES: np {} col {} same {}".format( |             logger.debug("TEST VALUES: np {} col {} same {}".format( | ||||||
|                 np[i], col, tuple(np[i]) != col)) |                 np[i], col, tuple(np[i]) != col)) | ||||||
|             if tuple(np[i]) != col: |             if tuple(np[i]) != col: | ||||||
|                 changes = changes + 1 |                 changes = changes + 1 | ||||||
|                 np[i] = col |                 np[i] = col | ||||||
|                 logging.debug( |                 logger.debug( | ||||||
|                     "CHANGE COLOR OF PIXEL {} TO {} ON TICK {}".format(i, col, t)) |                     "CHANGE COLOR OF PIXEL {} TO {} ON TICK {}".format(i, col, t)) | ||||||
|                 if changes >= self.max_changes: |                 if changes >= self.max_changes: | ||||||
|                     break |                     break | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue