Merge pull request #8912 from thinkyhead/bf2_no_vol_fix

[2.0.x] No sub-menu if NO_VOLUMETRICS
This commit is contained in:
Scott Lahteine 2017-12-26 18:46:39 -06:00 committed by GitHub
commit fb6966f2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,10 @@ uint16_t max_display_update_time = 0;
void lcd_control_temperature_preheat_material1_settings_menu();
void lcd_control_temperature_preheat_material2_settings_menu();
void lcd_control_motion_menu();
#if DISABLED(NO_VOLUMETRICS)
void lcd_control_filament_menu();
#endif
#if ENABLED(LCD_INFO_MENU)
#if ENABLED(PRINTCOUNTER)
@ -3134,7 +3137,12 @@ void kill_screen(const char* lcd_msg) {
MENU_BACK(MSG_MAIN);
MENU_ITEM(submenu, MSG_TEMPERATURE, lcd_control_temperature_menu);
MENU_ITEM(submenu, MSG_MOTION, lcd_control_motion_menu);
#if DISABLED(NO_VOLUMETRICS)
MENU_ITEM(submenu, MSG_FILAMENT, lcd_control_filament_menu);
#elif ENABLED(LIN_ADVANCE)
MENU_ITEM_EDIT(float3, MSG_ADVANCE_K, &planner.extruder_advance_k, 0, 999);
#endif
#if HAS_LCD_CONTRAST
MENU_ITEM_EDIT_CALLBACK(int3, MSG_CONTRAST, &lcd_contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, lcd_callback_set_contrast, true);
@ -3623,6 +3631,7 @@ void kill_screen(const char* lcd_msg) {
END_MENU();
}
#if DISABLED(NO_VOLUMETRICS)
/**
*
* "Control" > "Filament" submenu
@ -3636,8 +3645,6 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM_EDIT(float3, MSG_ADVANCE_K, &planner.extruder_advance_k, 0, 999);
#endif
#if DISABLED(NO_VOLUMETRICS)
MENU_ITEM_EDIT_CALLBACK(bool, MSG_VOLUMETRIC_ENABLED, &parser.volumetric_enabled, planner.calculate_volumetric_multipliers);
if (parser.volumetric_enabled) {
@ -3659,10 +3666,9 @@ void kill_screen(const char* lcd_msg) {
#endif // EXTRUDERS > 1
}
#endif // !NO_VOLUMETRICS
END_MENU();
}
#endif // !NO_VOLUMETRICS
/**
*