From 0956f3edb9c93b25e7f79d0db61a0c839080d93f Mon Sep 17 00:00:00 2001 From: Mitch Bradley Date: Tue, 18 Aug 2020 10:27:12 -1000 Subject: [PATCH] Fixed else formatting (#558) by using a ternary operator assignment --- Grbl_Esp32/Custom/atari_1020.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Grbl_Esp32/Custom/atari_1020.cpp b/Grbl_Esp32/Custom/atari_1020.cpp index ea412eab..f1e94514 100644 --- a/Grbl_Esp32/Custom/atari_1020.cpp +++ b/Grbl_Esp32/Custom/atari_1020.cpp @@ -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); }