- Fix Mega X pin mapping

- Fix Chiron support
This commit is contained in:
Knutwurst
2021-02-17 16:40:34 +01:00
parent 9b058efa41
commit 7949ab4f51
4 changed files with 55 additions and 28 deletions

View File

@@ -152,6 +152,18 @@
*/
//#define KNUTWURST_DEBUG
/*
* This enabled the integrated leveling features
* in the anycubic touchscreen. It's currently only
* supported by the Anycubic Chiron and therefore it
* is automatically set if the chiron is enabled.
*
* PLEASE READ THE WARNING ABOVE!
*
*/
#if ENABLED(KNUTWURST_CHIRON)
//#define KNUTWURST_TFT_LEVELING
#endif
/*******************************************************************************************
** **
@@ -785,6 +797,8 @@
#endif
#if ENABLED(KNUTWURST_CHIRON)
#define X_MAX_PIN 2
#define Z_MAX_PIN 43
#define USE_ZMAX_PLUG
#endif
@@ -931,7 +945,7 @@
#endif
#if ENABLED(KNUTWURST_MEGA_S)
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 392 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 400 }
#endif
#if ENABLED(KNUTWURST_MEGA_X)
@@ -1172,10 +1186,14 @@
* - normally-open switches to 5V and D32.
*
*/
#if ANY(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
#if ENABLED(KNUTWURST_BLTOUCH)
#define Z_MIN_PROBE_PIN 2 // Pin 32 is the RAMPS default
#endif
#if ENABLED(KNUTWURST_CHIRON)
#define Z_MIN_PROBE_PIN 32
#endif
/**
* Probe Type
*

View File

@@ -434,7 +434,7 @@
#define CHAMBER_AUTO_FAN_PIN -1
#endif
#if ENABLED(KNUTWURST_MEGAX)
#if EITHER(KNUTWURST_MEGA_X, KNUTWURST_CHIRON)
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
@@ -444,7 +444,6 @@
#define CHAMBER_AUTO_FAN_PIN -1
#endif
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
#define CHAMBER_AUTO_FAN_TEMPERATURE 30
@@ -541,7 +540,14 @@
#define Z_MULTI_ENDSTOPS
#endif
#if ENABLED(Z_MULTI_ENDSTOPS)
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_X)
#define Z2_USE_ENDSTOP _XMAX_
#endif
#if ENABLED(KNUTWURST_CHIRON)
#define Z2_USE_ENDSTOP _ZMAX_
#endif
#define Z2_ENDSTOP_ADJUSTMENT 0
#if NUM_Z_STEPPER_DRIVERS >= 3
#define Z3_USE_ENDSTOP _YMAX_
@@ -1574,12 +1580,12 @@
* the probe to be unable to reach any points.
*/
#if ENABLED(KNUTWURST_BLTOUCH)
#if PROBE_SELECTED && !IS_KINEMATIC
#if PROBE_SELECTED && !IS_KINEMATIC
#define MIN_PROBE_EDGE_LEFT 10
#define MIN_PROBE_EDGE_RIGHT 10
#define MIN_PROBE_EDGE_FRONT 10
#define MIN_PROBE_EDGE_BACK 10
#endif
#endif
#endif
#if DISABLED(KNUTWURST_BLTOUCH)

View File

@@ -44,7 +44,7 @@
#define CUSTOM_BUILD_VERSION "1.2.0-Alpha.1"
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2021-01-20"
#define STRING_DISTRIBUTION_DATE "2021-02-17"
#endif
/**

View File

@@ -1889,7 +1889,10 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
* Chiron printer.
*/
#if ENABLED(KNUTWURST_CHIRON_LEVELING)
//#define KNUTWURST_TFT_LEVELING
//#define AUTO_BED_LEVELING_BILINEAR
#if ENABLED(KNUTWURST_TFT_LEVELING)
#ifdef AUTO_BED_LEVELING_BILINEAR
case 29: //A29 bed grid read
@@ -2029,42 +2032,42 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
#if ENABLED(KNUTWURST_MEGA_P_LASER)
case 34:// Continuous printing ʹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ,Ҫ<><D2AA>һЩ׼<D0A9><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>½<EFBFBD>
case 34:// Continuous printing
{
en_continue = 1 ;}
break;
case 35:// Continuous printing ʧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡ
case 35:// Continuous printing
{
en_continue = 0 ;}
break;
case 36://A36 λͼ <20><><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8>ͼ
case 36://A36
if(CodeSeen('S'))
{
int coorvalue;
coorvalue=CodeValueInt();
if(coorvalue!=0)
Laser_printer_st.pic_vector = 1; //<2F><>ʸ<EFBFBD><CAB8>ͼ
Laser_printer_st.pic_vector = 1;
else
Laser_printer_st.pic_vector = 0;//<2F><>λͼ
Laser_printer_st.pic_vector = 0;
}
case 37:
if(CodeSeen('S'))//X<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(CodeSeen('S'))//X
{
int coorvalue;
coorvalue=CodeValueInt();
if(coorvalue == 0)
Laser_printer_st.pic_x_mirror = 0;
else if(coorvalue == 1)
Laser_printer_st.pic_x_mirror = 1; //x<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Laser_printer_st.pic_x_mirror = 1; //x
}
break;
case 38:
if(CodeSeen('S'))//A38 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
if(CodeSeen('S'))//A38
{
int coorvalue;
coorvalue=CodeValueInt();
@@ -2147,35 +2150,35 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
}
break;
case 51:// A51<35>Զ<EFBFBD><D4B6><EFBFBD>ƽ
case 51:
{
if(CodeSeen('H'))//<2F><>һ<EFBFBD><D2BB>
if(CodeSeen('H'))
{
enqueue_and_echo_commands_P(PSTR("G1 Z5 F500"));
enqueue_and_echo_commands_P(PSTR("G1 X30 Y30 F5000"));
enqueue_and_echo_commands_P(PSTR("G1 Z0.15 F300"));
}
else if(CodeSeen('I'))//<2F>ڶ<EFBFBD><DAB6><EFBFBD>
else if(CodeSeen('I'))
{
enqueue_and_echo_commands_P(PSTR("G1 Z5 F500"));
enqueue_and_echo_commands_P(PSTR("G1 X190 Y30 F5000"));
enqueue_and_echo_commands_P(PSTR("G1 Z0.15 F300"));
}
else if(CodeSeen('J'))//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
else if(CodeSeen('J'))
{
enqueue_and_echo_commands_P(PSTR("G1 Z5 F500"));
enqueue_and_echo_commands_P(PSTR("G1 X190 Y190 F5000"));
enqueue_and_echo_commands_P(PSTR("G1 Z0.15 F300"));
}
else if(CodeSeen('K'))//<2F><><EFBFBD>IJ<EFBFBD>
else if(CodeSeen('K'))
{
enqueue_and_echo_commands_P(PSTR("G1 Z5 F500"));
enqueue_and_echo_commands_P(PSTR("G1 X30 Y190 F5000"));
enqueue_and_echo_commands_P(PSTR("G1 Z0.15 F300"));
}
else if(CodeSeen('L'))//<2F><><EFBFBD>IJ<EFBFBD>
else if(CodeSeen('L'))
{
enqueue_and_echo_commands_P(PSTR("G1 X100 Y100 Z50 F5000")); //<2F>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
enqueue_and_echo_commands_P(PSTR("G1 X100 Y100 Z50 F5000"));
}
}
break;