diff --git a/els-f280049c/Configuration.h b/els-f280049c/Configuration.h index 5486775..3216572 100644 --- a/els-f280049c/Configuration.h +++ b/els-f280049c/Configuration.h @@ -126,6 +126,21 @@ #define HARDWARE_VERSION 2 + + +//================================================================================ +// FEATURES +// +// Additional features that can be enabled for your configuration. +//================================================================================ + +// Ignore all key presses when the machine is running. Normally, only the mode +// and direction keys are ignored. +//#define IGNORE_ALL_KEYS_WHEN_RUNNING + + + + //================================================================================ // CPU / TIMING // diff --git a/els-f280049c/UserInterface.cpp b/els-f280049c/UserInterface.cpp index ae51647..4bca9a1 100644 --- a/els-f280049c/UserInterface.cpp +++ b/els-f280049c/UserInterface.cpp @@ -156,15 +156,24 @@ void UserInterface :: loop( void ) } } - // these keys can be operated when the machine is running - if( keys.bit.UP ) - { - newFeed = feedTable->next(); - } - if( keys.bit.DOWN ) - { - newFeed = feedTable->previous(); +#ifdef IGNORE_ALL_KEYS_WHEN_RUNNING + if( currentRpm == 0 ) + { +#endif // IGNORE_ALL_KEYS_WHEN_RUNNING + + // these keys can be operated when the machine is running + if( keys.bit.UP ) + { + newFeed = feedTable->next(); + } + if( keys.bit.DOWN ) + { + newFeed = feedTable->previous(); + } + +#ifdef IGNORE_ALL_KEYS_WHEN_RUNNING } +#endif // IGNORE_ALL_KEYS_WHEN_RUNNING // if we have changed the feed if( newFeed != NULL ) {