Commit cc967a46 authored by MagoKimbra's avatar MagoKimbra

Update 4.2.4 dev

parent 27235123
...@@ -107,9 +107,6 @@ ...@@ -107,9 +107,6 @@
*****************************************************************************************/ *****************************************************************************************/
//#define Z_PROBE_ENDSTOP //#define Z_PROBE_ENDSTOP
// Uncomment to enable autocalibration debug messages
#define DEBUG_MESSAGES
// Speed for autocalibration travel and probing moves // Speed for autocalibration travel and probing moves
#define AUTOCAL_TRAVELRATE 100 // mm/sec #define AUTOCAL_TRAVELRATE 100 // mm/sec
#define AUTOCAL_PROBERATE 50 // mm/sec #define AUTOCAL_PROBERATE 50 // mm/sec
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
* MOTION FEATURES: * MOTION FEATURES:
* - Software endstops * - Software endstops
* - Endstops only for homing * - Endstops only for homing
* - Abort on endstop hit feature
* - R/C Servo * - R/C Servo
* - Late Z axis * - Late Z axis
* - Ahead slowdown * - Ahead slowdown
...@@ -580,19 +581,38 @@ ...@@ -580,19 +581,38 @@
**************************************************************************/ **************************************************************************/
#define SOFTWARE_MIN_ENDSTOPS true // If true, axis won't move to coordinates less than HOME_POS. #define SOFTWARE_MIN_ENDSTOPS true // If true, axis won't move to coordinates less than HOME_POS.
#define SOFTWARE_MAX_ENDSTOPS true // If true, axis won't move to coordinates greater than the defined lengths below. #define SOFTWARE_MAX_ENDSTOPS true // If true, axis won't move to coordinates greater than the defined lengths below.
/***********************************************************************/ /**************************************************************************/
/************************************************************************** /**************************************************************************
*********************** Endstops only for homing ************************* *********************** Endstops only for homing *************************
**************************************************************************
* *
* If defined the endstops will only be used for homing *
* *
**************************************************************************/ **************************************************************************/
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing #define ENDSTOPS_ONLY_FOR_HOMING
/***********************************************************************/ /**************************************************************************/
/*********************************************************************** /**************************************************************************
**************************** R/C Servo ******************************** ******************** Abort on endstop hit feature ************************
***********************************************************************/ **************************************************************************
* *
* This option allows you to abort printing when any endstop is triggered.*
* This feature must be enabled with "M540 S1" or from the LCD menu or *
* by define ABORT ON ENDSTOP HIT INIT true. *
* To have any effect, endstops must be enabled during SD printing. *
* With ENDSTOPS ONLY FOR HOMING you must send "M120" to enable endstops. *
* *
**************************************************************************/
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
//#define ABORT_ON_ENDSTOP_HIT_INIT true
/**************************************************************************
****************************** R/C Servo *********************************
**************************************************************************/
//#define ENABLE_SERVOS //#define ENABLE_SERVOS
// Number of servos // Number of servos
// If you select a configuration below, this will receive a default value and does not need to be set manually // If you select a configuration below, this will receive a default value and does not need to be set manually
...@@ -621,7 +641,7 @@ ...@@ -621,7 +641,7 @@
// 300ms is a good value but you can try less delay. // 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it. // If the servo can't reach the requested position, increase it.
#define SERVO_DEACTIVATION_DELAY 300 #define SERVO_DEACTIVATION_DELAY 300
/***********************************************************************/ /**************************************************************************/
/*********************************************************************** /***********************************************************************
...@@ -1026,12 +1046,6 @@ ...@@ -1026,12 +1046,6 @@
// This allows hosts to request long names for files and folders with M33 // This allows hosts to request long names for files and folders with M33
//#define LONG_FILENAME_HOST_SUPPORT //#define LONG_FILENAME_HOST_SUPPORT
// This option allows you to abort SD printing when any endstop is triggered.
// This feature must be enabled with "M540 S1" or from the LCD menu.
// To have any effect, endstops must be enabled during SD printing.
// With ENDSTOPS_ONLY_FOR_HOMING you must send "M120" to enable endstops.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// This enable the firmware to write some configuration that require frequent update, on the SD card // This enable the firmware to write some configuration that require frequent update, on the SD card
//#define SD_SETTINGS // Uncomment to enable //#define SD_SETTINGS // Uncomment to enable
#define SD_CFG_SECONDS 300 // seconds between update #define SD_CFG_SECONDS 300 // seconds between update
......
#ifndef CONFIGURATION_VERSION_H #ifndef CONFIGURATION_VERSION_H
#define CONFIGURATION_VERSION_H #define CONFIGURATION_VERSION_H
#define BUILD_VERSION "MarlinKimbra 4.2.3 dev" #define BUILD_VERSION "MarlinKimbra 4.2.4 dev"
#define SHORT_BUILD_VERSION "4.2.3 dev" #define SHORT_BUILD_VERSION "4.2.4 dev"
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time #define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found // It might also be appropriate to define a location where additional information can be found
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra" #define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
......
This diff is collapsed.
...@@ -83,6 +83,8 @@ void clamp_to_software_endstops(float target[3]); ...@@ -83,6 +83,8 @@ void clamp_to_software_endstops(float target[3]);
extern millis_t previous_cmd_ms; extern millis_t previous_cmd_ms;
void refresh_cmd_timeout(); void refresh_cmd_timeout();
extern void delay_ms(millis_t ms);
#if ENABLED(FAST_PWM_FAN) #if ENABLED(FAST_PWM_FAN)
void setPwmFrequency(uint8_t pin, int val); void setPwmFrequency(uint8_t pin, int val);
#endif #endif
...@@ -236,7 +238,6 @@ extern void calculate_volumetric_multipliers(); ...@@ -236,7 +238,6 @@ extern void calculate_volumetric_multipliers();
long code_value_long(); long code_value_long();
bool code_seen(char ); bool code_seen(char );
// //
// Utility functions used by M100 to get its work done. // Utility functions used by M100 to get its work done.
// //
...@@ -247,4 +248,5 @@ extern void calculate_volumetric_multipliers(); ...@@ -247,4 +248,5 @@ extern void calculate_volumetric_multipliers();
int how_many_E5s_are_here( unsigned char *); int how_many_E5s_are_here( unsigned char *);
#endif #endif
#endif //MARLIN_H #endif //MARLIN_H
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
#endif #endif
#include <util/delay.h> #include <util/delay.h>
#include <avr/eeprom.h> #include <avr/eeprom.h>
#include "fastio.h" #include "module/fastio.h"
#endif #endif
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "macros.h" #include "module/macros.h"
#include "Boards.h" #include "Boards.h"
#include "mechanics.h" #include "module/mechanics.h"
#include "Configuration_Version.h" #include "Configuration_Version.h"
#include "Configuration_Overall.h" #include "Configuration_Overall.h"
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
#endif #endif
#include "language/language.h" #include "language/language.h"
#include "conditionals.h" #include "module/conditionals.h"
#include "sanitycheck.h" #include "module/sanitycheck.h"
#include "thermistortables.h" #include "module/thermistortables.h"
#include "comunication.h" #include "module/comunication.h"
typedef unsigned long millis_t; typedef unsigned long millis_t;
......
#include "base.h" #include "base.h"
#include "Marlin_main.h" #include "Marlin_main.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "module/vector_3.h"
#endif #endif
#include "planner.h" #include "module/planner.h"
#include "stepper_indirection.h" #include "module/stepper_indirection.h"
#include "stepper.h" #include "module/stepper.h"
#include "temperature.h" #include "module/temperature.h"
#include "ultralcd.h" #include "module/ultralcd.h"
#include "configuration_store.h" #include "configuration_store.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "cardreader.h" #include "module/cardreader.h"
#endif #endif
/** /**
* configuration_store.cpp * configuration_store.cpp
......
...@@ -184,11 +184,11 @@ ...@@ -184,11 +184,11 @@
#define SERIAL_T_MINTEMP "MINTEMP triggered" #define SERIAL_T_MINTEMP "MINTEMP triggered"
// Endstop // Endstop
#define SERIAL_ENDSTOP_X " X:" #define SERIAL_ENDSTOP_X " X="
#define SERIAL_ENDSTOP_Y " Y:" #define SERIAL_ENDSTOP_Y " Y="
#define SERIAL_ENDSTOP_Z " Z:" #define SERIAL_ENDSTOP_Z " Z="
#define SERIAL_ENDSTOP_E " E:" #define SERIAL_ENDSTOP_E " E="
#define SERIAL_ENDSTOP_PROBE " PROBE:" #define SERIAL_ENDSTOP_PROBE " PROBE="
// Debug // Debug
#define SERIAL_DEBUG_ECHO "DEBUG ECHO ENABLED" #define SERIAL_DEBUG_ECHO "DEBUG ECHO ENABLED"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
Modified 28 September 2010 by Mark Sproul Modified 28 September 2010 by Mark Sproul
*/ */
#include "base.h" #include "../base.h"
#include "MarlinSerial.h" #include "MarlinSerial.h"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* along with the Arduino Sd2Card Library. If not, see * along with the Arduino Sd2Card Library. If not, see
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "base.h" #include "../base.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "Sd2Card.h" #include "Sd2Card.h"
......
...@@ -18,9 +18,11 @@ ...@@ -18,9 +18,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "../base.h"
#ifndef Sd2Card_h #ifndef Sd2Card_h
#define Sd2Card_h #define Sd2Card_h
#include "base.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
/** /**
......
...@@ -18,9 +18,11 @@ ...@@ -18,9 +18,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "base.h" #include "../base.h"
#include "../Marlin_main.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "Marlin_main.h"
#include <stdint.h> #include <stdint.h>
#include "SdBaseFile.h" #include "SdBaseFile.h"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -18,14 +18,18 @@ ...@@ -18,14 +18,18 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "../base.h"
#ifndef SdFatUtil_h #ifndef SdFatUtil_h
#define SdFatUtil_h #define SdFatUtil_h
/** /**
* \file * \file
* \brief Useful utility functions. * \brief Useful utility functions.
*/ */
#include "base.h"
#include "MarlinSerial.h" #include "MarlinSerial.h"
/** Store and print a string in flash memory.*/ /** Store and print a string in flash memory.*/
#define PgmPrint(x) SerialPrint_P(PSTR(x)) #define PgmPrint(x) SerialPrint_P(PSTR(x))
/** Store and print a string in flash memory followed by a CR/LF.*/ /** Store and print a string in flash memory followed by a CR/LF.*/
......
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
* along with the Arduino SdFat Library. If not, see * along with the Arduino SdFat Library. If not, see
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "base.h"
#include "../base.h"
#include "../Marlin_main.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "Marlin_main.h"
#include "SdFile.h" #include "SdFile.h"
/** Create a file object and open it in the current working directory. /** Create a file object and open it in the current working directory.
* *
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
* along with the Arduino SdFat Library. If not, see * along with the Arduino SdFat Library. If not, see
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#include "base.h"
#include "Marlin_main.h" #include "../base.h"
#include "../Marlin_main.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "SdVolume.h" #include "SdVolume.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* along with the Arduino SdFat Library. If not, see * along with the Arduino SdFat Library. If not, see
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef SdVolume_h #ifndef SdVolume_h
#define SdVolume_h #define SdVolume_h
/** /**
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#if HAS(BUZZER) #if HAS(BUZZER)
#include "buzzer.h" #include "buzzer.h"
#include "../ultralcd.h" #include "ultralcd.h"
void buzz(long duration, uint16_t freq) { void buzz(long duration, uint16_t freq) {
if (freq > 0) { if (freq > 0) {
......
#include "base.h" #include "../base.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "Marlin_main.h" #include "../Marlin_main.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
#endif #endif
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "stepper.h" #include "stepper.h"
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "module/nextion_lcd.h" #include "nextion_lcd.h"
#include "cardreader.h" #include "cardreader.h"
CardReader::CardReader() { CardReader::CardReader() {
......
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
#endif #endif
#endif #endif
#include "pins.h" #include "../Pins.h"
/** /**
* DONDOLO * DONDOLO
......
#include "base.h" #include "../base.h"
#if ENABLED(DIGIPOT_I2C) #if ENABLED(DIGIPOT_I2C)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Externa DAC for Alligator Board * Externa DAC for Alligator Board
* *
****************************************************************/ ****************************************************************/
#include "base.h" #include "../base.h"
#if MB(ALLIGATOR) #if MB(ALLIGATOR)
#include "stepper.h" #include "stepper.h"
......
...@@ -4,19 +4,18 @@ ...@@ -4,19 +4,18 @@
*/ */
#include "../base.h" #include "../base.h"
#include "../Marlin_main.h"
#if ENABLED(FIRMWARE_TEST) #if ENABLED(FIRMWARE_TEST)
#include "firmware_test.h" #include "firmware_test.h"
#include "planner.h"
#include "../Marlin_main.h" #include "stepper_indirection.h"
#include "../planner.h" #include "stepper.h"
#include "../stepper_indirection.h" #include "temperature.h"
#include "../stepper.h"
#include "../temperature.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "../vector_3.h" #include "vector_3.h"
#endif #endif
static char serial_answer; static char serial_answer;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
*/ */
#include "../base.h" #include "../base.h"
#include "../Marlin_main.h"
#if ENABLED(NEXTION_GFX) #if ENABLED(NEXTION_GFX)
#include "../Marlin_main.h" #include "stepper.h"
#include "../stepper.h"
#include "nextion_gfx.h" #include "nextion_gfx.h"
const int INSIDE = 0; // 0000 const int INSIDE = 0; // 0000
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
* *
*/ */
#ifndef NEXTION_GFX_H #ifndef NEXTION_GFX_H
#define NEXTION_GFX_H #define NEXTION_GFX_H
......
#include "../base.h" #include "../base.h"
#include "../Marlin_main.h"
#include "../configuration_store.h"
#if ENABLED(NEXTION) #if ENABLED(NEXTION)
#include "../Marlin_main.h" #include "cardreader.h"
#include "../cardreader.h" #include "temperature.h"
#include "../temperature.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "../vector_3.h" #include "vector_3.h"
#endif #endif
#include "../planner.h" #include "planner.h"
#include "../stepper_indirection.h" #include "stepper_indirection.h"
#include "../stepper.h" #include "stepper.h"
#include "../configuration_store.h"
#include "nextion_lcd.h" #include "nextion_lcd.h"
#include "nextion_gfx.h" #include "nextion_gfx.h"
#include <Nextion.h> #include <Nextion.h>
const float MaxWave = 0.2;
bool NextionON = false; bool NextionON = false;
bool PageInfo = false; bool PageInfo = false;
bool gfxON = false;
char buffer[100] = {0}; char buffer[100] = {0};
uint32_t slidermaxval = 20; uint32_t slidermaxval = 20;
char lcd_status_message[30] = WELCOME_MSG; char lcd_status_message[30] = WELCOME_MSG;
...@@ -26,7 +28,7 @@ ...@@ -26,7 +28,7 @@
static millis_t next_lcd_update_ms; static millis_t next_lcd_update_ms;
#if ENABLED(NEXTION_GFX) #if ENABLED(NEXTION_GFX)
GFX gfx = GFX(200, 190); GFX gfx = GFX(196, 194);
#endif #endif
// Page // Page
...@@ -39,10 +41,10 @@ ...@@ -39,10 +41,10 @@
NexPage Pmove = NexPage(6, 0, "move"); NexPage Pmove = NexPage(6, 0, "move");
// Text // Text
NexText Hotend0 = NexText(1, 2, "t0"); NexText Hotend0 = NexText(1, 1, "t0");
NexText Hotend1 = NexText(1, 4, "t1"); NexText Hotend1 = NexText(1, 4, "t1");
NexText Hotend21 = NexText(1, 5, "h2"); NexText Hotend2 = NexText(1, 5, "t2");
NexText Hotend2 = NexText(1, 6, "t2"); NexText Hotend21 = NexText(1, 6, "h2");
NexText LedStatus = NexText(1, 7, "t4"); NexText LedStatus = NexText(1, 7, "t4");
NexText LedCoord = NexText(1, 8, "t5"); NexText LedCoord = NexText(1, 8, "t5");
NexText set0 = NexText(2, 2, "set0"); NexText set0 = NexText(2, 2, "set0");
...@@ -55,15 +57,15 @@ ...@@ -55,15 +57,15 @@
NexText sdfolder = NexText(4, 23, "sdfolder"); NexText sdfolder = NexText(4, 23, "sdfolder");
// Picture // Picture
NexPicture Menu = NexPicture(1, 9, "p0"); NexPicture Menu = NexPicture(1, 10, "p0");
NexPicture MSD = NexPicture(1, 10, "p1"); NexPicture MSD = NexPicture(1, 11, "p1");
NexPicture MSetup = NexPicture(1, 11, "p2"); NexPicture MSetup = NexPicture(1, 12, "p2");
NexPicture Hend0 = NexPicture(1, 12, "p3"); NexPicture Hend0 = NexPicture(1, 13, "p3");
NexPicture Hend1 = NexPicture(1, 14, "p4"); NexPicture Hend1 = NexPicture(1, 14, "p4");
NexPicture Hend2 = NexPicture(1, 16, "p5"); NexPicture Hend2 = NexPicture(1, 15, "p5");
NexPicture Fanpic = NexPicture(1, 18, "p6"); NexPicture Fanpic = NexPicture(1, 19, "p6");
NexPicture NPlay = NexPicture(1, 24, "p7"); NexPicture NPlay = NexPicture(1, 27, "p7");
NexPicture NStop = NexPicture(1, 25, "p8"); NexPicture NStop = NexPicture(1, 28, "p8");
NexPicture Exit1 = NexPicture(3, 4, "p3"); NexPicture Exit1 = NexPicture(3, 4, "p3");
NexPicture Folder0 = NexPicture(4, 9, "p0"); NexPicture Folder0 = NexPicture(4, 9, "p0");
NexPicture Folder1 = NexPicture(4, 10, "p1"); NexPicture Folder1 = NexPicture(4, 10, "p1");
...@@ -84,29 +86,32 @@ ...@@ -84,29 +86,32 @@
NexPicture ZDown = NexPicture(6, 12, "p11"); NexPicture ZDown = NexPicture(6, 12, "p11");
// Progress Bar // Progress Bar
NexProgressBar sdbar = NexProgressBar(1, 23, "j0"); NexProgressBar sdbar = NexProgressBar(1, 26, "j0");
// Slider // Slider
NexSlider sdlist = NexSlider(4, 1, "h0"); NexSlider sdlist = NexSlider(4, 1, "h0");
// Wafeform // Wafeform
NexWaveform Graph0 = NexWaveform(1, 9, "s0");
NexWaveform Graph1 = NexWaveform(1, 24, "s1");
NexWaveform Graph2 = NexWaveform(1, 25, "s2");
// Touch area // Touch area
NexHotspot hot0 = NexHotspot(1, 13, "hot0"); NexHotspot hot0 = NexHotspot(1, 14, "hot0");
NexHotspot hot1 = NexHotspot(1, 15, "hot1"); NexHotspot hot1 = NexHotspot(1, 16, "hot1");
NexHotspot hot2 = NexHotspot(1, 17, "hot2"); NexHotspot hot2 = NexHotspot(1, 18, "hot2");
NexHotspot m11 = NexHotspot(2, 14, "m11"); NexHotspot m11 = NexHotspot(2, 14, "m11");
NexHotspot tup = NexHotspot(2, 16, "tup"); NexHotspot tup = NexHotspot(2, 16, "tup");
NexHotspot tdown = NexHotspot(2, 17, "tdown"); NexHotspot tdown = NexHotspot(2, 17, "tdown");
// Timer // Timer
NexTimer startimer = NexTimer(0, 1, "tm0"); NexTimer startimer = NexTimer(0, 1, "tm0");
NexTimer fantimer = NexTimer(1, 22, "tm0"); NexTimer fantimer = NexTimer(1, 23, "tm0");
// Variable // Variable
NexVar Hotend = NexVar(1, 19, "he"); NexVar Hotend = NexVar(1, 20, "he");
NexVar Bed = NexVar(1, 20, "bed");
NexVar set1 = NexVar(2, 17, "set1"); NexVar set1 = NexVar(2, 17, "set1");
NexVar Bed = NexVar(1, 21, "bed");
NexVar filename0 = NexVar(4, 19, "va0"); NexVar filename0 = NexVar(4, 19, "va0");
NexVar filename1 = NexVar(4, 20, "va1"); NexVar filename1 = NexVar(4, 20, "va1");
NexVar filename2 = NexVar(4, 21, "va2"); NexVar filename2 = NexVar(4, 21, "va2");
...@@ -160,6 +165,14 @@ ...@@ -160,6 +165,14 @@
NULL NULL
}; };
NexWaveform *graph_list[] =
{
&Graph0,
&Graph1,
&Graph2,
NULL
};
NexText *row_list[] = NexText *row_list[] =
{ {
&sdrow0, &sdrow0,
...@@ -198,10 +211,6 @@ ...@@ -198,10 +211,6 @@
PageInfo = true; PageInfo = true;
#if ENABLED(NEXTION_GFX)
gfx_clear(X_MAX_POS, Y_MAX_POS, Z_MAX_POS);
#endif
#if HAS_TEMP_0 #if HAS_TEMP_0
Hotend.setValue(1); Hotend.setValue(1);
#endif #endif
...@@ -269,6 +278,7 @@ ...@@ -269,6 +278,7 @@
static void setpagesdcard() { static void setpagesdcard() {
PageInfo = false; PageInfo = false;
gfxON = false;
Psdcard.show(); Psdcard.show();
uint16_t fileCnt = card.getnrfilenames(); uint16_t fileCnt = card.getnrfilenames();
...@@ -426,10 +436,12 @@ ...@@ -426,10 +436,12 @@
void setpagePopCallback(void *ptr) { void setpagePopCallback(void *ptr) {
if (ptr == &Menu) { if (ptr == &Menu) {
PageInfo = false; PageInfo = false;
gfxON = false;
Pmenu.show(); Pmenu.show();
} }
else if (ptr == &MSetup) { else if (ptr == &MSetup) {
PageInfo = false; PageInfo = false;
gfxON = false;
Psetup.show(); Psetup.show();
} }
...@@ -472,7 +484,7 @@ ...@@ -472,7 +484,7 @@
#endif #endif
void lcd_init() { void lcd_init() {
delay(1000); delay_ms(1000);
NextionON = nexInit(); NextionON = nexInit();
if (!NextionON) { if (!NextionON) {
...@@ -549,6 +561,11 @@ ...@@ -549,6 +561,11 @@
hotend_list[h]->setText(buffer); hotend_list[h]->setText(buffer);
hotend_list[h]->setColor(color); hotend_list[h]->setColor(color);
if (!gfxON) {
graph_list[h]->addValue(0, (int)(T1 * MaxWave));
graph_list[h]->addValue(1, (int)(T2 * MaxWave));
}
} }
static void coordtoLCD() { static void coordtoLCD() {
...@@ -661,17 +678,19 @@ ...@@ -661,17 +678,19 @@
#if ENABLED(NEXTION_GFX) #if ENABLED(NEXTION_GFX)
void gfx_clear(float x, float y, float z) { void gfx_clear(float x, float y, float z) {
if (PageInfo) if (PageInfo) {
gfx.clear(x, y, z); gfx.clear(x, y, z);
gfxON = true;
}
} }
void gfx_cursor_to(float x, float y, float z) { void gfx_cursor_to(float x, float y, float z) {
if (PageInfo) if (PageInfo && gfxON)
gfx.cursor_to(x, y, z); gfx.cursor_to(x, y, z);
} }
void gfx_line_to(float x, float y, float z){ void gfx_line_to(float x, float y, float z){
if (PageInfo) if (PageInfo && gfxON)
gfx.line_to(VC_TOOL, x, y, z); gfx.line_to(VC_TOOL, x, y, z);
} }
#endif #endif
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
* *
*/ */
#include "base.h" #include "../base.h"
#include "Marlin_main.h" #include "../Marlin_main.h"
#include "planner.h" #include "planner.h"
#include "stepper_indirection.h" #include "stepper_indirection.h"
......
#include "base.h" #include "../base.h"
#if ENABLED(AUTO_BED_LEVELING_GRID) #if ENABLED(AUTO_BED_LEVELING_GRID)
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
/* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith /* The timer calculations of this module informed by the 'RepRap cartesian firmware' by Zack Smith
and Philipp Tiefenbacher. */ and Philipp Tiefenbacher. */
#include "base.h" #include "../base.h"
#include "Marlin_main.h" #include "../Marlin_main.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "stepper.h" #include "stepper.h"
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "module/nextion_lcd.h" #include "nextion_lcd.h"
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#include "cardreader.h" #include "cardreader.h"
...@@ -96,7 +96,11 @@ static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROB ...@@ -96,7 +96,11 @@ static volatile char endstop_hit_bits = 0; // use X_MIN, Y_MIN, Z_MIN and Z_PROB
old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_PROBE, Z2_MIN, Z2_MAX, E_MIN old_endstop_bits = 0; // use X_MIN, X_MAX... Z_MAX, Z_PROBE, Z2_MIN, Z2_MAX, E_MIN
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
bool abort_on_endstop_hit = false; #if ENABLED(ABORT_ON_ENDSTOP_HIT_INIT)
bool abort_on_endstop_hit = ABORT_ON_ENDSTOP_HIT_INIT;
#else
bool abort_on_endstop_hit = false;
#endif
#endif #endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_XY) #if PIN_EXISTS(MOTOR_CURRENT_PWM_XY)
...@@ -263,7 +267,16 @@ void endstops_hit_on_purpose() { ...@@ -263,7 +267,16 @@ void endstops_hit_on_purpose() {
void checkHitEndstops() { void checkHitEndstops() {
if (endstop_hit_bits) { if (endstop_hit_bits) {
ECHO_SM(DB, SERIAL_ENDSTOPS_HIT);
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
if (abort_on_endstop_hit)
ECHO_SM(ER, SERIAL_ENDSTOPS_HIT);
else
ECHO_SM(DB, SERIAL_ENDSTOPS_HIT);
#else
ECHO_SM(DB, SERIAL_ENDSTOPS_HIT);
#endif
if (endstop_hit_bits & BIT(X_MIN)) { if (endstop_hit_bits & BIT(X_MIN)) {
ECHO_MV(SERIAL_ENDSTOP_X, (float)endstops_trigsteps[X_AXIS] / axis_steps_per_unit[X_AXIS]); ECHO_MV(SERIAL_ENDSTOP_X, (float)endstops_trigsteps[X_AXIS] / axis_steps_per_unit[X_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_XS); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_XS);
...@@ -290,16 +303,19 @@ void checkHitEndstops() { ...@@ -290,16 +303,19 @@ void checkHitEndstops() {
#endif #endif
ECHO_E; ECHO_E;
endstops_hit_on_purpose(); #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
if (abort_on_endstop_hit && !(endstop_hit_bits & BIT(Z_PROBE)) && !(endstop_hit_bits & BIT(E_MIN))) {
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) && ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
if (abort_on_endstop_hit) { card.sdprinting = false;
card.sdprinting = false; card.closeFile();
card.closeFile(); #endif
quickStop(); for (int i = 0; i < 3; i++) axis_known_position[i] = false; // not homed anymore
disable_all_heaters(); // switch off all heaters. quickStop(); // kill the planner buffer
Stop(); // restart by M999
} }
#endif #endif
endstops_hit_on_purpose();
} }
} }
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
along with Marlin. If not, see <http://www.gnu.org/licenses/>. along with Marlin. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "base.h" #include "../base.h"
#include "stepper_indirection.h" #include "stepper_indirection.h"
#if ENABLED(HAVE_TMCDRIVER) #if ENABLED(HAVE_TMCDRIVER)
#include <SPI.h> #include <SPI.h>
#include <TMC26XStepper.h> #include <TMC26XStepper.h>
......
...@@ -18,13 +18,14 @@ ...@@ -18,13 +18,14 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "base.h" #include "../base.h"
#include "Marlin_main.h" #include "../Marlin_main.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
#endif #endif
#include "ultralcd.h" #include "ultralcd.h"
#include "module/nextion_lcd.h" #include "nextion_lcd.h"
#include "planner.h" #include "planner.h"
#include "stepper_indirection.h" #include "stepper_indirection.h"
#if MB(ALLIGATOR) #if MB(ALLIGATOR)
...@@ -1101,7 +1102,7 @@ void tp_init() { ...@@ -1101,7 +1102,7 @@ void tp_init() {
TIMSK0 |= BIT(OCIE0B); TIMSK0 |= BIT(OCIE0B);
// Wait for temperature measurement to settle // Wait for temperature measurement to settle
delay(250); delay_ms(250);
#define TEMP_MIN_ROUTINE(NR) \ #define TEMP_MIN_ROUTINE(NR) \
minttemp[NR] = HEATER_ ## NR ## _MINTEMP; \ minttemp[NR] = HEATER_ ## NR ## _MINTEMP; \
......
#include "base.h" #include "../base.h"
#include "../Marlin_main.h"
#include "../configuration_store.h"
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
#include "Marlin_main.h"
#include "cardreader.h" #include "cardreader.h"
#include "temperature.h" #include "temperature.h"
...@@ -13,11 +14,10 @@ ...@@ -13,11 +14,10 @@
#include "planner.h" #include "planner.h"
#include "stepper_indirection.h" #include "stepper_indirection.h"
#include "stepper.h" #include "stepper.h"
#include "configuration_store.h"
#include "ultralcd.h" #include "ultralcd.h"
#if HAS(BUZZER) #if HAS(BUZZER)
#include "module/buzzer.h" #include "buzzer.h"
#endif #endif
int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update int8_t encoderDiff; // updated from interrupt context and added to encoderPosition every LCD update
......
#ifndef ULTRALCD_H #ifndef ULTRALCD_H
#define ULTRALCD_H #define ULTRALCD_H
#include "Marlin_main.h" #include "../Marlin_main.h"
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
#if HAS(BUZZER) #if HAS(BUZZER)
#include "module/buzzer.h" #include "buzzer.h"
#endif #endif
int lcd_strlen(char* s); int lcd_strlen(char* s);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include <math.h> #include <math.h>
#include "base.h" #include "../base.h"
#if ENABLED(AUTO_BED_LEVELING_FEATURE) #if ENABLED(AUTO_BED_LEVELING_FEATURE)
#include "vector_3.h" #include "vector_3.h"
......
#include "base.h" #include "../base.h"
#if ENABLED(USE_WATCHDOG) #if ENABLED(USE_WATCHDOG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment