Keyboard jogging disabled by default.

This commit is contained in:
2023-05-05 22:25:19 +03:00
parent 3913549b9e
commit 97b8186300
3 changed files with 222 additions and 99 deletions
+28
View File
@@ -617,6 +617,34 @@ std::array<float, 3> grbl::machine::get_work_pos() const {
return result;
}
void grbl::machine::request_jog_fixed(grbl::jog_direction dir, float distance, float feed) {
std::string command = "$J=G21 G91";
switch (dir) {
case jog_direction::x_up:
command += "X";
break;
case jog_direction::x_down:
command += "X-";
break;
case jog_direction::y_up:
command += "Y";
break;
case jog_direction::y_down:
command += "Y-";
break;
case jog_direction::z_up:
command += "Z";
break;
case jog_direction::z_down:
command += "Z-";
break;
}
command += std::to_string(distance) + " F" + std::to_string(feed);
pipe->send(command);
awaiting_responses++;
}
bool grbl::jog_state::no_jogging() const {
return !(up_pressed || down_pressed || left_pressed || right_pressed || z_up_pressed || z_down_pressed);
}