MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / EncoderAction_ExecuteHelper

Method EncoderAction_ExecuteHelper

src/Display/Menu.cpp:574–592  ·  view source on GitHub ↗

TODO: there is no error handling if a command within a sequence cannot be accepted...

Source from the content-addressed store, hash-verified

572
573// TODO: there is no error handling if a command within a sequence cannot be accepted...
574void 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
594void Menu::EncoderActionEnterItemHelper() noexcept
595{

Callers

nothing calls this directly

Calls 2

ProcessCommandFromLcdMethod · 0.80
ErrorBeepMethod · 0.80

Tested by

no test coverage detected