mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	More small fixes for compilation on Linux
This commit is contained in:
		
							parent
							
								
									6fde339164
								
							
						
					
					
						commit
						128b2623cc
					
				
					 2 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
					@ -52,7 +52,9 @@ $have_boost = 1
 | 
				
			||||||
        LIBS    => join(' ', map "-L$_", @INC, @boost_libs),
 | 
					        LIBS    => join(' ', map "-L$_", @INC, @boost_libs),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (!$have_boost) {
 | 
					if ($have_boost) {
 | 
				
			||||||
 | 
					    push @LIBS, '-lboost_system', '-lboost_thread';
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
    foreach my $path (@boost_libs) {
 | 
					    foreach my $path (@boost_libs) {
 | 
				
			||||||
        my @files = glob "$path/libboost_system*";
 | 
					        my @files = glob "$path/libboost_system*";
 | 
				
			||||||
        next if !@files;
 | 
					        next if !@files;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -105,8 +105,8 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
 | 
				
			||||||
        long closestSpeed = ss.baud_base / ss.custom_divisor;
 | 
					        long closestSpeed = ss.baud_base / ss.custom_divisor;
 | 
				
			||||||
        //cout << " Closest speed " << closestSpeed << endl;
 | 
					        //cout << " Closest speed " << closestSpeed << endl;
 | 
				
			||||||
        ss.reserved_char[0] = 0;
 | 
					        ss.reserved_char[0] = 0;
 | 
				
			||||||
        if (closestSpeed < baud * 98 / 100 || closestSpeed > baud_rate * 102 / 100) {
 | 
					        if (closestSpeed < baud_rate * 98 / 100 || closestSpeed > baud_rate * 102 / 100) {
 | 
				
			||||||
            throw std::exception("Failed to set baud rate");
 | 
					            printf("Failed to set baud rate\n");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ioctl(handle, TIOCSSERIAL, &ss);
 | 
					        ioctl(handle, TIOCSSERIAL, &ss);
 | 
				
			||||||
| 
						 | 
					@ -316,7 +316,7 @@ GCodeSender::on_read(const boost::system::error_code& error,
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                this->send();
 | 
					                this->send();
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                printf("Cannot resend %lu (last was %lu)\n", toresend, this->sent);
 | 
					                printf("Cannot resend %zu (last was %zu)\n", toresend, this->sent);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        } else if (boost::starts_with(line, "wait")) {
 | 
					        } else if (boost::starts_with(line, "wait")) {
 | 
				
			||||||
            // ignore
 | 
					            // ignore
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue