mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	ENH:display info when in slicing queue
Change-Id: I0dc2645e5679af310c8c0558c8ae47c9d62958e1 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
		
							parent
							
								
									d9395e6405
								
							
						
					
					
						commit
						c9635174bd
					
				
					 3 changed files with 14 additions and 4 deletions
				
			
		|  | @ -2469,6 +2469,11 @@ int MachineObject::parse_json(std::string payload) | |||
|                     if (jj.contains("gcode_state")) { | ||||
|                         this->set_print_state(jj["gcode_state"].get<std::string>()); | ||||
|                     } | ||||
|                     if (jj.contains("queue_number")) { | ||||
|                         this->queue_number = jj["queue_number"].get<int>(); | ||||
|                     } else { | ||||
|                         this->queue_number = 0; | ||||
|                     } | ||||
| 
 | ||||
|                     if (jj.contains("task_id")) { | ||||
|                         this->task_id_ = jj["task_id"].get<std::string>(); | ||||
|  |  | |||
|  | @ -605,7 +605,8 @@ public: | |||
|     void parse_status(int flag); | ||||
| 
 | ||||
|     /* printing status */ | ||||
|     std::string print_status;      /* enum string: FINISH, RUNNING, PAUSE, INIT, FAILED */ | ||||
|     std::string print_status;      /* enum string: FINISH, SLICING, RUNNING, PAUSE, INIT, FAILED */ | ||||
|     int queue_number = 0; | ||||
|     std::string iot_print_status;  /* iot */ | ||||
|     PrintingSpeedLevel printing_speed_lvl; | ||||
|     int                printing_speed_mag = 100; | ||||
|  |  | |||
|  | @ -2256,9 +2256,13 @@ void StatusPanel::update_subtask(MachineObject *obj) | |||
|             wxString prepare_text; | ||||
|             if (obj->is_in_prepare()) | ||||
|                 prepare_text = wxString::Format(_L("Downloading...")); | ||||
|             else if (obj->print_status == "SLICING") | ||||
|                 prepare_text = wxString::Format(_L("Cloud Slicing...")); | ||||
|             else | ||||
|             else if (obj->print_status == "SLICING") { | ||||
|                 if (obj->queue_number <= 0) { | ||||
|                     prepare_text = wxString::Format(_L("Cloud Slicing...")); | ||||
|                 } else { | ||||
|                     prepare_text = wxString::Format(_L("In Cloud Slicing Queue, there are %s tasks ahead."), std::to_string(obj->queue_number)); | ||||
|                 } | ||||
|             } else | ||||
|                 prepare_text = wxString::Format(_L("Downloading...")); | ||||
| 
 | ||||
|             if (obj->gcode_file_prepare_percent >= 0 && obj->gcode_file_prepare_percent <= 100) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stone Li
						Stone Li