version loaded 2021.02.28

This commit is contained in:
Steve Groesz 2021-12-11 16:28:50 -06:00
parent 7f023d95bb
commit 5623c6cc50
22 changed files with 157 additions and 632 deletions

View File

@ -23,7 +23,7 @@ before_install:
install:
#
# Install arduino 1.8.5
- wget http://downloads.arduino.cc/arduino-1.8.5-linux64.tar.xz
- wget http://downloads-02.arduino.cc/arduino-1.8.5-linux64.tar.xz
- tar xf arduino-1.8.5-linux64.tar.xz
- sudo mv arduino-1.8.5 /usr/local/share/arduino
- ln -s /usr/local/share/arduino/arduino ${TRAVIS_BUILD_DIR}/buildroot/bin/arduino

View File

@ -903,9 +903,7 @@ void AnycubicTFTClass::GetCommandFromTFT()
}
case 8: // A8 GET SD LIST
#ifdef SDSUPPORT
if (!SpecialMenu)
SelectedDirectory[0]=0;
SelectedDirectory[0]=0;
if(!IS_SD_INSERTED())
{
ANYCUBIC_SERIAL_PROTOCOLPGM("J02");
@ -987,8 +985,7 @@ void AnycubicTFTClass::GetCommandFromTFT()
} else if (TFTstrchr_pointer[4] == '<') {
strcpy(SelectedDirectory, TFTstrchr_pointer+4);
} else {
if (!SpecialMenu)
SelectedDirectory[0]=0;
SelectedDirectory[0]=0;
if(starpos!=NULL)
*(starpos-1)='\0';
@ -1169,8 +1166,8 @@ void AnycubicTFTClass::GetCommandFromTFT()
if((!planner.movesplanned())&& (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE))
{
if((current_position[Z_AXIS]<10)) enqueue_and_echo_commands_P(PSTR("G1 Z10")); // RAISE Z AXIS
thermalManager.setTargetBed(PREHEAT_1_TEMP_BED);
thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0);
thermalManager.setTargetBed(50);
thermalManager.setTargetHotend(200, 0);
ANYCUBIC_SERIAL_SUCC_START;
ANYCUBIC_SERIAL_ENTER();
}
@ -1179,8 +1176,8 @@ void AnycubicTFTClass::GetCommandFromTFT()
if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE))
{
if((current_position[Z_AXIS]<10)) enqueue_and_echo_commands_P(PSTR("G1 Z10")); //RAISE Z AXIS
thermalManager.setTargetBed(PREHEAT_2_TEMP_BED);
thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0);
thermalManager.setTargetBed(80);
thermalManager.setTargetHotend(240, 0);
ANYCUBIC_SERIAL_SUCC_START;
ANYCUBIC_SERIAL_ENTER();
@ -1214,8 +1211,7 @@ void AnycubicTFTClass::GetCommandFromTFT()
}
}
if (!SpecialMenu)
SelectedDirectory[0]=0;
SelectedDirectory[0]=0;
if(!IS_SD_INSERTED())
{

View File

@ -477,45 +477,11 @@
#endif
#undef Z_SERVO_ANGLES
#define Z_SERVO_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
#define BLTOUCH_ANGLES { BLTOUCH_DEPLOY, BLTOUCH_STOW }
#define BLTOUCH_DEPLOY 10
#define BLTOUCH_SW_MODE 60
#define BLTOUCH_STOW 90
#define BLTOUCH_SELFTEST 120
#define BLTOUCH_MODE_STORE 130
#define BLTOUCH_5V_MODE 140
#define BLTOUCH_OD_MODE 150
#define BLTOUCH_RESET 160
/**
* The following commands require different minimum delays.
*
* 500ms required for a reliable Reset.
*
* 750ms required for Deploy/Stow, otherwise the alarm state
* will not be seen until the following move command.
*/
#ifndef BLTOUCH_SET5V_DELAY
#define BLTOUCH_SET5V_DELAY 150
#endif
#ifndef BLTOUCH_SETOD_DELAY
#define BLTOUCH_SETOD_DELAY 150
#endif
#ifndef BLTOUCH_MODE_STORE_DELAY
#define BLTOUCH_MODE_STORE_DELAY 150
#endif
#ifndef BLTOUCH_DEPLOY_DELAY
#define BLTOUCH_DEPLOY_DELAY 750
#endif
#ifndef BLTOUCH_STOW_DELAY
#define BLTOUCH_STOW_DELAY 750
#endif
#ifndef BLTOUCH_RESET_DELAY
#define BLTOUCH_RESET_DELAY 500
#endif
#define BLTOUCH_DEPLOY 10
#define BLTOUCH_STOW 90
#define BLTOUCH_SELFTEST 120
#define BLTOUCH_RESET 160
#define _TEST_BLTOUCH(P) (READ(P##_PIN) != P##_ENDSTOP_INVERTING)
// Always disable probe pin inverting for BLTouch

View File

@ -379,10 +379,15 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// i3 Mega w/Phaetus Dragon hotend, 40W heater cartridge
#define DEFAULT_Kp 18.07
#define DEFAULT_Ki 1.21
#define DEFAULT_Kd 67.74
// i3 Mega stock v5 hotend, 40W heater cartridge (3.6Ω @ 22°C)
#define DEFAULT_Kp 15.94
#define DEFAULT_Ki 1.17
#define DEFAULT_Kd 54.19
//#define DEFAULT_Kp 15.94
//#define DEFAULT_Ki 1.17
//#define DEFAULT_Kd 54.19
// Ultimaker
//#define DEFAULT_Kp 22.2
@ -614,14 +619,15 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 92.6 }
//#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 92.6 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 414.10 }
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#define DEFAULT_MAX_FEEDRATE { 500, 500, 6, 60 }
#define DEFAULT_MAX_FEEDRATE { 500, 120, 6, 60 }
/**
* Default Max Acceleration (change/s) change = mm/s
@ -734,6 +740,9 @@
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
//#define BLTOUCH
#if ENABLED(BLTOUCH)
//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
#endif
/**
* Enable one or more of the following if probing seems unreliable.
@ -779,8 +788,8 @@
* O-- FRONT --+
* (0,0)
*/
#define X_PROBE_OFFSET_FROM_EXTRUDER 10 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER 10 // Y offset: -front +behind [the nozzle]
#define X_PROBE_OFFSET_FROM_EXTRUDER -9 // X offset: -left +right [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -22 // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Certain types of probes need to stay away from edges
@ -1394,11 +1403,11 @@
*
* Select the language to display on the LCD. These languages are available:
*
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8, eu,
* fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, ko_KR, nl, pl, pt,
* en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, es_utf8,
* eu, fi, fr, fr_utf8, gl, hr, it, kana, kana_utf8, nl, pl, pt,
* pt_utf8, pt-br, pt-br_utf8, ru, sk_utf8, tr, uk, zh_CN, zh_TW, test
*
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'ko_KR':'Korean', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
* :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'cz_utf8':'Czech (UTF8)', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'es_utf8':'Spanish (UTF8)', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'fr_utf8':'French (UTF8)', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'sk_utf8':'Slovak (UTF8)', 'tr':'Turkish', 'uk':'Ukrainian', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Taiwan)', 'test':'TEST' }
*/
//#define LCD_LANGUAGE en

View File

@ -394,65 +394,6 @@
// Enable this if X or Y can't home without homing the other axis first.
//#define CODEPENDENT_XY_HOMING
#if ENABLED(BLTOUCH)
/**
* Either: Use the defaults (recommended) or: For special purposes, use the following DEFINES
* Do not activate settings that the probe might not understand. Clones might misunderstand
* advanced commands.
*
* Note: If the probe is not deploying, check a "Cmd: Reset" and "Cmd: Self-Test" and then
* check the wiring of the BROWN, RED and ORANGE wires.
*
* Note: If the trigger signal of your probe is not being recognized, it has been very often
* because the BLACK and WHITE wires needed to be swapped. They are not "interchangeable"
* like they would be with a real switch. So please check the wiring first.
*
* Settings for all BLTouch and clone probes:
*/
// Safety: The probe needs time to recognize the command.
// Minimum command delay (ms). Enable and increase if needed.
//#define BLTOUCH_DELAY 500
/**
* Settings for BLTOUCH Classic 1.2, 1.3 or BLTouch Smart 1.0, 2.0, 2.2, 3.0, 3.1, and most clones:
*/
// Feature: Switch into SW mode after a deploy. It makes the output pulse longer. Can be useful
// in special cases, like noisy or filtered input configurations.
//#define BLTOUCH_FORCE_SW_MODE
/**
* Settings for BLTouch Smart 3.0 and 3.1
* Summary:
* - Voltage modes: 5V and OD (open drain - "logic voltage free") output modes
* - High-Speed mode
* - Disable LCD voltage options
*/
/**
* Danger: Don't activate 5V mode unless attached to a 5V-tolerant controller!
* V3.0 or 3.1: Set default mode to 5V mode at Marlin startup.
* If disabled, OD mode is the hard-coded default on 3.0
* On startup, Marlin will compare its eeprom to this vale. If the selected mode
* differs, a mode set eeprom write will be completed at initialization.
* Use the option below to force an eeprom write to a V3.1 probe regardless.
*/
//#define BLTOUCH_SET_5V_MODE
/**
* Safety: Activate if connecting a probe with an unknown voltage mode.
* V3.0: Set a probe into mode selected above at Marlin startup. Required for 5V mode on 3.0
* V3.1: Force a probe with unknown mode into selected mode at Marlin startup ( = Probe EEPROM write )
* To preserve the life of the probe, use this once then turn it off and re-flash.
*/
//#define BLTOUCH_FORCE_MODE_SET
// Safety: Enable voltage mode settings in the LCD menu.
//#define BLTOUCH_LCD_VOLTAGE_MENU
#endif // BLTOUCH
// @section machine
#define AXIS_RELATIVE_MODES {false, false, false, false}

View File

@ -2079,240 +2079,40 @@ void clean_up_after_endstop_or_probe_move() {
#if ENABLED(BLTOUCH)
typedef unsigned char BLTCommand;
void bltouch_init(const bool set_voltage=false);
bool bltouch_last_written_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain
bool bltouch_triggered() {
return (
#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN)
READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING
#else
READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING
#endif
);
}
bool bltouch_command(const BLTCommand cmd, const millis_t &ms) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd);
#endif
MOVE_SERVO(Z_PROBE_SERVO_NR, cmd);
safe_delay(MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay
return bltouch_triggered();
}
// Native BLTouch commands ("Underscore"...), used in lcd menus and internally
void _bltouch_reset() { bltouch_command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY); }
void _bltouch_selftest() { bltouch_command(BLTOUCH_SELFTEST, BLTOUCH_DELAY); }
void _bltouch_set_SW_mode() { bltouch_command(BLTOUCH_SW_MODE, BLTOUCH_DELAY); }
void _bltouch_set_5V_mode() { bltouch_command(BLTOUCH_5V_MODE, BLTOUCH_SET5V_DELAY); }
void _bltouch_set_OD_mode() { bltouch_command(BLTOUCH_OD_MODE, BLTOUCH_SETOD_DELAY); }
void _bltouch_mode_store() { bltouch_command(BLTOUCH_MODE_STORE, BLTOUCH_MODE_STORE_DELAY); }
void _bltouch_deploy() { bltouch_command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); }
void _bltouch_stow() { bltouch_command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); }
void _bltouch_reset_SW_mode() { if (bltouch_triggered()) _bltouch_stow(); else _bltouch_deploy(); }
bool _bltouch_deploy_query_alarm() { return bltouch_command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); }
bool _bltouch_stow_query_alarm() { return bltouch_command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); }
void bltouch_clear() {
_bltouch_reset(); // RESET or RESET_SW will clear an alarm condition but...
// ...it will not clear a triggered condition in SW mode when the pin is currently up
// ANTClabs <-- CODE ERROR
_bltouch_stow(); // STOW will pull up the pin and clear any triggered condition unless it fails, don't care
_bltouch_deploy(); // DEPLOY to test the probe. Could fail, don't care
_bltouch_stow(); // STOW to be ready for meaningful work. Could fail, don't care
}
bool bltouch_deploy_proc() {
// Do a DEPLOY
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch DEPLOY requested");
#endif
// Attempt to DEPLOY, wait for DEPLOY_DELAY or ALARM
if (_bltouch_deploy_query_alarm()) {
// The deploy might have failed or the probe is already triggered (nozzle too low?)
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch ALARM or TRIGGER after DEPLOY, recovering");
#endif
bltouch_clear(); // Get the probe into start condition
// Last attempt to DEPLOY
if (_bltouch_deploy_query_alarm()) {
// The deploy might have failed or the probe is actually triggered (nozzle too low?) again
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Recovery Failed");
#endif
SERIAL_ECHOLN(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart
return true; // Tell our caller we goofed in case he cares to know
}
}
// One of the recommended ANTClabs ways to probe, using SW MODE
#if ENABLED(BLTOUCH_FORCE_SW_MODE)
_bltouch_set_SW_mode();
#endif
// Now the probe is ready to issue a 10ms pulse when the pin goes up.
// The trigger STOW (see motion.cpp for example) will pull up the probes pin as soon as the pulse
// is registered.
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("bltouch.deploy_proc() end");
#endif
return false; // report success to caller
}
bool bltouch_stow_proc() {
// Do a STOW
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch STOW requested");
#endif
// A STOW will clear a triggered condition in the probe (10ms pulse).
// At the moment that we come in here, we might (pulse) or will (SW mode) see the trigger on the pin.
// So even though we know a STOW will be ignored if an ALARM condition is active, we will STOW.
// Note: If the probe is deployed AND in an ALARM condition, this STOW will not pull up the pin
// and the ALARM condition will still be there. --> ANTClabs should change this behavior maybe
// Attempt to STOW, wait for STOW_DELAY or ALARM
if (_bltouch_stow_query_alarm()) {
// The stow might have failed
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch ALARM or TRIGGER after STOW, recovering");
#endif
_bltouch_reset(); // This RESET will then also pull up the pin. If it doesn't
// work and the pin is still down, there will no longer be
// an ALARM condition though.
// But one more STOW will catch that
// Last attempt to STOW
if (_bltouch_stow_query_alarm()) { // so if there is now STILL an ALARM condition:
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Recovery Failed");
#endif
SERIAL_ECHOLN(MSG_STOP_BLTOUCH); // Tell the user something is wrong, needs action
stop(); // but it's not too bad, no need to kill, allow restart
return true; // Tell our caller we goofed in case he cares to know
}
}
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("bltouch.stow_proc() end");
#endif
return false; // report success to caller
}
bool bltouch_status_proc() {
/**
* Return a TRUE for "YES, it is DEPLOYED"
* This function will ensure switch state is reset after execution
*/
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch STATUS requested");
#endif
_bltouch_set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm
const bool tr = bltouch_triggered(); // If triggered in SW mode, the pin is up, it is STOWED
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch is ", (int)tr);
#endif
if (tr) _bltouch_stow(); else _bltouch_deploy(); // Turn off SW mode, reset any trigger, honor pin state
return !tr;
}
void bltouch_mode_conv_proc(const bool M5V) {
/**
* BLTOUCH pre V3.0 and clones: No reaction at all to this sequence apart from a DEPLOY -> STOW
* BLTOUCH V3.0: This will set the mode (twice) and sadly, a STOW is needed at the end, because of the deploy
* BLTOUCH V3.1: This will set the mode and store it in the eeprom. The STOW is not needed but does not hurt
*/
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Set Mode - ", (int)M5V);
#endif
_bltouch_deploy();
if (M5V) _bltouch_set_5V_mode(); else _bltouch_set_OD_mode();
_bltouch_mode_store();
if (M5V) _bltouch_set_5V_mode(); else _bltouch_set_OD_mode();
_bltouch_stow();
bltouch_last_written_mode = M5V;
void bltouch_command(int angle) {
MOVE_SERVO(Z_PROBE_SERVO_NR, angle); // Give the BL-Touch the command and wait
safe_delay(BLTOUCH_DELAY);
}
bool set_bltouch_deployed(const bool deploy) {
if (deploy) _bltouch_deploy(); else _bltouch_stow();
if (deploy && TEST_BLTOUCH()) { // If BL-Touch says it's triggered
bltouch_command(BLTOUCH_RESET); // try to reset it.
bltouch_command(BLTOUCH_DEPLOY); // Also needs to deploy and stow to
bltouch_command(BLTOUCH_STOW); // clear the triggered condition.
safe_delay(1500); // Wait for internal self-test to complete.
// (Measured completion time was 0.65 seconds
// after reset, deploy, and stow sequence)
if (TEST_BLTOUCH()) { // If it still claims to be triggered...
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
stop(); // punt!
return true;
}
}
bltouch_command(deploy ? BLTOUCH_DEPLOY : BLTOUCH_STOW);
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("set_bltouch_deployed(", deploy);
SERIAL_CHAR(')');
SERIAL_EOL();
}
#endif
return false;
}
void bltouch_mode_conv_5V() { bltouch_mode_conv_proc(true); }
void bltouch_mode_conv_OD() { bltouch_mode_conv_proc(false); }
// DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing
bool bltouch_deploy() { return bltouch_deploy_proc(); }
bool bltouch_stow() { return bltouch_stow_proc(); }
bool bltouch_status() { return bltouch_status_proc(); }
// Init the class and device. Call from setup().
void bltouch_init(const bool set_voltage/*=false*/) {
// Voltage Setting (if enabled). At every Marlin initialization:
// BLTOUCH < V3.0 and clones: This will be ignored by the probe
// BLTOUCH V3.0: SET_5V_MODE or SET_OD_MODE (if enabled).
// OD_MODE is the default on power on, but setting it does not hurt
// This mode will stay active until manual SET_OD_MODE or power cycle
// BLTOUCH V3.1: SET_5V_MODE or SET_OD_MODE (if enabled).
// At power on, the probe will default to the eeprom settings configured by the user
_bltouch_reset();
_bltouch_stow();
#if ENABLED(BLTOUCH_FORCE_MODE_SET)
constexpr bool should_set = true;
#else
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOLNPAIR("last_written_mode - ", int(bltouch_last_written_mode));
SERIAL_ECHOLNPGM("config mode - "
#if ENABLED(BLTOUCH_SET_5V_MODE)
"BLTOUCH_SET_5V_MODE"
#else
"OD"
#endif
);
}
#endif
const bool should_set = bltouch_last_written_mode != (false
#if ENABLED(BLTOUCH_SET_5V_MODE)
|| true
#endif
);
#endif
if (should_set && set_voltage)
bltouch_mode_conv_proc((false
#if ENABLED(BLTOUCH_SET_5V_MODE)
|| true
#endif
));
}
#endif // BLTOUCH
/**
@ -3715,8 +3515,7 @@ inline void gcode_G0_G1(
const float e = clockwise ^ (r < 0) ? -1 : 1, // clockwise -1/1, counterclockwise 1/-1
dx = p2 - p1, dy = q2 - q1, // X and Y differences
d = HYPOT(dx, dy), // Linear distance between the points
h2 = (r - 0.5f * d) * (r + 0.5f * d), // factor to reduce rounding error
h = (h2 >= 0) ? SQRT(h2) : 0.0f, // Distance to the arc pivot-point
h = SQRT(sq(r) - sq(d * 0.5f)), // Distance to the arc pivot-point
mx = (p1 + p2) * 0.5f, my = (q1 + q2) * 0.5f, // Point between the two points
sx = -dy / d, sy = dx / d, // Slope of the perpendicular bisector
cx = mx + e * h * sx, cy = my + e * h * sy; // Pivot-point of the arc
@ -4464,7 +4263,7 @@ inline void gcode_G28(const bool always_home_all) {
#if ENABLED(BLTOUCH)
// Make sure any BLTouch error condition is cleared
bltouch_command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY);
bltouch_command(BLTOUCH_RESET);
set_bltouch_deployed(false);
#endif
@ -5763,12 +5562,7 @@ void home_all_axes() { gcode_G28(true); }
// Unapply the offset because it is going to be immediately applied
// and cause compensation movement in Z
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
const float fade_scaling_factor = planner.fade_scaling_factor_for_z(current_position[Z_AXIS]);
#else
constexpr float fade_scaling_factor = 1.0f;
#endif
current_position[Z_AXIS] -= fade_scaling_factor * bilinear_z_offset(current_position);
current_position[Z_AXIS] -= bilinear_z_offset(current_position);
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR(" corrected Z:", current_position[Z_AXIS]);
@ -8664,9 +8458,9 @@ inline void gcode_M109() {
#endif
}
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.HeatingStart();
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.HeatingStart();
#endif
#if ENABLED(AUTOTEMP)
planner.autotemp_M104_M109();
@ -8782,7 +8576,7 @@ inline void gcode_M109() {
}
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.HeatingDone();
AnycubicTFT.HeatingDone();
#endif
#if DISABLED(BUSY_WHILE_HEATING)
@ -8828,10 +8622,9 @@ inline void gcode_M109() {
}
else return;
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingStart();
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingStart();
#endif
lcd_setstatusPGM(thermalManager.isHeatingBed() ? PSTR(MSG_BED_HEATING) : PSTR(MSG_BED_COOLING));
#if TEMP_BED_RESIDENCY_TIME > 0
@ -8905,7 +8698,7 @@ inline void gcode_M109() {
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
AnycubicTFT.CommandScan();
#endif
#if TEMP_BED_RESIDENCY_TIME > 0
@ -8937,7 +8730,7 @@ inline void gcode_M109() {
} while (wait_for_heatup && TEMP_BED_CONDITIONS);
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.BedHeatingDone();
AnycubicTFT.BedHeatingDone();
#endif
if (wait_for_heatup) lcd_reset_status();
@ -8945,8 +8738,8 @@ inline void gcode_M109() {
KEEPALIVE_STATE(IN_HANDLER);
#endif
// flush the serial buffer after heating to prevent lockup by m105
//SERIAL_FLUSH();
// flush the serial buffer after heating to prevent lockup by m105
//SERIAL_FLUSH();
}
#endif // HAS_HEATED_BED
@ -9144,7 +8937,7 @@ inline void gcode_M111() {
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
AnycubicTFT.CommandScan();
#endif
}
@ -9180,7 +8973,7 @@ inline void gcode_M81() {
#endif
#ifdef ANYCUBIC_TFT_MODEL
AnycubicTFT.CommandScan();
AnycubicTFT.CommandScan();
#endif
}
@ -15071,7 +14864,7 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
#endif
#if ENABLED(ANYCUBIC_TFT_MODEL) && ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
AnycubicTFT.FilamentRunout();
AnycubicTFT.FilamentRunout();
#endif
if (commands_in_queue < BUFSIZE) get_available_commands();
@ -15610,7 +15403,7 @@ void setup() {
#if ENABLED(BLTOUCH)
// Make sure any BLTouch error condition is cleared
bltouch_command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY);
bltouch_command(BLTOUCH_RESET);
set_bltouch_deployed(false);
#endif
@ -15656,7 +15449,7 @@ void setup() {
enable_D();
#endif
#if ENABLED(SDSUPPORT) && !(ENABLED(ULTRA_LCD) && PIN_EXISTS(SD_DETECT))
#if ENABLED(SDSUPPORT) && DISABLED(ULTRA_LCD)
card.beginautostart();
#endif
}

View File

@ -35,13 +35,13 @@
/**
* Marlin release version identifier
*/
#define SHORT_BUILD_VERSION "1.1.9.1"
#define SHORT_BUILD_VERSION "1.1.9"
/**
* Defines the version of the Marlin-AI3M build. Not to be confused with
* Marlin's own build number, e.g. 1.1.9.
*/
#define CUSTOM_BUILD_VERSION "v1.4.7"
#define CUSTOM_BUILD_VERSION "v1.4.6"
/**
* Verbose version identifier which should contain a reference to the location
@ -54,7 +54,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2020-11-01"
#define STRING_DISTRIBUTION_DATE "2019-04-03"
/**
* Required minimum Configuration.h and Configuration_adv.h file versions.

View File

@ -63,7 +63,6 @@
#define BOARD_MKS_BASE_HEROIC 41 // MKS BASE 1.0 with Heroic HR4982 stepper drivers
#define BOARD_MKS_GEN_13 47 // MKS GEN v1.3 or 1.4
#define BOARD_MKS_GEN_L 53 // MKS GEN L
#define BOARD_MKS_GEN_L_V2 54 // MKS GEN L V2
#define BOARD_ZRIB_V20 504 // zrib V2.0 control board (Chinese knock off RAMPS replica)
#define BOARD_FELIX2 37 // Felix 2.0+ Electronics Board (RAMPS like)
#define BOARD_RIGIDBOARD 42 // Invent-A-Part RigidBoard

View File

@ -37,7 +37,7 @@
*/
// Change EEPROM version if the structure changes
#define EEPROM_VERSION "V56"
#define EEPROM_VERSION "V55"
#define EEPROM_OFFSET 100
// Check the integrity of data offsets.
@ -77,10 +77,6 @@
#define LPQ_LEN thermalManager.lpq_len
#endif
#if ENABLED(BLTOUCH)
extern bool bltouch_last_written_mode;
#endif
#pragma pack(push, 1) // No padding between variables
typedef struct PID { float Kp, Ki, Kd; } PID;
@ -163,11 +159,6 @@ typedef struct SettingsDataStruct {
bool planner_leveling_active; // M420 S planner.leveling_active
int8_t ubl_storage_slot; // ubl.storage_slot
//
// BLTOUCH
//
bool bltouch_last_written_mode;
//
// DELTA / [XYZ]_DUAL_ENDSTOPS
//
@ -363,6 +354,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(EEPROM_SETTINGS)
#define DUMMY_PID_VALUE 3000.0f
#define EEPROM_START() int eeprom_index = EEPROM_OFFSET
#define EEPROM_SKIP(VAR) eeprom_index += sizeof(VAR)
#define EEPROM_WRITE(VAR) write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc)
@ -581,20 +573,6 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(storage_slot);
#endif // AUTO_BED_LEVELING_UBL
//
// BLTOUCH
//
{
_FIELD_TEST(bltouch_last_written_mode);
#if ENABLED(BLTOUCH)
const bool &eeprom_bltouch_last_written_mode = bltouch_last_written_mode;
#else
constexpr bool eeprom_bltouch_last_written_mode = false;
#endif
EEPROM_WRITE(eeprom_bltouch_last_written_mode);
}
// 11 floats for DELTA / [XYZ]_DUAL_ENDSTOPS
#if ENABLED(DELTA)
@ -679,7 +657,7 @@ void MarlinSettings::postprocess() {
else
#endif // !PIDTEMP
{
dummy = NAN; // When read, will not change the existing value
dummy = DUMMY_PID_VALUE; // When read, will not change the existing value
EEPROM_WRITE(dummy); // Kp
dummy = 0;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy); // Ki, Kd, Kc
@ -695,7 +673,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(LPQ_LEN);
#if DISABLED(PIDTEMPBED)
dummy = NAN;
dummy = DUMMY_PID_VALUE;
for (uint8_t q = 3; q--;) EEPROM_WRITE(dummy);
#else
EEPROM_WRITE(thermalManager.bedKp);
@ -1213,19 +1191,6 @@ void MarlinSettings::postprocess() {
EEPROM_READ(dummyui8);
#endif // AUTO_BED_LEVELING_UBL
//
// BLTOUCH
//
{
_FIELD_TEST(bltouch_last_written_mode);
#if ENABLED(BLTOUCH)
bool &eeprom_bltouch_last_written_mode = bltouch_last_written_mode;
#else
bool eeprom_bltouch_last_written_mode;
#endif
EEPROM_READ(eeprom_bltouch_last_written_mode);
}
//
// DELTA Geometry or Dual Endstops offsets
//
@ -1302,7 +1267,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(PIDTEMP)
for (uint8_t e = 0; e < MAX_EXTRUDERS; e++) {
EEPROM_READ(dummy); // Kp
if (e < HOTENDS && !isnan(dummy)) {
if (e < HOTENDS && dummy != DUMMY_PID_VALUE) {
// do not need to scale PID values as the values in EEPROM are already scaled
if (!validating) PID_PARAM(Kp, e) = dummy;
EEPROM_READ(PID_PARAM(Ki, e));
@ -1339,7 +1304,7 @@ void MarlinSettings::postprocess() {
#if ENABLED(PIDTEMPBED)
EEPROM_READ(dummy); // bedKp
if (!isnan(dummy)) {
if (dummy != DUMMY_PID_VALUE) {
if (!validating) thermalManager.bedKp = dummy;
EEPROM_READ(thermalManager.bedKi);
EEPROM_READ(thermalManager.bedKd);

View File

@ -316,10 +316,6 @@ static void print_es_state(const bool is_hit, const char * const label=NULL) {
}
void _O2 Endstops::M119() {
#if ENABLED(BLTOUCH)
extern void _bltouch_set_SW_mode();
_bltouch_set_SW_mode();
#endif
SERIAL_PROTOCOLLNPGM(MSG_M119_REPORT);
#define ES_REPORT(S) print_es_state(READ(S##_PIN) != S##_ENDSTOP_INVERTING, PSTR(MSG_##S))
#if HAS_X_MIN
@ -387,10 +383,6 @@ void _O2 Endstops::M119() {
}
#endif
#endif
#if ENABLED(BLTOUCH)
extern void _bltouch_reset_SW_mode();
_bltouch_reset_SW_mode();
#endif
} // Endstops::M119
// The following routines are called from an ISR context. It could be the temperature ISR, the

View File

@ -68,10 +68,8 @@
// it Italian
// kana Japanese
// kana_utf8 Japanese (UTF8)
// ko_kr Korean
// nl Dutch
// pl Polish
// pl_utf8 Polish (UTF8)
// pt Portuguese
// pt-br Portuguese (Brazilian)
// pt-br_utf8 Portuguese (Brazilian) (UTF8)
@ -323,7 +321,6 @@
&& DISABLED(DISPLAY_CHARSET_ISO10646_1) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_5) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_KANA) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_KO_KR) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_GREEK) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_CN) \
&& DISABLED(DISPLAY_CHARSET_ISO10646_TR) \

View File

@ -757,40 +757,16 @@
#define MSG_BLTOUCH _UxGT("BLTouch")
#endif
#ifndef MSG_BLTOUCH_SELFTEST
#define MSG_BLTOUCH_SELFTEST _UxGT("Cmd: Self-Test")
#define MSG_BLTOUCH_SELFTEST _UxGT("BLTouch Self-Test")
#endif
#ifndef MSG_BLTOUCH_RESET
#define MSG_BLTOUCH_RESET _UxGT("Cmd: Reset")
#endif
#ifndef MSG_BLTOUCH_STOW
#define MSG_BLTOUCH_STOW _UxGT("Cmd: Stow")
#define MSG_BLTOUCH_RESET _UxGT("Reset BLTouch")
#endif
#ifndef MSG_BLTOUCH_DEPLOY
#define MSG_BLTOUCH_DEPLOY _UxGT("Cmd: Deploy")
#define MSG_BLTOUCH_DEPLOY _UxGT("Deploy BLTouch")
#endif
#ifndef MSG_BLTOUCH_SW_MODE
#define MSG_BLTOUCH_SW_MODE _UxGT("Cmd: SW-Mode")
#endif
#ifndef MSG_BLTOUCH_5V_MODE
#define MSG_BLTOUCH_5V_MODE _UxGT("Cmd: 5V-Mode")
#endif
#ifndef MSG_BLTOUCH_OD_MODE
#define MSG_BLTOUCH_OD_MODE _UxGT("Cmd: OD-Mode")
#endif
#ifndef MSG_BLTOUCH_MODE_STORE
#define MSG_BLTOUCH_MODE_STORE _UxGT("Cmd: Mode-Store")
#endif
#ifndef MSG_BLTOUCH_MODE_STORE_5V
#define MSG_BLTOUCH_MODE_STORE_5V _UxGT("Set BLTouch to 5V")
#endif
#ifndef MSG_BLTOUCH_MODE_STORE_OD
#define MSG_BLTOUCH_MODE_STORE_OD _UxGT("Set BLTouch to OD")
#endif
#ifndef MSG_BLTOUCH_MODE_ECHO
#define MSG_BLTOUCH_MODE_ECHO _UxGT("Report Drain")
#endif
#ifndef MSG_BLTOUCH_MODE_CHANGE
#define MSG_BLTOUCH_MODE_CHANGE _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?")
#ifndef MSG_BLTOUCH_STOW
#define MSG_BLTOUCH_STOW _UxGT("Stow BLTouch")
#endif
#ifndef MSG_HOME
#define MSG_HOME _UxGT("Home") // Used as MSG_HOME " " MSG_X MSG_Y MSG_Z " " MSG_FIRST

View File

@ -135,7 +135,7 @@
#define MSG_UBL_INVALIDATE_ALL _UxGT("Invalidar tudo")
#define MSG_UBL_INVALIDATE_CLOSEST _UxGT("Invalidar próximo")
#define MSG_UBL_FINE_TUNE_ALL _UxGT("Ajuste Fino de Todos")
#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajustar Mais Próximo")
#define MSG_UBL_FINE_TUNE_CLOSEST _UxGT("Ajuar Mais Próximo")
#define MSG_UBL_STORAGE_MESH_MENU _UxGT("Armazenamento Malha")
#define MSG_UBL_STORAGE_SLOT _UxGT("Slot de Memória")
#define MSG_UBL_LOAD_MESH _UxGT("Ler Malha")
@ -326,7 +326,7 @@
#define MSG_CASE_LIGHT_BRIGHTNESS _UxGT("Intensidade Brilho")
#define MSG_INFO_PRINT_COUNT _UxGT("Qtd Impressões")
#define MSG_INFO_COMPLETED_PRINTS _UxGT("Completas")
#define MSG_INFO_PRINT_TIME _UxGT("Tempo de Impressão")
#define MSG_INFO_PRINT_TIME _UxGT("Tempo de Imprimindo")
#define MSG_INFO_PRINT_LONGEST _UxGT("Impressão Mais Longa")
#define MSG_INFO_PRINT_FILAMENT _UxGT("Depositado")
#define MSG_INFO_MIN_TEMP _UxGT("Temp Min")
@ -371,7 +371,7 @@
#define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Esperando impressão")
#define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("continuar")
#else // LCD_HEIGHT < 4
#else LCD_HEIGHT < 4
#define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Aguarde...")
#define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Ejetando...")
#define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Insira e Clique")

View File

@ -140,8 +140,6 @@
#include "pins_TRIGORILLA_14.h" // ATmega2560 env:megaatmega2560
#elif MB(RAMPS_ENDER_4)
#include "pins_RAMPS_ENDER_4.h" // ATmega2560 env:megaatmega2560
#elif MB(MKS_GEN_L_V2)
#include "pins_MKS_GEN_L_V2.h" // ATmega2560 env:megaatmega2560
//
// Other ATmega1280, ATmega2560

View File

@ -56,16 +56,12 @@
// Servos
//
#ifdef IS_RAMPS_13
#define SERVO0_PIN 7 // RAMPS_13
#define SERVO0_PIN 7 // RAMPS_13 // Will conflict with BTN_EN2 on LCD_I2C_VIKI
#else
#define SERVO0_PIN 11
#endif
#ifndef SERVO1_PIN
#define SERVO1_PIN 6
#endif
#ifndef SERVO2_PIN
#define SERVO2_PIN 5
#endif
#define SERVO1_PIN 6
#define SERVO2_PIN 5
#ifndef SERVO3_PIN
#define SERVO3_PIN 4
#endif
@ -165,75 +161,31 @@
* Software serial
*/
#ifndef X_SERIAL_TX_PIN
#define X_SERIAL_TX_PIN 40
#endif
#ifndef X_SERIAL_RX_PIN
#define X_SERIAL_RX_PIN 63
#endif
#ifndef X2_SERIAL_TX_PIN
#define X2_SERIAL_TX_PIN -1
#endif
#ifndef X2_SERIAL_RX_PIN
#define X2_SERIAL_RX_PIN -1
#endif
#define X_SERIAL_TX_PIN 40
#define X_SERIAL_RX_PIN 63
#define X2_SERIAL_TX_PIN -1
#define X2_SERIAL_RX_PIN -1
#ifndef Y_SERIAL_TX_PIN
#define Y_SERIAL_TX_PIN 59
#endif
#ifndef Y_SERIAL_RX_PIN
#define Y_SERIAL_RX_PIN 64
#endif
#ifndef Y2_SERIAL_TX_PIN
#define Y2_SERIAL_TX_PIN -1
#endif
#ifndef Y2_SERIAL_RX_PIN
#define Y2_SERIAL_RX_PIN -1
#endif
#define Y_SERIAL_TX_PIN 59
#define Y_SERIAL_RX_PIN 64
#define Y2_SERIAL_TX_PIN -1
#define Y2_SERIAL_RX_PIN -1
#ifndef Z_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN 42
#endif
#ifndef Z_SERIAL_RX_PIN
#define Z_SERIAL_RX_PIN 65
#endif
#ifndef Z2_SERIAL_TX_PIN
#define Z2_SERIAL_TX_PIN -1
#endif
#ifndef Z2_SERIAL_RX_PIN
#define Z2_SERIAL_RX_PIN -1
#endif
#define Z_SERIAL_TX_PIN 42
#define Z_SERIAL_RX_PIN 65
#define Z2_SERIAL_TX_PIN -1
#define Z2_SERIAL_RX_PIN -1
#ifndef E0_SERIAL_TX_PIN
#define E0_SERIAL_TX_PIN 44
#endif
#ifndef E0_SERIAL_RX_PIN
#define E0_SERIAL_RX_PIN 66
#endif
#ifndef E1_SERIAL_TX_PIN
#define E1_SERIAL_TX_PIN -1
#endif
#ifndef E1_SERIAL_RX_PIN
#define E1_SERIAL_RX_PIN -1
#endif
#ifndef E2_SERIAL_TX_PIN
#define E2_SERIAL_TX_PIN -1
#endif
#ifndef E2_SERIAL_RX_PIN
#define E2_SERIAL_RX_PIN -1
#endif
#ifndef E3_SERIAL_TX_PIN
#define E3_SERIAL_TX_PIN -1
#endif
#ifndef E3_SERIAL_RX_PIN
#define E3_SERIAL_RX_PIN -1
#endif
#ifndef E4_SERIAL_TX_PIN
#define E4_SERIAL_TX_PIN -1
#endif
#ifndef E4_SERIAL_RX_PIN
#define E4_SERIAL_RX_PIN -1
#endif
#define E0_SERIAL_TX_PIN 44
#define E0_SERIAL_RX_PIN 66
#define E1_SERIAL_TX_PIN -1
#define E1_SERIAL_RX_PIN -1
#define E2_SERIAL_TX_PIN -1
#define E2_SERIAL_RX_PIN -1
#define E3_SERIAL_TX_PIN -1
#define E3_SERIAL_RX_PIN -1
#define E4_SERIAL_TX_PIN -1
#define E4_SERIAL_RX_PIN -1
#endif
//
@ -496,8 +448,8 @@
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 40 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 42 // for sake of the wiring diagram for RAMPS 1.4 we keep 40/42, confirmed working.
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS SDSS

View File

@ -1169,11 +1169,8 @@ void Planner::recalculate() {
* Maintain fans, paste extruder pressure,
*/
void Planner::check_axes_activity() {
uint8_t axis_active[NUM_AXIS] = { 0 };
#if FAN_COUNT > 0
uint8_t tail_fan_speed[FAN_COUNT] = { 0 };
#endif
unsigned char axis_active[NUM_AXIS] = { 0 },
tail_fan_speed[FAN_COUNT];
#if ENABLED(BARICUDA)
#if HAS_HEATER_1

View File

@ -61,14 +61,10 @@
#define THERMISTOR_NAME "Unknown"
#elif THERMISTOR_ID == 13
#define THERMISTOR_NAME "Hisens"
#elif THERMISTOR_ID == 15
#define THERMISTOR_NAME "Hisens +"
#elif THERMISTOR_ID == 20
#define THERMISTOR_NAME "PT100 UltiMB"
#elif THERMISTOR_ID == 60
#define THERMISTOR_NAME "Makers Tool"
#elif THERMISTOR_ID == 66
#define THERMISTOR_NAME "Makers Tool +"
#elif THERMISTOR_ID == 70
#define THERMISTOR_NAME "Hephestos 2"
#elif THERMISTOR_ID == 75

View File

@ -957,52 +957,21 @@ void lcd_quick_feedback(const bool clear_buttons) {
#if ENABLED(BLTOUCH)
extern void _bltouch_reset();
extern void _bltouch_selftest();
extern void _bltouch_deploy();
extern void _bltouch_stow();
extern void _bltouch_set_SW_mode();
extern void _bltouch_set_5V_mode();
extern void _bltouch_set_OD_mode();
extern void _bltouch_mode_store();
extern void bltouch_mode_conv_5V();
extern void bltouch_mode_conv_OD();
extern bool bltouch_last_written_mode;
#if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU)
void bltouch_report() {
SERIAL_ECHOLNPAIR("EEPROM Last BLTouch Mode - ", (int)bltouch_last_written_mode);
SERIAL_ECHOLNPGM("Configuration BLTouch Mode - "
#if ENABLED(BLTOUCH_SET_5V_MODE)
"5V"
#else
"OD"
#endif
);
char mess[21];
strcpy_P(mess, PSTR("BLTouch Mode - "));
strcpy_P(&mess[15], bltouch_last_written_mode ? PSTR("5V") : PSTR("OD"));
lcd_setalertstatusPGM(mess);
lcd_return_to_status();
}
#endif
void bltouch_menu() {
/**
*
* "BLTouch" submenu
*
*/
static void bltouch_menu() {
START_MENU();
//
// ^ Main
//
MENU_BACK(MSG_MAIN);
MENU_ITEM(function, MSG_BLTOUCH_RESET, _bltouch_reset);
MENU_ITEM(function, MSG_BLTOUCH_SELFTEST, _bltouch_selftest);
MENU_ITEM(function, MSG_BLTOUCH_DEPLOY, _bltouch_deploy);
MENU_ITEM(function, MSG_BLTOUCH_STOW, _bltouch_stow);
MENU_ITEM(function, MSG_BLTOUCH_SW_MODE, _bltouch_set_SW_mode);
#if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU)
MENU_ITEM(function, MSG_BLTOUCH_5V_MODE, _bltouch_set_5V_mode);
MENU_ITEM(function, MSG_BLTOUCH_OD_MODE, _bltouch_set_OD_mode);
MENU_ITEM(function, MSG_BLTOUCH_MODE_STORE, _bltouch_mode_store);
MENU_ITEM(function, MSG_BLTOUCH_MODE_STORE_5V, bltouch_mode_conv_5V);
MENU_ITEM(function, MSG_BLTOUCH_MODE_STORE_OD, bltouch_mode_conv_OD);
MENU_ITEM(function, MSG_BLTOUCH_MODE_ECHO, bltouch_report);
#endif
MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY)));
MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_PROBE_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW)));
END_MENU();
}

View File

@ -93,10 +93,6 @@
#elif ENABLED(DISPLAY_CHARSET_ISO10646_KANA)
#include "dogm_font_data_ISO10646_Kana.h"
#define FONT_MENU_NAME ISO10646_Kana_5x7
#elif ENABLED(DISPLAY_CHARSET_ISO10646_KO_KR)
#include "dogm_font_data_ISO10646_ko_KR.h"
#define FONT_MENU_NAME ISO10646_ko_KR
#define TALL_FONT_CORRECTION 1
#elif ENABLED(DISPLAY_CHARSET_ISO10646_GREEK)
#include "dogm_font_data_ISO10646_Greek.h"
#define FONT_MENU_NAME ISO10646_Greek_5x7
@ -170,7 +166,7 @@
U8GLIB_ST7920_128X64_RRD u8g(0); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
#elif ENABLED(CARTESIO_UI)
// The CartesioUI display
#if defined(DOGLCD_MOSI) && DOGLCD_MOSI > -1 && defined(DOGLCD_SCK) && DOGLCD_SCK > -1
#if DOGLCD_MOSI != -1 && DOGLCD_SCK != -1
// using SW-SPI
//U8GLIB_DOGM128 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_DOGM128_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
@ -208,14 +204,8 @@
U8GLIB_SSD1309_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST);
#elif ENABLED(MINIPANEL)
// The MINIPanel display
#if defined(DOGLCD_MOSI) && DOGLCD_MOSI > -1 && defined(DOGLCD_SCK) && DOGLCD_SCK > -1
// using SW-SPI
//U8GLIB_MINI12864 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_MINI12864_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
#else
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_MINI12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
#endif
//U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); // 8 stripes
U8GLIB_MINI12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
#else
// for regular DOGM128 display with HW-SPI
//U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 // 8 stripes

View File

@ -1164,9 +1164,8 @@ static void lcd_implementation_status_screen() {
static uint8_t ledsprev = 0;
uint8_t leds = 0;
#if HAS_HEATED_BED
if (thermalManager.degTargetBed() > 0) leds |= LED_A;
#endif
if (thermalManager.degTargetBed() > 0) leds |= LED_A;
if (thermalManager.degTargetHotend(0) > 0) leds |= LED_B;
#if FAN_COUNT > 0

View File

@ -1,7 +1,6 @@
# Anycubic i3 Mega / Mega-S Marlin 1.1.9 by davidramiro
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6B6SAL5XRH842&source=url) [![Downloads](https://img.shields.io/github/downloads/davidramiro/Marlin-AI3M/total.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/releases) [![Open Issues](https://img.shields.io/github/issues-raw/davidramiro/Marlin-AI3M.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/issues?q=is%3Aopen+is%3Aissue) [![License](https://img.shields.io/github/license/davidramiro/Marlin-AI3M.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/blob/master/LICENSE) [![Latest Release](https://img.shields.io/github/release/davidramiro/Marlin-AI3m.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/releases/latest/) [![Last commit](https://img.shields.io/github/last-commit/davidramiro/Marlin-AI3m.svg?style=flat)](https://github.com/davidramiro/Marlin-Ai3M/commits/) [![Travis CI](https://api.travis-ci.org/davidramiro/Marlin-Ai3M.svg?branch=master)](https://travis-ci.org/davidramiro/Marlin-Ai3M)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3MFT8QMP5ZRCE&source=url) [![Downloads](https://img.shields.io/github/downloads/davidramiro/Marlin-AI3M/total.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/releases) [![Open Issues](https://img.shields.io/github/issues-raw/davidramiro/Marlin-AI3M.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/issues?q=is%3Aopen+is%3Aissue) [![License](https://img.shields.io/github/license/davidramiro/Marlin-AI3M.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/blob/master/LICENSE) [![Latest Release](https://img.shields.io/github/release/davidramiro/Marlin-AI3m.svg?style=flat)](https://github.com/davidramiro/Marlin-AI3M/releases/latest/) [![Last commit](https://img.shields.io/github/last-commit/davidramiro/Marlin-AI3m.svg?style=flat)](https://github.com/davidramiro/Marlin-Ai3M/commits/) [![Travis CI](https://api.travis-ci.org/davidramiro/Marlin-Ai3M.svg?branch=master)](https://travis-ci.org/davidramiro/Marlin-Ai3M)
This is a custom version of the [Marlin Firmware](https://github.com/MarlinFirmware/Marlin) for the i3 Mega/Mega-S, gratefully based on [derhopp's repo](https://github.com/derhopp/Marlin-with-Anycubic-i3-Mega-TFT) with his remarkable efforts to get the Anycubic TFT screen to work with the latest versions of Marlin.
@ -39,13 +38,6 @@ While the i3 Mega is a great printer for its price and produces fantastic result
- Special characters on any file or folders name on the SD card will cause the file menu to freeze. Simply replace or remove every special character (Chinese, Arabic, Russian, accents, German & Scandinavian umlauts, ...) from the name. Symbols like dashes or underscores are no problem.
**Important note: On the SD card that comes with the printer there is a folder with Chinese characters in it by default. Please rename or remove it.**
![Compatibility Info][compatibility]
#### Updated compatibility info: Since late 2020, Anycubic started shipping their printers with a new display. It has a blue background and yellow text. With this display, the special SD menu will not work. Features like Manual Mesh Leveling and PID Tuning need to be configured via USB (e.g. OctoPrint or Cura as host). The printing features itself remain functional.
[compatibility]: https://kore.cc/i3mega/img/compatibility.png "Compatibility Info"
## How to flash this?
I provided three different precompiled hex files: One for no modifications on the stepper motor drivers - good for people who didn't touch anything yet, one for boards with TMC2208 installed and where the connectors have been flipped and one with TMC2208 and the connectors in original orientation.
@ -74,16 +66,14 @@ I provided three different precompiled hex files: One for no modifications on th
- Flash the hex with Cura, OctoPrint or similar
- Use a tool with a terminal (OctoPrint, Pronterface, Repetier Host, ...) to send commands to your printer.
- ⚠️ **Important** Connect to the printer and send the following commands:
- `M502` - load hard coded default values
- `M500` - save them to EEPROM
- **Important** Connect to the printer and send the following commands:
- `M502` - load hard coded default values
- `M500` - save them to EEPROM
**If you are using this on a Mega-S, those four additional commands are necessary:**
**If you are using this on a Mega-S, those two additional commands are necessary:**
- `M92 E384` - set correct steps for the new extruder
- `M203 E30` - limit extruder feedrate
- `M204 R1500.00` - lower retract acceleration
- `M500` - save the values
- It is highly recommend that you calibrate the extruder.
- `M500` - save them
- I highly recommend calibrating the extruder.
#### Calibration and other instructions have been moved to the [Wiki](https://github.com/davidramiro/Marlin-AI3M/wiki/Calibration).

View File

@ -969,9 +969,9 @@
"dev": true
},
"js-yaml": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==",
"dev": true,
"requires": {
"argparse": "1.0.10",
@ -1117,7 +1117,7 @@
"commander": "2.15.1",
"diff": "3.5.0",
"glob": "7.1.2",
"js-yaml": "3.13.1",
"js-yaml": "3.12.0",
"minimatch": "3.0.4",
"resolve": "1.7.1",
"semver": "5.5.0",
@ -1141,9 +1141,9 @@
"dev": true
},
"url-parse": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.3.tgz",
"integrity": "sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw==",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.0.tgz",
"integrity": "sha512-ERuGxDiQ6Xw/agN4tuoCRbmwRuZP0cJ1lJxJubXr5Q/5cDa78+Dc4wfvtxzhzhkm5VvmW6Mf8EVj9SPGN4l8Lg==",
"dev": true,
"requires": {
"querystringify": "2.0.0",
@ -1168,7 +1168,7 @@
"request": "2.85.0",
"semver": "5.5.0",
"source-map-support": "0.5.5",
"url-parse": "1.4.3",
"url-parse": "1.4.0",
"vinyl-source-stream": "1.1.2"
},
"dependencies": {