From a94dedd2cb24b2c2d15e739d6c788da0c4d6ce77 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat, 16 Mar 2019 23:36:26 -0400 Subject: [PATCH] Compile fixes --- Marlin/Configuration.h | 53 ++++++++++++------- Marlin/Configuration_adv.h | 10 ++-- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 4 ++ Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 7 ++- Marlin/src/gcode/bedlevel/ubl/M421.cpp | 3 ++ Marlin/src/inc/Version.h | 2 +- .../src/lcd/extensible_ui/lib/Creality_DWIN.h | 1 - 7 files changed, 55 insertions(+), 25 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7d4863d58c..c16783d837 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -24,9 +24,9 @@ //#define MachineCR20Pro //#define MachineCR10Std //#define MachineCRX -//#define MachineCR10SPro +#define MachineCR10SPro //#define MachineS4 -#define MachineS5 +//#define MachineS5 //#define PLUS // Adds bltouch, allmetal, bilinear (standard), lerdge, 93 e steps/mm @@ -94,7 +94,7 @@ */ //#define ABL_EZABL // TH3D EZABL or Any NO Sensor //#define ABL_NCSW //Creality ABL or Any NC Sensor -#define ABL_BLTOUCH +//#define ABL_BLTOUCH //#define CREALITY_ABL_MOUNT //Using creality ABL mount /* @@ -114,9 +114,9 @@ Standard is recommended in most other scenarios. */ //#define MeshFast -//#define MeshStd +#define MeshStd //#define MeshFine -#define MeshExtreme +//#define MeshExtreme /* Disables SD Sort, Autotemp, Arc support, Linear Advance (Unless overridden with OrigLA above), Big edit fonts, and a few other little things @@ -173,6 +173,21 @@ * Advanced settings can be found in Configuration_adv.h * */ + +#if(ENABLED(MachineCR10SPro)) + #define MachineCR10Std + #if DISABLED(ABL_BLTOUCH) + #define ABL_NCSW + #endif + #if DISABLED(ABL_UBL) + #define ABL_BI + #endif + #define MeshStd + #define BoardRev2 + #define SD_DETECT_PIN 49 +#endif + + #define CONFIGURATION_H_VERSION 020000 //=========================================================================== @@ -229,12 +244,12 @@ */ // Enable to show the bitmap in Marlin/_Bootscreen.h on startup. -#if(DISABLED(MachineEnder4) && DISABLED(MachineCR10Orig) && DISABLED(LowMemoryBoard)) -#define SHOW_CUSTOM_BOOTSCREEN +#if(DISABLED(MachineEnder4) && DISABLED(MachineCR10Orig) && DISABLED(LowMemoryBoard) && ( DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD))) + #define SHOW_CUSTOM_BOOTSCREEN #endif // Enable to show the bitmap in Marlin/_Statusscreen.h on the status screen. -#if(DISABLED(MachineCR10Orig) && DISABLED(MachineEnder4)) -#define CUSTOM_STATUS_SCREEN_IMAGE +#if(DISABLED(MachineCR10Orig) && DISABLED(MachineEnder4) && ( DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD))) + #define CUSTOM_STATUS_SCREEN_IMAGE #endif #if(ENABLED(MachineMini)) @@ -1587,7 +1602,7 @@ * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. * By default the firmware assumes HIGH=FILAMENT PRESENT. */ -#if(DISABLED(MachineCR10Orig) &&(DISABLED(MachineCR20)|| ENABLED(AddonFilSensor)) && (DISABLED(MachineEnder4) || ENABLED(AddonFilSensor)) && (DISABLED(MachineCRX)|| ENABLED(AddonFilSensor) || ENABLED(DualFilSensors))) +#if (DISABLED(MachineCR10Orig) && DISABLED(MachineCR20) && DISABLED(MachineEnder4) && DISABLED(MachineCRX)) || ENABLED(AddonFilSensor) || ENABLED(DualFilSensors) #define FILAMENT_RUNOUT_SENSOR #endif #if ENABLED(FILAMENT_RUNOUT_SENSOR) @@ -1783,7 +1798,9 @@ //========================= Unified Bed Leveling ============================ //=========================================================================== - #define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + #if DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD) + #define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh + #endif #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 @@ -1814,8 +1831,8 @@ */ #if ENABLED(AUTO_BED_LEVELING_3POINT) || ENABLED(AUTO_BED_LEVELING_UBL) -#if(DISABLED(MachineCR10Orig) && DISABLED(MachineEnder4)) -#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh +#if DISABLED(MachineCR10Orig) && DISABLED(MachineEnder4) && ( DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD)) + #define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh #endif #if ENABLED(MachineMini) #define PROBE_PT_1_X 50 // Probing points for 3-Point leveling of the mesh @@ -2425,16 +2442,16 @@ //===================== (I2C and Shift-Register LCDs) ===================== //============================================================================= #if(ENABLED(MachineEnder4) && DISABLED(GraphicLCD)) -#define REPRAP_DISCOUNT_SMART_CONTROLLER + #define REPRAP_DISCOUNT_SMART_CONTROLLER #elif(ENABLED(MachineEnder2) ) -#define MINIPANEL + #define MINIPANEL #elif ENABLED(MachineCR20) #define MKS_MINI_12864 -#elif(DISABLED(OrigLCD)) -#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER +#elif(DISABLED(OrigLCD) && DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD)) + #define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER #endif #if(ENABLED(OrigLCD)) -#define CR10_STOCKDISPLAY + #define CR10_STOCKDISPLAY #endif // // CONTROLLER TYPE: I2C diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 60ba358285..928bd867b2 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1023,7 +1023,9 @@ // Note: Extra time may be added to mitigate controller latency. #define BABYSTEP_ALWAYS_AVAILABLE // Allow babystepping at all times (not just during movement). #define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping - #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #if DISABLED(MachineCR10SPro) && DISABLED(GraphicLCD) + #define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor + #endif #endif //#define MOVE_Z_WHEN_IDLE // Jump to the move Z menu on doubleclick when printer is idle. @@ -1399,9 +1401,9 @@ #define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. #define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change -#if(DISABLED(MachineCR10Orig) && DISABLED(LowMemoryBoard)) - #define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. - #define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) + #if(DISABLED(MachineCR10Orig) && DISABLED(LowMemoryBoard)) + //#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu. + //#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302) #endif #endif diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index e1c5c985d0..8aa4c9356d 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -32,6 +32,10 @@ #include "../../../module/motion.h" #include "../../bedlevel/bedlevel.h" + #if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extensible_ui/ui_api.h" + #endif + #include "math.h" void unified_bed_leveling::echo_name() { diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index cf8e89fa61..14d1b0142b 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -51,6 +51,10 @@ #include + #if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extensible_ui/ui_api.h" + #endif + #define UBL_G29_P31 extern float destination[XYZE], current_position[XYZE]; @@ -390,11 +394,12 @@ case 2: // Allow the user to specify the height because 10mm is a little extreme in some cases. for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in - for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) // the center of the bed + for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++){ // the center of the bed z_values[x][y] += parser.seen('C') ? g29_constant : 9.99f; #if ENABLED(EXTENSIBLE_UI) ExtUI::onMeshUpdate(x, y, z_values[x][y]); #endif + } break; } } diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index a4bcf33562..5195cdb581 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -30,6 +30,9 @@ #include "../../gcode.h" #include "../../../feature/bedlevel/bedlevel.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extensible_ui/ui_api.h" +#endif /** * M421: Set a single Mesh Bed Leveling Z coordinate diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 0ff190e67c..d1c6b69456 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -44,7 +44,7 @@ * Verbose version identifier which should contain a reference to the location * from where the binary was downloaded or the source code was compiled. */ - #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)" + //#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github)" /** * The STRING_DISTRIBUTION_DATE represents when the binary file was built, diff --git a/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.h b/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.h index bc3ffb3f50..0f10ade130 100644 --- a/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.h +++ b/Marlin/src/lcd/extensible_ui/lib/Creality_DWIN.h @@ -3,7 +3,6 @@ #include "string.h" #include #include "../ui_api.h" -#include "RTS_Show.h" namespace ExtUI { /*********************************/