mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	ENH:periodic request full push
when the printer does not push any data packets, request data from the printer at intervals Change-Id: I4c84586301588f6a14f65d7a732d22f57bce59c9
This commit is contained in:
		
							parent
							
								
									18a5575bbc
								
							
						
					
					
						commit
						7ffeb1a432
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		|  | @ -4350,11 +4350,16 @@ void DeviceManager::keep_alive() | |||
|         obj->keep_alive_count++; | ||||
|         std::chrono::system_clock::time_point start = std::chrono::system_clock::now(); | ||||
|         auto internal = std::chrono::duration_cast<std::chrono::milliseconds>(start - obj->last_keep_alive); | ||||
|         if (internal.count() > TIMEOUT_FOR_KEEPALIVE && internal.count() < 1000 * 60 * 60 * 300) { | ||||
|         if (internal.count() > TIMEOUT_FOR_KEEPALIVE && (internal.count() < 1000 * 60 * 60 * 300) ) { | ||||
|             BOOST_LOG_TRIVIAL(info) << "keep alive = " << internal.count() << ", count = " << obj->keep_alive_count; | ||||
|             obj->command_request_push_all(); | ||||
|             obj->last_keep_alive = start; | ||||
|         } | ||||
|         else if(obj->m_push_count == 0){ | ||||
|             BOOST_LOG_TRIVIAL(info) << "keep alive = " << internal.count() << ", push_count = 0, count = " << obj->keep_alive_count; | ||||
|             obj->command_request_push_all(); | ||||
|             obj->last_keep_alive = start; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ | |||
| #define PUSHINFO_TIMEOUT        15000.f     // milliseconds
 | ||||
| #define TIMEOUT_FOR_STRAT       20000.f     // milliseconds
 | ||||
| #define TIMEOUT_FOR_KEEPALIVE   5* 60 * 1000.f     // milliseconds
 | ||||
| #define REQUEST_PUSH_MIN_TIME   15000.f     // milliseconds
 | ||||
| #define REQUEST_PUSH_MIN_TIME   3000.f     // milliseconds
 | ||||
| #define REQUEST_START_MIN_TIME  15000.f     // milliseconds
 | ||||
| #define EXTRUSION_OMIT_TIME     20000.f     // milliseconds
 | ||||
| #define HOLD_TIMEOUT            10000.f     // milliseconds
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 tao wang
						tao wang