Enabling opening and running of programs. Added jogging.
This commit is contained in:
@@ -12,7 +12,7 @@ grbl::tcp_transport::tcp_transport(std::string address, uint16_t p)
|
||||
live_check_thread = std::thread(&grbl::tcp_transport::worker, this);
|
||||
}
|
||||
|
||||
void grbl::tcp_transport::open(grbl::transport_callbacks &cb) {
|
||||
void grbl::tcp_transport::open(grbl::transport_callbacks& cb) {
|
||||
if (is_connected) {
|
||||
close();
|
||||
}
|
||||
@@ -83,6 +83,8 @@ void grbl::tcp_transport::worker() {
|
||||
if (result == -1) {
|
||||
std::cerr << "Failed while writing." << std::endl;
|
||||
close();
|
||||
} else {
|
||||
std::cout << "<< " << line << std::endl;
|
||||
}
|
||||
|
||||
send_queue.pop();
|
||||
@@ -127,8 +129,8 @@ grbl::tcp_transport::~tcp_transport() {
|
||||
live_check_thread.join();
|
||||
}
|
||||
|
||||
bool grbl::tcp_transport::is_empty_line(const std::string &line) {
|
||||
for (auto &c: line) {
|
||||
bool grbl::tcp_transport::is_empty_line(const std::string& line) {
|
||||
for (auto& c: line) {
|
||||
if (c != '\r' && c != '\n' && c != ' ') {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user