1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-01 18:32:37 +02:00

Fixed else formatting (#558)

by using a ternary operator assignment
This commit is contained in:
Mitch Bradley
2020-08-18 10:27:12 -10:00
committed by GitHub
parent 6d45ee4515
commit 0956f3edb9

View File

@@ -239,12 +239,7 @@ void user_tool_change(uint8_t new_tool) {
// move from current tool to next tool....
void atari_next_pen() {
if (current_tool < MAX_PEN_NUMBER) {
gc_state.tool = current_tool + 1;
}
else {
gc_state.tool = 1;
}
gc_state.tool = current_tool < MAX_PEN_NUMBER ? current_tool + 1 : 1;
user_tool_change(gc_state.tool);
}