Ver código fonte

Add required backslash for macro expansion

Scott Lahteine 9 anos atrás
pai
commit
e182cdebf9
1 arquivos alterados com 14 adições e 14 exclusões
  1. 14
    14
      Marlin/ultralcd.cpp

+ 14
- 14
Marlin/ultralcd.cpp Ver arquivo

@@ -1025,21 +1025,21 @@ void lcd_sdcard_menu() {
1025 1025
 }
1026 1026
 
1027 1027
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1028
-  bool menu_edit_ ## _name () { \
1029
-    bool isClicked = LCD_CLICKED;
1030
-    if ((int32_t)encoderPosition < 0) encoderPosition = 0; \
1031
-    if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \
1032
-    if (lcdDrawUpdate) \
1033
-        lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \
1034
-    if (isClicked) { \
1035
-      *((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \
1036
-      lcd_goto_menu(prevMenu, prevEncoderPosition); \
1028
+    bool menu_edit_ ## _name () { \
1029
+      bool isClicked = LCD_CLICKED;
1030
+      if ((int32_t)encoderPosition < 0) encoderPosition = 0; \
1031
+      if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \
1032
+      if (lcdDrawUpdate) \
1033
+          lcd_implementation_drawedit(editLabel, _strFunc(((_type)((int32_t)encoderPosition + minEditValue)) / scale)); \
1034
+      if (isClicked) { \
1035
+        *((_type*)editValue) = ((_type)((int32_t)encoderPosition + minEditValue)) / scale; \
1036
+        lcd_goto_menu(prevMenu, prevEncoderPosition); \
1037
+      } \
1038
+      return isClicked; \
1039
+    } \
1040
+    void menu_edit_callback_ ## _name () { \
1041
+      if (menu_edit_ ## _name ()) (*callbackFunc)(); \
1037 1042
     } \
1038
-    return isClicked;
1039
-  } \
1040
-  void menu_edit_callback_ ## _name () { \
1041
-    if (menu_edit_ ## _name ()) (*callbackFunc)(); \
1042
-  } \
1043 1043
   static void _menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) { \
1044 1044
     prevMenu = currentMenu; \
1045 1045
     prevEncoderPosition = encoderPosition; \

Carregando…
Cancelar
Salvar