TODO: there is no error handling if a command within a sequence cannot be accepted...
| 572 | |
| 573 | // TODO: there is no error handling if a command within a sequence cannot be accepted... |
| 574 | void Menu::EncoderAction_ExecuteHelper(const char *_ecv_array const cmd) noexcept |
| 575 | { |
| 576 | if (StringEqualsIgnoreCase(cmd, "return")) |
| 577 | { |
| 578 | Pop(); // up one level |
| 579 | } |
| 580 | else if (StringStartsWithIgnoreCase(cmd, "menu ")) |
| 581 | { |
| 582 | Load(cmd + 5); |
| 583 | } |
| 584 | else if ((char)toupper(cmd[0]) == 'G' || (char)toupper(cmd[0]) == 'M' || (char)toupper(cmd[0]) == 'T') |
| 585 | { |
| 586 | const bool success = reprap.GetGCodes().ProcessCommandFromLcd(cmd); |
| 587 | if (!success) |
| 588 | { |
| 589 | reprap.GetDisplay().ErrorBeep(); // long low beep |
| 590 | } |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | void Menu::EncoderActionEnterItemHelper() noexcept |
| 595 | { |
nothing calls this directly
no test coverage detected