Readability of MENU_MULTIPLIER_ITEM

Last commit before bed.
This commit is contained in:
Scott Lahteine 2015-02-20 02:08:41 -08:00
parent 09e09b308e
commit a8939eec28

View File

@ -150,22 +150,23 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
#ifdef ENCODER_RATE_MULTIPLIER #ifdef ENCODER_RATE_MULTIPLIER
#define MENU_MULTIPLIER_ITEM(type, label, args...) do { \ #define MENU_MULTIPLIER_ITEM(type, label, args...) do { \
if (_menuItemNr == _lineNr) { \ if (_menuItemNr == _lineNr) { \
if (lcdDrawUpdate) { \ if (lcdDrawUpdate) { \
const char* _label_pstr = PSTR(label); \ const char* _label_pstr = PSTR(label); \
if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \ if ((encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) { \
lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \ lcd_implementation_drawmenu_ ## type ## _selected (_drawLineNr, _label_pstr , ## args ); \
}else{\ }
lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \ else {\
}\ lcd_implementation_drawmenu_ ## type (_drawLineNr, _label_pstr , ## args ); \
}\
if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\
lcd_quick_feedback(); \
encoderRateMultiplierEnabled = true; \
lastEncoderMovementMillis = 0; \
menu_action_ ## type ( args ); \
return;\
}\
}\ }\
}\
if (wasClicked && (encoderPosition / ENCODER_STEPS_PER_MENU_ITEM) == _menuItemNr) {\
lcd_quick_feedback(); \
encoderRateMultiplierEnabled = true; \
lastEncoderMovementMillis = 0; \
menu_action_ ## type ( args ); \
return;\
}\
}\
_menuItemNr++;\ _menuItemNr++;\
} while(0) } while(0)
#endif #endif