Changed debug output; commented out fps from debug
This commit is contained in:
		
							parent
							
								
									c6e7aefb96
								
							
						
					
					
						commit
						711553d4d8
					
				
							
								
								
									
										12
									
								
								main.py
								
								
								
								
							
							
						
						
									
										12
									
								
								main.py
								
								
								
								
							|  | @ -89,6 +89,7 @@ class MainWindow(FloatLayout): | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     def update_last_temperature(self): |     def update_last_temperature(self): | ||||||
|  |         start = time.time() | ||||||
|         global dataThreadDataQueue |         global dataThreadDataQueue | ||||||
|         # This breaks if there are more updates in the queue than the frequency of update_last_temperature - it pulls old data out of the queue, and not the most recent. |         # This breaks if there are more updates in the queue than the frequency of update_last_temperature - it pulls old data out of the queue, and not the most recent. | ||||||
|         done = False |         done = False | ||||||
|  | @ -99,8 +100,8 @@ class MainWindow(FloatLayout): | ||||||
|             except Queue.Empty: |             except Queue.Empty: | ||||||
|                 done = True |                 done = True | ||||||
|         if data: |         if data: | ||||||
|             if len(data) > 1: |             #if len(data) > 1: | ||||||
|                 Logger.debug('update_last_temperature: ' + str(len(data)) + ' items retrieved from queue') |             #    Logger.debug('update_last_temperature: ' + str(len(data)) + ' items retrieved from queue') | ||||||
|             last_point = data[-1] |             last_point = data[-1] | ||||||
|             if self.state == 'paused': |             if self.state == 'paused': | ||||||
|                 # Try to update the last temperature, but not to the plotwidget, |                 # Try to update the last temperature, but not to the plotwidget, | ||||||
|  | @ -117,13 +118,14 @@ class MainWindow(FloatLayout): | ||||||
|             if 'exception' in last_point: |             if 'exception' in last_point: | ||||||
|                 self.lastStatus = {'status' : 'error', 'message' : data['exception']} |                 self.lastStatus = {'status' : 'error', 'message' : data['exception']} | ||||||
|             self.lastData = data |             self.lastData = data | ||||||
|         if dataThreadDataQueue.qsize(): |         #if dataThreadDataQueue.qsize(): | ||||||
|             Logger.debug('update_last_temperature: ' + str(dataThreadDataQueue.qsize()) + ' items left in queue after ' + str(len(data)) + ' items were taken out') |         #    Logger.debug('update_last_temperature: ' + str(dataThreadDataQueue.qsize()) + ' items left in queue after ' + str(len(data)) + ' items were taken out') | ||||||
|  |         Logger.debug('update_last_temperature: Took ' + str(time.time() - start) + ' seconds to retrieve ' + str(len(data)) + ' items. ' + str(dataThreadDataQueue.qsize()) + ' items remain in queue') | ||||||
| 
 | 
 | ||||||
|     def update(self, dt): |     def update(self, dt): | ||||||
|         self.update_data_sources() |         self.update_data_sources() | ||||||
|         self.update_last_temperature() |         self.update_last_temperature() | ||||||
|         Logger.debug('MainWindow: FPS ' + str(kivy.clock.Clock.get_fps())) |         #Logger.debug('MainWindow: FPS ' + str(kivy.clock.Clock.get_fps())) | ||||||
|         #Logger.debug('MainWindow: dataThread ' + str(dataThread.name) + ' status: ' + str(dataThread.is_alive())) |         #Logger.debug('MainWindow: dataThread ' + str(dataThread.name) + ' status: ' + str(dataThread.is_alive())) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue