bump to head for eparser fix
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
#define SX2 // Small formfactor 200mm machine
|
||||
|
||||
#define DUAL_Z
|
||||
#define GRAPHICSLCD
|
||||
//#define GRAPHICSLCD
|
||||
#define UBL
|
||||
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2020-03-15"
|
||||
#define STRING_DISTRIBUTION_DATE "2020-03-19"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
#if USE_EMULATED_EEPROM
|
||||
#undef SRAM_EEPROM_EMULATION
|
||||
#undef SDCARD_EEPROM_EMULATION
|
||||
#define FLASH_EEPROM_EMULATION 1
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -20,3 +20,8 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
|
||||
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
#undef USE_REAL_EEPROM
|
||||
#define USE_EMULATED_EEPROM 1
|
||||
#if DISABLED(FLASH_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION 1
|
||||
#endif
|
||||
#if USE_EMULATED_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -36,12 +36,11 @@
|
||||
* 16Kb I/O buffers (intended to hold DMA USB and Ethernet data, but currently
|
||||
* unused).
|
||||
*/
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(FLASH_EEPROM_EMULATION)
|
||||
|
||||
#include "persistent_store_api.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
extern "C" {
|
||||
#include <lpc17xx_iap.h>
|
||||
|
||||
@@ -24,5 +24,5 @@
|
||||
#if USE_EMULATED_EEPROM
|
||||
#undef SRAM_EEPROM_EMULATION
|
||||
#undef SDCARD_EEPROM_EMULATION
|
||||
#define FLASH_EEPROM_EMULATION 1
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -20,3 +20,8 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
|
||||
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#if ENABLED(EEPROM_SETTINGS) && defined(STM32F7)
|
||||
#undef USE_REAL_EEPROM
|
||||
#define USE_EMULATED_EEPROM 1
|
||||
#undef SRAM_EEPROM_EMULATION
|
||||
#undef SDCARD_EEPROM_EMULATION
|
||||
#define FLASH_EEPROM_EMULATION 1
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -20,3 +20,8 @@
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
|
||||
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
@@ -202,7 +202,7 @@ const char NUL_STR[] PROGMEM = "",
|
||||
SP_Z_LBL[] PROGMEM = " Z:",
|
||||
SP_E_LBL[] PROGMEM = " E:";
|
||||
|
||||
bool Running = true;
|
||||
MarlinState marlin_state = MF_INITIALIZING;
|
||||
|
||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||
bool wait_for_heatup = true;
|
||||
@@ -567,7 +567,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
controllerfan_update(); // Check if fan should be turned on to cool stepper drivers down
|
||||
controllerFan.update(); // Check if fan should be turned on to cool stepper drivers down
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
@@ -839,7 +839,7 @@ void stop() {
|
||||
SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||
safe_delay(350); // allow enough time for messages to get out before stopping
|
||||
Running = false;
|
||||
marlin_state = MF_STOPPED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -984,6 +984,10 @@ void setup() {
|
||||
SETUP_RUN(leds.setup());
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN) // Set up fan controller to initialize also the default configurations.
|
||||
SETUP_RUN(controllerFan.setup());
|
||||
#endif
|
||||
|
||||
SETUP_RUN(ui.init());
|
||||
SETUP_RUN(ui.reset_status()); // Load welcome message early. (Retained if no errors exist.)
|
||||
|
||||
@@ -991,8 +995,8 @@ void setup() {
|
||||
SETUP_RUN(ui.show_bootscreen());
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
SETUP_RUN(card.mount()); // Mount the SD card before settings.first_load
|
||||
#if ENABLED(SDSUPPORT) && defined(SDCARD_CONNECTION) && !SD_CONNECTION_IS(LCD)
|
||||
SETUP_RUN(card.mount()); // Mount onboard / custom SD card before settings.first_load
|
||||
#endif
|
||||
|
||||
SETUP_RUN(settings.first_load()); // Load data from EEPROM if available (or use defaults)
|
||||
@@ -1047,10 +1051,6 @@ void setup() {
|
||||
SETUP_RUN(endstops.enable_z_probe(false));
|
||||
#endif
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
SET_OUTPUT(CONTROLLER_FAN_PIN);
|
||||
#endif
|
||||
|
||||
#if HAS_STEPPER_RESET
|
||||
SETUP_RUN(enableStepperDrivers());
|
||||
#endif
|
||||
@@ -1183,6 +1183,8 @@ void setup() {
|
||||
SETUP_RUN(max7219.init());
|
||||
#endif
|
||||
|
||||
marlin_state = MF_RUNNING;
|
||||
|
||||
SETUP_LOG("setup() completed.");
|
||||
}
|
||||
|
||||
|
||||
+13
-3
@@ -76,9 +76,19 @@ void minkill(const bool steppers_off=false);
|
||||
|
||||
void quickstop_stepper();
|
||||
|
||||
extern bool Running;
|
||||
inline bool IsRunning() { return Running; }
|
||||
inline bool IsStopped() { return !Running; }
|
||||
// Global State of the firmware
|
||||
enum MarlinState : uint8_t {
|
||||
MF_INITIALIZING = 0,
|
||||
MF_RUNNING = _BV(0),
|
||||
MF_PAUSED = _BV(1),
|
||||
MF_WAITING = _BV(2),
|
||||
MF_STOPPED = _BV(3),
|
||||
MF_KILLED = _BV(7)
|
||||
};
|
||||
|
||||
extern MarlinState marlin_state;
|
||||
inline bool IsRunning() { return marlin_state == MF_RUNNING; }
|
||||
inline bool IsStopped() { return marlin_state != MF_RUNNING; }
|
||||
|
||||
bool printingIsActive();
|
||||
bool printingIsPaused();
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
#define BOARD_HJC2560C_REV2 1147 // ADIMLab Gantry v2
|
||||
#define BOARD_TANGO 1148 // BIQU Tango V1
|
||||
#define BOARD_MKS_GEN_L_V2 1149 // MKS GEN L V2
|
||||
#define BOARD_COPYMASTER_3D 1150 // Copymaster 3D
|
||||
|
||||
//
|
||||
// RAMBo and derivatives
|
||||
|
||||
@@ -67,7 +67,6 @@ void safe_delay(millis_t ms) {
|
||||
TERN(PROBE_MANUALLY, "PROBE_MANUALLY", "")
|
||||
TERN(NOZZLE_AS_PROBE, "NOZZLE_AS_PROBE", "")
|
||||
TERN(FIX_MOUNTED_PROBE, "FIX_MOUNTED_PROBE", "")
|
||||
TERN(BLTOUCH, "BLTOUCH", "")
|
||||
TERN(HAS_Z_SERVO_PROBE, TERN(BLTOUCH, "BLTOUCH", "SERVO PROBE"), "")
|
||||
TERN(TOUCH_MI_PROBE, "TOUCH_MI_PROBE", "")
|
||||
TERN(Z_PROBE_SLED, "Z_PROBE_SLED", "")
|
||||
|
||||
@@ -1611,7 +1611,7 @@
|
||||
* numbers for those locations should be 0.
|
||||
*/
|
||||
#ifdef VALIDATE_MESH_TILT
|
||||
auto d_from = []() { DEBUG_ECHOPGM("D from "); };
|
||||
auto d_from = []{ DEBUG_ECHOPGM("D from "); };
|
||||
auto normed = [&](const xy_pos_t &pos, const float &zadd) {
|
||||
return normal.x * pos.x + normal.y * pos.y + zadd;
|
||||
};
|
||||
|
||||
@@ -24,60 +24,80 @@
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
|
||||
#include "controllerfan.h"
|
||||
#include "../module/stepper/indirection.h"
|
||||
#include "../module/temperature.h"
|
||||
|
||||
uint8_t controllerfan_speed;
|
||||
ControllerFan controllerFan;
|
||||
|
||||
void controllerfan_update() {
|
||||
static millis_t lastMotorOn = 0, // Last time a motor was turned on
|
||||
uint8_t ControllerFan::speed;
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
controllerFan_settings_t ControllerFan::settings; // {0}
|
||||
#endif
|
||||
|
||||
void ControllerFan::setup() {
|
||||
SET_OUTPUT(CONTROLLER_FAN_PIN);
|
||||
init();
|
||||
}
|
||||
|
||||
void ControllerFan::set_fan_speed(const uint8_t s) {
|
||||
speed = s < (CONTROLLERFAN_SPEED_MIN) ? 0 : s; // Fan OFF below minimum
|
||||
}
|
||||
|
||||
void ControllerFan::update() {
|
||||
static millis_t lastMotorOn = 0, // Last time a motor was turned on
|
||||
nextMotorCheck = 0; // Last time the state was checked
|
||||
const millis_t ms = millis();
|
||||
if (ELAPSED(ms, nextMotorCheck)) {
|
||||
nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s
|
||||
|
||||
const bool xory = X_ENABLE_READ() == bool(X_ENABLE_ON) || Y_ENABLE_READ() == bool(Y_ENABLE_ON);
|
||||
#define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON))
|
||||
#define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E)
|
||||
|
||||
// If any of the drivers or the bed are enabled...
|
||||
if (xory || Z_ENABLE_READ() == bool(Z_ENABLE_ON)
|
||||
const bool motor_on = MOTOR_IS_ON(Z,Z)
|
||||
#if HAS_Z2_ENABLE
|
||||
|| MOTOR_IS_ON(Z2,Z)
|
||||
#endif
|
||||
#if HAS_Z3_ENABLE
|
||||
|| MOTOR_IS_ON(Z3,Z)
|
||||
#endif
|
||||
#if HAS_Z4_ENABLE
|
||||
|| MOTOR_IS_ON(Z4,Z)
|
||||
#endif
|
||||
|| (DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && (
|
||||
MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y)
|
||||
#if HAS_X2_ENABLE
|
||||
|| MOTOR_IS_ON(X2,X)
|
||||
#endif
|
||||
#if HAS_Y2_ENABLE
|
||||
|| MOTOR_IS_ON(Y2,Y)
|
||||
#endif
|
||||
#if E_STEPPERS
|
||||
REPEAT(E_STEPPERS, _OR_ENABLED_E)
|
||||
#endif
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// If any of the drivers or the heated bed are enabled...
|
||||
if (motor_on
|
||||
#if HAS_HEATED_BED
|
||||
|| thermalManager.temp_bed.soft_pwm_amount > 0
|
||||
#endif
|
||||
#if HAS_X2_ENABLE
|
||||
|| X2_ENABLE_READ() == bool(X_ENABLE_ON)
|
||||
#endif
|
||||
#if HAS_Y2_ENABLE
|
||||
|| Y2_ENABLE_READ() == bool(Y_ENABLE_ON)
|
||||
#endif
|
||||
#if HAS_Z2_ENABLE
|
||||
|| Z2_ENABLE_READ() == bool(Z_ENABLE_ON)
|
||||
#endif
|
||||
#if HAS_Z3_ENABLE
|
||||
|| Z3_ENABLE_READ() == bool(Z_ENABLE_ON)
|
||||
#endif
|
||||
#if HAS_Z4_ENABLE
|
||||
|| Z4_ENABLE_READ() == bool(Z_ENABLE_ON)
|
||||
#endif
|
||||
#if E_STEPPERS
|
||||
#define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == bool(E_ENABLE_ON)
|
||||
REPEAT(E_STEPPERS, _OR_ENABLED_E)
|
||||
#endif
|
||||
) {
|
||||
lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
||||
}
|
||||
) lastMotorOn = ms; //... set time to NOW so the fan will turn on
|
||||
|
||||
// Fan off if no steppers have been enabled for CONTROLLERFAN_SECS seconds
|
||||
controllerfan_speed = (!lastMotorOn || ELAPSED(ms, lastMotorOn + (CONTROLLERFAN_SECS) * 1000UL)) ? 0 : (
|
||||
#ifdef CONTROLLERFAN_SPEED_Z_ONLY
|
||||
xory ? CONTROLLERFAN_SPEED : CONTROLLERFAN_SPEED_Z_ONLY
|
||||
#else
|
||||
CONTROLLERFAN_SPEED
|
||||
#endif
|
||||
// Fan Settings. Set fan > 0:
|
||||
// - If AutoMode is on and steppers have been enabled for CONTROLLERFAN_IDLE_TIME seconds.
|
||||
// - If System is on idle and idle fan speed settings is activated.
|
||||
set_fan_speed(
|
||||
settings.auto_mode && lastMotorOn && PENDING(ms, lastMotorOn + settings.duration * 1000UL)
|
||||
? settings.active_speed : settings.idle_speed
|
||||
);
|
||||
|
||||
// Allow digital or PWM fan output (see M42 handling)
|
||||
WRITE(CONTROLLER_FAN_PIN, controllerfan_speed);
|
||||
analogWrite(pin_t(CONTROLLER_FAN_PIN), controllerfan_speed);
|
||||
WRITE(CONTROLLER_FAN_PIN, speed);
|
||||
analogWrite(pin_t(CONTROLLER_FAN_PIN), speed);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,4 +21,56 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
void controllerfan_update();
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t active_speed, // 0-255 (fullspeed); Speed with enabled stepper motors
|
||||
idle_speed; // 0-255 (fullspeed); Speed after idle period with all motors are disabled
|
||||
uint16_t duration; // Duration in seconds for the fan to run after all motors are disabled
|
||||
bool auto_mode; // Default true
|
||||
} controllerFan_settings_t;
|
||||
|
||||
#ifndef CONTROLLERFAN_SPEED_ACTIVE
|
||||
#define CONTROLLERFAN_SPEED_ACTIVE 255
|
||||
#endif
|
||||
#ifndef CONTROLLERFAN_SPEED_IDLE
|
||||
#define CONTROLLERFAN_SPEED_IDLE 0
|
||||
#endif
|
||||
#ifndef CONTROLLERFAN_IDLE_TIME
|
||||
#define CONTROLLERFAN_IDLE_TIME 60
|
||||
#endif
|
||||
|
||||
static constexpr controllerFan_settings_t controllerFan_defaults = {
|
||||
CONTROLLERFAN_SPEED_ACTIVE,
|
||||
CONTROLLERFAN_SPEED_IDLE,
|
||||
CONTROLLERFAN_IDLE_TIME,
|
||||
true
|
||||
};
|
||||
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
|
||||
class ControllerFan {
|
||||
private:
|
||||
static uint8_t speed;
|
||||
static void set_fan_speed(const uint8_t s);
|
||||
|
||||
public:
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
static controllerFan_settings_t settings;
|
||||
#else
|
||||
static const controllerFan_settings_t &settings = controllerFan_defaults;
|
||||
#endif
|
||||
static inline bool state() { return speed > 0; }
|
||||
static inline void init() { reset(); }
|
||||
static inline void reset() {
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
settings = controllerFan_defaults;
|
||||
#endif
|
||||
}
|
||||
static void setup();
|
||||
static void update();
|
||||
};
|
||||
|
||||
extern ControllerFan controllerFan;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -46,8 +46,8 @@ bool Power::is_power_needed() {
|
||||
HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true;
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_POWER_CONTROLLERFAN, USE_CONTROLLER_FAN) && HAS_CONTROLLER_FAN
|
||||
if (controllerfan_speed) return true;
|
||||
#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN)
|
||||
if (controllerFan.state()) return true;
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_POWER_CHAMBER_FAN)
|
||||
|
||||
@@ -934,7 +934,12 @@ G29_TYPE GcodeSuite::G29() {
|
||||
|
||||
// Unapply the offset because it is going to be immediately applied
|
||||
// and cause compensation movement in Z
|
||||
current_position.z -= bilinear_z_offset(current_position);
|
||||
#if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
|
||||
const float fade_scaling_factor = planner.fade_scaling_factor_for_z(current_position.z);
|
||||
#else
|
||||
constexpr float fade_scaling_factor = 1.0f;
|
||||
#endif
|
||||
current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position);
|
||||
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z);
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ void GcodeSuite::G34() {
|
||||
const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPER_DRIVERS - 1 - i : i;
|
||||
|
||||
// Safe clearance even on an incline
|
||||
if (iteration == 0 || i > 0) do_blocking_move_to_z(z_probe);
|
||||
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
|
||||
|
||||
if (DEBUGGING(LEVELING))
|
||||
DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y);
|
||||
|
||||
@@ -67,6 +67,7 @@ inline void toggle_pins() {
|
||||
else {
|
||||
watchdog_refresh();
|
||||
report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing "));
|
||||
const bool prior_mode = GET_PINMODE(pin);
|
||||
#if AVR_AT90USB1286_FAMILY // Teensy IDEs don't know about these pins so must use FASTIO
|
||||
if (pin == TEENSY_E2) {
|
||||
SET_OUTPUT(TEENSY_E2);
|
||||
@@ -95,6 +96,7 @@ inline void toggle_pins() {
|
||||
watchdog_refresh();
|
||||
}
|
||||
}
|
||||
pinMode(pin, prior_mode);
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
@@ -37,16 +37,33 @@
|
||||
*
|
||||
* S<byte> Pin status from 0 - 255
|
||||
* I Flag to ignore Marlin's pin protection
|
||||
*
|
||||
* M<mode> Pin mode: 0=INPUT 1=OUTPUT 2=INPUT_PULLUP 3=INPUT_PULLDOWN
|
||||
*/
|
||||
void GcodeSuite::M42() {
|
||||
if (!parser.seenval('S')) return;
|
||||
const byte pin_status = parser.value_byte();
|
||||
|
||||
const int pin_index = PARSED_PIN_INDEX('P', GET_PIN_MAP_INDEX(LED_PIN));
|
||||
if (pin_index < 0) return;
|
||||
|
||||
const pin_t pin = GET_PIN_MAP_PIN(pin_index);
|
||||
|
||||
if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
|
||||
|
||||
if (parser.seenval('M')) {
|
||||
switch (parser.value_byte()) {
|
||||
case 0: pinMode(pin, INPUT); break;
|
||||
case 1: pinMode(pin, OUTPUT); break;
|
||||
case 2: pinMode(pin, INPUT_PULLUP); break;
|
||||
#ifdef INPUT_PULLDOWN
|
||||
case 3: pinMode(pin, INPUT_PULLDOWN); break;
|
||||
#endif
|
||||
default: SERIAL_ECHOLNPGM("Invalid Pin Mode");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!parser.seenval('S')) return;
|
||||
const byte pin_status = parser.value_byte();
|
||||
|
||||
#if FAN_COUNT > 0
|
||||
switch (pin) {
|
||||
#if HAS_FAN0
|
||||
@@ -76,8 +93,6 @@ void GcodeSuite::M42() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err();
|
||||
|
||||
pinMode(pin, OUTPUT);
|
||||
extDigitalWrite(pin, pin_status);
|
||||
analogWrite(pin, pin_status);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "../gcode.h"
|
||||
|
||||
#include "../../lcd/ultralcd.h" // for lcd_reset_alert_level
|
||||
#include "../../MarlinCore.h" // for Running
|
||||
#include "../../MarlinCore.h" // for marlin_state
|
||||
#include "../queue.h" // for flush_and_request_resend
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@
|
||||
*
|
||||
*/
|
||||
void GcodeSuite::M999() {
|
||||
Running = true;
|
||||
marlin_state = MF_RUNNING;
|
||||
ui.reset_alert_level();
|
||||
|
||||
if (parser.boolval('S')) return;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
void GcodeSuite::M900() {
|
||||
|
||||
auto echo_value_oor = [] (const char ltr, const bool ten=true) {
|
||||
auto echo_value_oor = [](const char ltr, const bool ten=true) {
|
||||
SERIAL_CHAR('?'); SERIAL_CHAR(ltr);
|
||||
SERIAL_ECHOPGM(" value out of range");
|
||||
if (ten) SERIAL_ECHOPGM(" (0-10)");
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
|
||||
#include "../../gcode.h"
|
||||
#include "../../../feature/controllerfan.h"
|
||||
|
||||
void M710_report(const bool forReplay) {
|
||||
if (!forReplay) { SERIAL_ECHOLNPGM("; Controller Fan"); SERIAL_ECHO_START(); }
|
||||
SERIAL_ECHOLNPAIR("M710 "
|
||||
"S", int(controllerFan.settings.active_speed),
|
||||
"I", int(controllerFan.settings.idle_speed),
|
||||
"A", int(controllerFan.settings.auto_mode),
|
||||
"D", controllerFan.settings.duration,
|
||||
" ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%"
|
||||
" ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* M710: Set controller fan settings
|
||||
*
|
||||
* R : Reset to defaults
|
||||
* S[0-255] : Fan speed when motors are active
|
||||
* I[0-255] : Fan speed when motors are idle
|
||||
* A[0|1] : Turn auto mode on or off
|
||||
* D : Set auto mode idle duration
|
||||
*
|
||||
* Examples:
|
||||
* M710 ; Report current Settings
|
||||
* M710 R ; Reset SIAD to defaults
|
||||
* M710 I64 ; Set controller fan Idle Speed to 25%
|
||||
* M710 S255 ; Set controller fan Active Speed to 100%
|
||||
* M710 S0 ; Set controller fan Active Speed to OFF
|
||||
* M710 I255 A0 ; Set controller fan Idle Speed to 100% with Auto Mode OFF
|
||||
* M710 I127 A1 S255 D160 ; Set controller fan idle speed 50%, AutoMode On, Fan speed 100%, duration to 160 Secs
|
||||
*/
|
||||
void GcodeSuite::M710() {
|
||||
|
||||
const bool seenR = parser.seen('R');
|
||||
if (seenR) controllerFan.reset();
|
||||
|
||||
const bool seenS = parser.seenval('S');
|
||||
if (seenS) controllerFan.settings.active_speed = parser.value_byte();
|
||||
|
||||
const bool seenI = parser.seenval('I');
|
||||
if (seenI) controllerFan.settings.idle_speed = parser.value_byte();
|
||||
|
||||
const bool seenA = parser.seenval('A');
|
||||
if (seenA) controllerFan.settings.auto_mode = parser.value_bool();
|
||||
|
||||
const bool seenD = parser.seenval('D');
|
||||
if (seenD) controllerFan.settings.duration = parser.value_ushort();
|
||||
|
||||
if (!(seenR || seenS || seenI || seenA || seenD))
|
||||
M710_report(false);
|
||||
}
|
||||
|
||||
#endif // CONTROLLER_FAN_EDITABLE
|
||||
@@ -752,6 +752,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 702: M702(); break; // M702: Unload Filament
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
case 710: M710(); break; // M710: Set Controller Fan settings
|
||||
#endif
|
||||
|
||||
#if ENABLED(GCODE_MACROS)
|
||||
case 810: case 811: case 812: case 813: case 814:
|
||||
case 815: case 816: case 817: case 818: case 819:
|
||||
|
||||
@@ -972,6 +972,10 @@ private:
|
||||
static void M7219();
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
static void M710();
|
||||
#endif
|
||||
|
||||
static void T(const uint8_t tool_index);
|
||||
|
||||
};
|
||||
|
||||
@@ -35,15 +35,13 @@
|
||||
#define HAS_LINEAR_E_JERK 1
|
||||
#endif
|
||||
|
||||
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
#if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && EITHER(I2C_EEPROM, SPI_EEPROM)
|
||||
#define USE_REAL_EEPROM 1
|
||||
#else
|
||||
#define USE_EMULATED_EEPROM 1
|
||||
#endif
|
||||
#if NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
|
||||
#define SDCARD_EEPROM_EMULATION 1
|
||||
#endif
|
||||
#else
|
||||
#undef I2C_EEPROM
|
||||
#undef SPI_EEPROM
|
||||
|
||||
@@ -270,6 +270,8 @@
|
||||
#error "Replace SLED_PIN with SOL1_PIN (applies to both Z_PROBE_SLED and SOLENOID_PROBE)."
|
||||
#elif defined(CONTROLLERFAN_PIN)
|
||||
#error "CONTROLLERFAN_PIN is now CONTROLLER_FAN_PIN, enabled with USE_CONTROLLER_FAN. Please update your Configuration_adv.h."
|
||||
#elif defined(CONTROLLERFAN_SPEED)
|
||||
#error "CONTROLLERFAN_SPEED is now CONTROLLERFAN_SPEED_ACTIVE. Please update your Configuration_adv.h."
|
||||
#elif defined(MIN_RETRACT)
|
||||
#error "MIN_RETRACT is now MIN_AUTORETRACT and MAX_AUTORETRACT. Please update your Configuration_adv.h."
|
||||
#elif defined(ADVANCE)
|
||||
@@ -1993,9 +1995,24 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||
static_assert(PWM_PIN(E2_AUTO_FAN_PIN), "E2" AF_ERR_SUFF);
|
||||
#elif HAS_AUTO_FAN_3
|
||||
static_assert(PWM_PIN(E3_AUTO_FAN_PIN), "E3" AF_ERR_SUFF);
|
||||
#elif HAS_AUTO_FAN_4
|
||||
static_assert(PWM_PIN(E4_AUTO_FAN_PIN), "E4" AF_ERR_SUFF);
|
||||
#elif HAS_AUTO_FAN_5
|
||||
static_assert(PWM_PIN(E5_AUTO_FAN_PIN), "E5" AF_ERR_SUFF);
|
||||
#elif HAS_AUTO_FAN_6
|
||||
static_assert(PWM_PIN(E6_AUTO_FAN_PIN), "E6" AF_ERR_SUFF);
|
||||
#elif HAS_AUTO_FAN_7
|
||||
static_assert(PWM_PIN(E7_AUTO_FAN_PIN), "E7" AF_ERR_SUFF);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Make sure only one EEPROM type is enabled
|
||||
*/
|
||||
#if ENABLED(EEPROM_SETTINGS) && 1 < ENABLED(SDCARD_EEPROM_EMULATION) + ENABLED(FLASH_EEPROM_EMULATION) + ENABLED(SRAM_EEPROM_EMULATION)
|
||||
#error "Please select only one of SDCARD, FLASH, or SRAM_EEPROM_EMULATION."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Make sure only one display is enabled
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2020-03-14"
|
||||
#define STRING_DISTRIBUTION_DATE "2020-03-19"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -448,10 +448,10 @@ void MarlinUI::draw_status_screen() {
|
||||
#endif
|
||||
}
|
||||
|
||||
constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY);
|
||||
if (ev != lastElapsed) {
|
||||
lastElapsed = ev;
|
||||
const bool has_days = (elapsed.value >= 60*60*24L);
|
||||
const uint8_t len = elapsed.toDigital(elapsed_string, has_days);
|
||||
const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L);
|
||||
elapsed_x_pos = _SD_INFO_X(len);
|
||||
|
||||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
@@ -468,8 +468,7 @@ void MarlinUI::draw_status_screen() {
|
||||
}
|
||||
else {
|
||||
duration_t estimation = timeval;
|
||||
const bool has_days = (estimation.value >= 60*60*24L);
|
||||
const uint8_t len = estimation.toDigital(estimation_string, has_days);
|
||||
const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L);
|
||||
estimation_x_pos = _SD_INFO_X(len
|
||||
#if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)
|
||||
+ 1
|
||||
|
||||
@@ -236,6 +236,11 @@ namespace Language_de {
|
||||
PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Lüfter ~");
|
||||
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Geschw. Extralüfter");
|
||||
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Geschw. Extralüfter ~");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Lüfter Kontroller");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Lüfter Leerlauf");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Motorlast Modus");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Lüfter Motorlast");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Ausschalt Delay");
|
||||
PROGMEM Language_Str MSG_FLOW = _UxGT("Flussrate");
|
||||
PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flussrate ~");
|
||||
PROGMEM Language_Str MSG_CONTROL = _UxGT("Einstellungen");
|
||||
|
||||
@@ -247,6 +247,11 @@ namespace Language_en {
|
||||
PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ~");
|
||||
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed");
|
||||
PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controller Fan");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed");
|
||||
PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period");
|
||||
PROGMEM Language_Str MSG_FLOW = _UxGT("Flow");
|
||||
PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flow ~");
|
||||
PROGMEM Language_Str MSG_CONTROL = _UxGT("Control");
|
||||
|
||||
@@ -193,7 +193,7 @@ DEFINE_MENU_EDIT_ITEM(uint16_3); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_4); // 1234 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(uint16_5); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float3); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float52); // _2.34, 12.34, -2.34 or 123.45, -23.45
|
||||
DEFINE_MENU_EDIT_ITEM(float42_52); // _2.34, 12.34, -2.34 or 123.45, -23.45
|
||||
DEFINE_MENU_EDIT_ITEM(float43); // 1.234
|
||||
DEFINE_MENU_EDIT_ITEM(float5); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM(float5_25); // 12345 right-justified (25 increment)
|
||||
@@ -428,7 +428,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) {
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_HOTEND_OFFSET_Z), ftostr54sign(hotend_offset[active_extruder].z));
|
||||
#endif
|
||||
if (do_probe) {
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), ftostr52sign(probe.offset.z));
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), BABYSTEP_TO_STR(probe.offset.z));
|
||||
#if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY)
|
||||
_lcd_zoffset_overlay_gfx(probe.offset.z);
|
||||
#endif
|
||||
|
||||
@@ -47,14 +47,18 @@ typedef void (*selectFunc_t)();
|
||||
void _lcd_zoffset_overlay_gfx(const float zvalue);
|
||||
#endif
|
||||
|
||||
#if Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
|
||||
// Only values from -9.999 to 9.999
|
||||
#define LCD_Z_OFFSET_FUNC(N) ftostr54sign(N)
|
||||
#define LCD_Z_OFFSET_TYPE float43
|
||||
#else
|
||||
// Values from -99.99 to 99.99
|
||||
#define LCD_Z_OFFSET_FUNC(N) ftostr52sign(N)
|
||||
#define LCD_Z_OFFSET_TYPE float52
|
||||
#if HAS_BED_PROBE
|
||||
#if Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
|
||||
#define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000
|
||||
#else
|
||||
#define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET) && Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9
|
||||
#define BABYSTEP_TO_STR(N) ftostr43sign(N)
|
||||
#elif ENABLED(BABYSTEPPING)
|
||||
#define BABYSTEP_TO_STR(N) ftostr53sign(N)
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////
|
||||
@@ -289,7 +293,7 @@ DEFINE_MENU_EDIT_ITEM_TYPE(uint16_3 ,uint16_t ,ui16tostr3rj , 1 );
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(uint16_4 ,uint16_t ,ui16tostr4rj , 0.1f ); // 1234 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(uint16_5 ,uint16_t ,ui16tostr5rj , 0.01f ); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float3 ,float ,ftostr3 , 1 ); // 123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float52 ,float ,ftostr42_52 , 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float42_52 ,float ,ftostr42_52 , 100 ); // _2.34, 12.34, -2.34 or 123.45, -23.45
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float43 ,float ,ftostr43sign ,1000 ); // -1.234, _1.234, +1.234
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float5 ,float ,ftostr5rj , 1 ); // 12345 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(float5_25 ,float ,ftostr5rj , 0.04f ); // 12345 right-justified (25 increment)
|
||||
|
||||
@@ -112,10 +112,10 @@ void menu_cancelobject();
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#if EXTRUDERS == 1
|
||||
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
#elif EXTRUDERS > 1
|
||||
LOOP_L_N(n, EXTRUDERS)
|
||||
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -257,7 +257,7 @@ void menu_cancelobject();
|
||||
EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled);
|
||||
EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - 15);
|
||||
EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - 15);
|
||||
EDIT_ITEM(float52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
|
||||
EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10);
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -556,10 +556,10 @@ void menu_advanced_settings() {
|
||||
SUBMENU(MSG_FILAMENT, menu_advanced_filament);
|
||||
#elif ENABLED(LIN_ADVANCE)
|
||||
#if EXTRUDERS == 1
|
||||
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
#elif EXTRUDERS > 1
|
||||
LOOP_L_N(n, E_STEPPERS)
|
||||
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -138,12 +138,12 @@ void menu_advanced_settings();
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_CONFIGURATION);
|
||||
#if ENABLED(DUAL_X_CARRIAGE)
|
||||
EDIT_ITEM_FAST(float51, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
|
||||
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, float(X2_HOME_POS - 25), float(X2_HOME_POS + 25), _recalc_offsets);
|
||||
#else
|
||||
EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
|
||||
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_X, &hotend_offset[1].x, -99.0, 99.0, _recalc_offsets);
|
||||
#endif
|
||||
EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
|
||||
EDIT_ITEM_FAST(float41sign, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
|
||||
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_Y, &hotend_offset[1].y, -99.0, 99.0, _recalc_offsets);
|
||||
EDIT_ITEM_FAST(float42_52, MSG_HOTEND_OFFSET_Z, &hotend_offset[1].z, Z_PROBE_LOW_POINT, 10.0, _recalc_offsets);
|
||||
#if ENABLED(EEPROM_SETTINGS)
|
||||
ACTION_ITEM(MSG_STORE_EEPROM, lcd_store_settings);
|
||||
#endif
|
||||
@@ -227,6 +227,24 @@ void menu_advanced_settings();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_MENU)
|
||||
|
||||
#include "../../feature/controllerfan.h"
|
||||
|
||||
void menu_controller_fan() {
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_CONFIGURATION);
|
||||
EDIT_ITEM_FAST(percent, MSG_CONTROLLER_FAN_IDLE_SPEED, &controllerFan.settings.idle_speed, _MAX(1, CONTROLLERFAN_SPEED_MIN) - 1, 255);
|
||||
EDIT_ITEM(bool, MSG_CONTROLLER_FAN_AUTO_ON, &controllerFan.settings.auto_mode);
|
||||
if (controllerFan.settings.auto_mode) {
|
||||
EDIT_ITEM_FAST(percent, MSG_CONTROLLER_FAN_SPEED, &controllerFan.settings.active_speed, _MAX(1, CONTROLLERFAN_SPEED_MIN) - 1, 255);
|
||||
EDIT_ITEM(uint16_4, MSG_CONTROLLER_FAN_DURATION, &controllerFan.settings.duration, 0, 4800);
|
||||
}
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_MENU)
|
||||
|
||||
#include "../../feature/caselight.h"
|
||||
@@ -320,6 +338,13 @@ void menu_configuration() {
|
||||
EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_ZPROBE_ZOFFSET, &probe.offset.z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set Fan Controller speed
|
||||
//
|
||||
#if ENABLED(CONTROLLER_FAN_MENU)
|
||||
SUBMENU(MSG_CONTROLLER_FAN, menu_controller_fan);
|
||||
#endif
|
||||
|
||||
const bool busy = printer_busy();
|
||||
if (!busy) {
|
||||
#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
|
||||
|
||||
@@ -103,7 +103,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
|
||||
#endif
|
||||
|
||||
void lcd_delta_settings() {
|
||||
auto _recalc_delta_settings = []() {
|
||||
auto _recalc_delta_settings = []{
|
||||
#if HAS_LEVELING
|
||||
reset_bed_level(); // After changing kinematics bed-level data is no longer valid
|
||||
#endif
|
||||
|
||||
@@ -182,7 +182,7 @@ void lcd_mixer_mix_edit() {
|
||||
#if CHANNEL_MIX_EDITING
|
||||
|
||||
LOOP_S_LE_N(n, 1, MIXING_STEPPERS)
|
||||
EDIT_ITEM_FAST_N(float52, n, MSG_MIX_COMPONENT_N, &mixer.collector[n-1], 0, 10);
|
||||
EDIT_ITEM_FAST_N(float42_52, n, MSG_MIX_COMPONENT_N, &mixer.collector[n-1], 0, 10);
|
||||
|
||||
ACTION_ITEM(MSG_CYCLE_MIX, _lcd_mixer_cycle_mix);
|
||||
ACTION_ITEM(MSG_COMMIT_VTOOL, _lcd_mixer_commit_vtool);
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
}
|
||||
if (ui.should_draw()) {
|
||||
const float spm = planner.steps_to_mm[axis];
|
||||
MenuEditItemBase::draw_edit_screen(msg, LCD_Z_OFFSET_FUNC(spm * babystep.accum));
|
||||
MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(spm * babystep.accum));
|
||||
#if ENABLED(BABYSTEP_DISPLAY_TOTAL)
|
||||
const bool in_view = (true
|
||||
#if HAS_GRAPHICAL_LCD
|
||||
@@ -81,7 +81,7 @@
|
||||
#endif
|
||||
lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL));
|
||||
lcd_put_wchar(':');
|
||||
lcd_put_u8str(LCD_Z_OFFSET_FUNC(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
|
||||
lcd_put_u8str(BABYSTEP_TO_STR(spm * babystep.axis_total[BS_TOTAL_IND(axis)]));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -232,10 +232,10 @@ void menu_tune() {
|
||||
//
|
||||
#if ENABLED(LIN_ADVANCE) && DISABLED(SLIM_LCD_MENUS)
|
||||
#if EXTRUDERS == 1
|
||||
EDIT_ITEM(float52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999);
|
||||
#elif EXTRUDERS > 1
|
||||
LOOP_L_N(n, EXTRUDERS)
|
||||
EDIT_ITEM_N(float52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ millis_t MarlinUI::next_button_update_ms; // = 0
|
||||
SETCURSOR(col, row);
|
||||
if (!string) return;
|
||||
|
||||
auto _newline = [&col, &row]() {
|
||||
auto _newline = [&col, &row]{
|
||||
col = 0; row++; // Move col to string len (plus space)
|
||||
SETCURSOR(0, row); // Simulate carriage return
|
||||
};
|
||||
|
||||
@@ -174,9 +174,9 @@ const char* ftostr12ns(const float &f) {
|
||||
return &conv[3];
|
||||
}
|
||||
|
||||
// Convert signed float to fixed-length string with 12.34 / -2.34 or 023.45 / -23.45 format
|
||||
// Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format
|
||||
const char* ftostr42_52(const float &f) {
|
||||
if (f <= -10 || f >= 100) return ftostr52(f); // need more digits
|
||||
if (f <= -10 || f >= 100) return ftostr52(f); // -23.45 / 123.45
|
||||
long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
|
||||
conv[2] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 1000));
|
||||
conv[3] = DIGIMOD(i, 100);
|
||||
@@ -198,9 +198,9 @@ const char* ftostr52(const float &f) {
|
||||
return &conv[1];
|
||||
}
|
||||
|
||||
// Convert signed float to fixed-length string with 12.345 / -2.345 or 023.456 / -23.456 format
|
||||
const char* ftostr43_53(const float &f) {
|
||||
if (f <= -10 || f >= 100) return ftostr53(f); // need more digits
|
||||
// Convert signed float to fixed-length string with 12.345 / _2.345 / -2.345 or -23.45 / 123.45 format
|
||||
const char* ftostr53_63(const float &f) {
|
||||
if (f <= -10 || f >= 100) return ftostr63(f); // -23.456 / 123.456
|
||||
long i = (f * 10000 + (f < 0 ? -5: 5)) / 10;
|
||||
conv[1] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 10000));
|
||||
conv[2] = DIGIMOD(i, 1000);
|
||||
@@ -212,7 +212,7 @@ const char* ftostr43_53(const float &f) {
|
||||
}
|
||||
|
||||
// Convert signed float to fixed-length string with 023.456 / -23.456 format
|
||||
const char* ftostr53(const float &f) {
|
||||
const char* ftostr63(const float &f) {
|
||||
long i = (f * 10000 + (f < 0 ? -5: 5)) / 10;
|
||||
conv[0] = MINUSOR(i, DIGIMOD(i, 100000));
|
||||
conv[1] = DIGIMOD(i, 10000);
|
||||
@@ -310,6 +310,19 @@ const char* ftostr52sign(const float &f) {
|
||||
return conv;
|
||||
}
|
||||
|
||||
// Convert signed float to string with +12.345 format
|
||||
const char* ftostr53sign(const float &f) {
|
||||
long i = (f * 1000 + (f < 0 ? -5: 5)) / 10;
|
||||
conv[0] = MINUSOR(i, '+');
|
||||
conv[1] = DIGIMOD(i, 10000);
|
||||
conv[2] = DIGIMOD(i, 1000);
|
||||
conv[3] = '.';
|
||||
conv[4] = DIGIMOD(i, 100);
|
||||
conv[5] = DIGIMOD(i, 10);
|
||||
conv[6] = DIGIMOD(i, 1);
|
||||
return conv;
|
||||
}
|
||||
|
||||
// Convert unsigned float to string with ____4.5, __34.5, _234.5, 1234.5 format
|
||||
const char* ftostr51rj(const float &f) {
|
||||
const long i = ((f < 0 ? -f : f) * 100 + 5) / 10;
|
||||
|
||||
@@ -58,17 +58,17 @@ const char* i16tostr4signrj(const int16_t x);
|
||||
// Convert unsigned float to string with 1.23 format
|
||||
const char* ftostr12ns(const float &x);
|
||||
|
||||
// Convert signed float to fixed-length string with 12.34 / -2.34 or 023.45 / -23.45 format
|
||||
// Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format
|
||||
const char* ftostr42_52(const float &x);
|
||||
|
||||
// Convert signed float to fixed-length string with 023.45 / -23.45 format
|
||||
const char* ftostr52(const float &x);
|
||||
|
||||
// Convert signed float to fixed-length string with 12.345 / -2.345 or 023.456 / -23.456 format
|
||||
const char* ftostr43_53(const float &x);
|
||||
const char* ftostr53_63(const float &x);
|
||||
|
||||
// Convert signed float to fixed-length string with 023.456 / -23.456 format
|
||||
const char* ftostr53(const float &x);
|
||||
const char* ftostr63(const float &x);
|
||||
|
||||
// Convert float to fixed-length string with +123.4 / -123.4 format
|
||||
const char* ftostr41sign(const float &x);
|
||||
@@ -91,6 +91,9 @@ const char* ftostr52sp(const float &x);
|
||||
// Convert signed float to string with +123.45 format
|
||||
const char* ftostr52sign(const float &x);
|
||||
|
||||
// Convert signed float to string with +12.345 format
|
||||
const char* ftostr53sign(const float &f);
|
||||
|
||||
// Convert unsigned float to string with 1234.5 format omitting trailing zeros
|
||||
const char* ftostr51rj(const float &x);
|
||||
|
||||
|
||||
@@ -122,6 +122,11 @@
|
||||
#include "../feature/probe_temp_comp.h"
|
||||
#endif
|
||||
|
||||
#include "../feature/controllerfan.h"
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
void M710_report(const bool forReplay);
|
||||
#endif
|
||||
|
||||
#pragma pack(push, 1) // No padding between variables
|
||||
|
||||
typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5; } tmc_stepper_current_t;
|
||||
@@ -292,6 +297,11 @@ typedef struct SettingsDataStruct {
|
||||
//
|
||||
int16_t lcd_contrast; // M250 C
|
||||
|
||||
//
|
||||
// Controller fan settings
|
||||
//
|
||||
controllerFan_settings_t controllerFan_settings; // M710
|
||||
|
||||
//
|
||||
// POWER_LOSS_RECOVERY
|
||||
//
|
||||
@@ -880,6 +890,19 @@ void MarlinSettings::postprocess() {
|
||||
EEPROM_WRITE(lcd_contrast);
|
||||
}
|
||||
|
||||
//
|
||||
// Controller Fan
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(controllerFan_settings);
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
const controllerFan_settings_t &cfs = controllerFan.settings;
|
||||
#else
|
||||
controllerFan_settings_t cfs = controllerFan_defaults;
|
||||
#endif
|
||||
EEPROM_WRITE(cfs);
|
||||
}
|
||||
|
||||
//
|
||||
// Power-Loss Recovery
|
||||
//
|
||||
@@ -1719,6 +1742,19 @@ void MarlinSettings::postprocess() {
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Controller Fan
|
||||
//
|
||||
{
|
||||
_FIELD_TEST(controllerFan_settings);
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
const controllerFan_settings_t &cfs = controllerFan.settings;
|
||||
#else
|
||||
controllerFan_settings_t cfs = { 0 };
|
||||
#endif
|
||||
EEPROM_READ(cfs);
|
||||
}
|
||||
|
||||
//
|
||||
// Power-Loss Recovery
|
||||
//
|
||||
@@ -2185,8 +2221,10 @@ void MarlinSettings::postprocess() {
|
||||
}
|
||||
|
||||
#if ENABLED(EEPROM_CHITCHAT) && DISABLED(DISABLE_M503)
|
||||
if (!validating) report();
|
||||
// Report the EEPROM settings
|
||||
if (!validating && (DISABLED(EEPROM_BOOT_SILENT) || IsRunning())) report();
|
||||
#endif
|
||||
|
||||
EEPROM_FINISH();
|
||||
|
||||
return !eeprom_error;
|
||||
@@ -2588,6 +2626,13 @@ void MarlinSettings::reset() {
|
||||
ui.set_contrast(DEFAULT_LCD_CONTRAST);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Controller Fan
|
||||
//
|
||||
#if ENABLED(USE_CONTROLLER_FAN)
|
||||
controllerFan.reset();
|
||||
#endif
|
||||
|
||||
//
|
||||
// Power-Loss Recovery
|
||||
//
|
||||
@@ -3152,6 +3197,10 @@ void MarlinSettings::reset() {
|
||||
SERIAL_ECHOLNPAIR(" M250 C", ui.contrast);
|
||||
#endif
|
||||
|
||||
#if ENABLED(CONTROLLER_FAN_EDITABLE)
|
||||
M710_report(forReplay);
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
CONFIG_ECHO_HEADING("Power-Loss Recovery:");
|
||||
CONFIG_ECHO_START();
|
||||
|
||||
@@ -2041,7 +2041,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
|
||||
#endif
|
||||
|
||||
#if ENABLED(SLOWDOWN)
|
||||
if (WITHIN(moves_queued, 2, (BLOCK_BUFFER_SIZE) / SLOWDOWN_DIVISOR - 1)) {
|
||||
#ifndef SLOWDOWN_DIVISOR
|
||||
#define SLOWDOWN_DIVISOR 2
|
||||
#endif
|
||||
if (WITHIN(moves_queued, 2, (BLOCK_BUFFER_SIZE) / (SLOWDOWN_DIVISOR) - 1)) {
|
||||
if (segment_time_us < settings.min_segment_time_us) {
|
||||
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
|
||||
const uint32_t nst = segment_time_us + LROUND(2 * (settings.min_segment_time_us - segment_time_us) / moves_queued);
|
||||
|
||||
@@ -765,7 +765,7 @@ int16_t Temperature::getHeaterPower(const heater_ind_t heater_id) {
|
||||
//
|
||||
|
||||
inline void loud_kill(PGM_P const lcd_msg, const heater_ind_t heater) {
|
||||
Running = false;
|
||||
marlin_state = MF_KILLED;
|
||||
#if USE_BEEPER
|
||||
for (uint8_t i = 20; i--;) {
|
||||
WRITE(BEEPER_PIN, HIGH); delay(25);
|
||||
@@ -2003,7 +2003,7 @@ void Temperature::init() {
|
||||
|
||||
/**
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Thermal Thermal Runaway Running. Heater ID: ");
|
||||
SERIAL_ECHOPGM("Thermal Runaway Running. Heater ID: ");
|
||||
if (heater_id == H_CHAMBER) SERIAL_ECHOPGM("chamber");
|
||||
if (heater_id < 0) SERIAL_ECHOPGM("bed"); else SERIAL_ECHO(heater_id);
|
||||
SERIAL_ECHOPAIR(" ; State:", sm.state, " ; Timer:", sm.timer, " ; Temperature:", current, " ; Target Temp:", target);
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// Unknown 200K thermistor on a Copymaster 3D hotend
|
||||
// Temptable sent from dealer technologyoutlet.co.uk
|
||||
//
|
||||
|
||||
const short temptable_202[][2] PROGMEM = {
|
||||
{ OV( 1), 864 },
|
||||
{ OV( 35), 300 },
|
||||
{ OV( 38), 295 },
|
||||
{ OV( 41), 290 },
|
||||
{ OV( 44), 285 },
|
||||
{ OV( 47), 280 },
|
||||
{ OV( 51), 275 },
|
||||
{ OV( 55), 270 },
|
||||
{ OV( 60), 265 },
|
||||
{ OV( 65), 260 },
|
||||
{ OV( 70), 255 },
|
||||
{ OV( 76), 250 },
|
||||
{ OV( 83), 245 },
|
||||
{ OV( 90), 240 },
|
||||
{ OV( 98), 235 },
|
||||
{ OV( 107), 230 },
|
||||
{ OV( 116), 225 },
|
||||
{ OV( 127), 220 },
|
||||
{ OV( 138), 215 },
|
||||
{ OV( 151), 210 },
|
||||
{ OV( 164), 205 },
|
||||
{ OV( 179), 200 },
|
||||
{ OV( 195), 195 },
|
||||
{ OV( 213), 190 },
|
||||
{ OV( 232), 185 },
|
||||
{ OV( 253), 180 },
|
||||
{ OV( 275), 175 },
|
||||
{ OV( 299), 170 },
|
||||
{ OV( 325), 165 },
|
||||
{ OV( 352), 160 },
|
||||
{ OV( 381), 155 },
|
||||
{ OV( 411), 150 },
|
||||
{ OV( 443), 145 },
|
||||
{ OV( 476), 140 },
|
||||
{ OV( 511), 135 },
|
||||
{ OV( 546), 130 },
|
||||
{ OV( 581), 125 },
|
||||
{ OV( 617), 120 },
|
||||
{ OV( 652), 115 },
|
||||
{ OV( 687), 110 },
|
||||
{ OV( 720), 105 },
|
||||
{ OV( 753), 100 },
|
||||
{ OV( 783), 95 },
|
||||
{ OV( 812), 90 },
|
||||
{ OV( 839), 85 },
|
||||
{ OV( 864), 80 },
|
||||
{ OV( 886), 75 },
|
||||
{ OV( 906), 70 },
|
||||
{ OV( 924), 65 },
|
||||
{ OV( 940), 60 },
|
||||
{ OV( 954), 55 },
|
||||
{ OV( 966), 50 },
|
||||
{ OV( 976), 45 },
|
||||
{ OV( 985), 40 },
|
||||
{ OV( 992), 35 },
|
||||
{ OV( 998), 30 },
|
||||
{ OV(1003), 25 },
|
||||
{ OV(1007), 20 },
|
||||
{ OV(1011), 15 },
|
||||
{ OV(1014), 10 },
|
||||
{ OV(1016), 5 },
|
||||
{ OV(1018), 0 }
|
||||
};
|
||||
@@ -151,6 +151,9 @@
|
||||
#if ANY_THERMISTOR_IS(201) // Pt100 with LMV324 Overlord
|
||||
#include "thermistor_201.h"
|
||||
#endif
|
||||
#if ANY_THERMISTOR_IS(202) // 200K thermistor in Copymaker3D hotend
|
||||
#include "thermistor_202.h"
|
||||
#endif
|
||||
#if ANY_THERMISTOR_IS(331) // Like table 1, but with 3V3 as input voltage for MEGA
|
||||
#include "thermistor_331.h"
|
||||
#endif
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "AZSMZ MINI"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
#define BOARD_INFO_NAME "BIQU Thunder B300 V1.0"
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "BIQU BQ111-A4"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "BIGTREE SKR 1.1"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Limit Switches
|
||||
//
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "BIGTREE SKR 1.3"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
/**
|
||||
* Trinamic Stallguard pins
|
||||
*/
|
||||
@@ -144,7 +150,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -25,6 +25,14 @@
|
||||
#define BOARD_INFO_NAME "BIGTREE SKR 1.4"
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Connection
|
||||
//
|
||||
@@ -88,11 +96,7 @@
|
||||
// Z Probe (when not Z_MIN_PIN)
|
||||
//
|
||||
#ifndef Z_MIN_PROBE_PIN
|
||||
#if Z_STOP_PIN != P1_27
|
||||
#define Z_MIN_PROBE_PIN P1_27
|
||||
#else
|
||||
#define Z_MIN_PROBE_PIN P0_10
|
||||
#endif
|
||||
#define Z_MIN_PROBE_PIN P0_10
|
||||
#endif
|
||||
|
||||
//
|
||||
@@ -171,7 +175,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
// Ignore temp readings during development.
|
||||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
#if DISABLED(SDCARD_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
// Ignore temp readings during develpment.
|
||||
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Enable 12MHz clock output on P1.27 pin to sync TMC2208 chip clocks
|
||||
//
|
||||
|
||||
@@ -38,6 +38,14 @@
|
||||
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SBASE"
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
#define LED_PIN P1_18 // Used as a status indicator
|
||||
#define LED2_PIN P1_19
|
||||
#define LED3_PIN P1_20
|
||||
@@ -305,7 +313,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MB(MKS_SBASE) && HAS_TMC220x
|
||||
#if MB(MKS_SBASE) && HAS_TMC_UART
|
||||
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#define BOARD_INFO_NAME "MKS SGen-L"
|
||||
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
@@ -146,7 +152,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "Re-ARM RAMPS 1.4"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
@@ -114,7 +120,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#define BOARD_INFO_NAME "Selena Compact"
|
||||
#define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#define BOARD_INFO_NAME "Azteeg X5 GT"
|
||||
#define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
@@ -47,7 +53,6 @@
|
||||
#define Z_MIN_PIN P1_26
|
||||
#define Z_MAX_PIN P1_29
|
||||
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
|
||||
@@ -187,6 +187,14 @@
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#if NONE(FLASH_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION)
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
#endif
|
||||
|
||||
//
|
||||
// SD Support
|
||||
//
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "Azteeg X5 MINI WIFI"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// DIGIPOT slave addresses
|
||||
//
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
#define BOARD_INFO_NAME "BIGTREE SKR 1.4 TURBO"
|
||||
#define SKR_HAS_LPC1769
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Include SKR 1.4 pins
|
||||
//
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "Cohesion3D Mini"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
|
||||
#define BOARD_INFO_NAME "Cohesion3D ReMix"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -31,8 +31,14 @@
|
||||
|
||||
#define BOARD_INFO_NAME "MKS SGen"
|
||||
#define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN"
|
||||
#define MKS_HAS_LPC1769
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
#define MKS_HAS_LPC1769
|
||||
#include "../lpc1768/pins_MKS_SBASE.h"
|
||||
|
||||
#undef E1_STEP_PIN
|
||||
@@ -44,7 +50,7 @@
|
||||
//#define BTN_EN1 P1_23 // EXP2.5
|
||||
//#define BTN_EN2 P1_22 // EXP2.3
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#define BOARD_INFO_NAME "Smoothieboard"
|
||||
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#define BOARD_INFO_NAME "TH3D EZBoard"
|
||||
#define BOARD_WEBSITE_URL "th3dstudio.com"
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
//
|
||||
#define FLASH_EEPROM_EMULATION
|
||||
//#define SDCARD_EEPROM_EMULATION
|
||||
|
||||
//
|
||||
// Servos
|
||||
//
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
#include "ramps/pins_TANGO.h" // ATmega2560 env:mega2560
|
||||
#elif MB(MKS_GEN_L_V2)
|
||||
#include "ramps/pins_MKS_GEN_L_V2.h" // ATmega2560 env:mega2560
|
||||
#elif MB(COPYMASTER_3D)
|
||||
#include "ramps/pins_COPYMASTER_3D.h" // ATmega2560 env:mega2560
|
||||
|
||||
//
|
||||
// RAMBo and derivatives
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#define BOARD_INFO_NAME "Copymaster 3D RAMPS"
|
||||
|
||||
#define Z_STEP_PIN 47
|
||||
#define FIL_RUNOUT_PIN 15
|
||||
#define SD_DETECT_PIN 66
|
||||
|
||||
//
|
||||
// Import RAMPS 1.4 pins
|
||||
//
|
||||
#include "pins_RAMPS.h"
|
||||
@@ -117,7 +117,7 @@
|
||||
// the jumper next to the limit switch socket when using sensorless homing.
|
||||
//
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#define Z_MAX_PIN 2
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define BOARD_INFO_NAME "MKS BASE"
|
||||
#endif
|
||||
|
||||
#if MKS_BASE_VERSION == 14 || MKS_BASE_VERSION == 15
|
||||
#if MKS_BASE_VERSION >= 14
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
|
||||
@@ -133,7 +133,9 @@
|
||||
#define Y_CS_PIN 49
|
||||
#endif
|
||||
|
||||
#define Z_STEP_PIN 46
|
||||
#ifndef Z_STEP_PIN
|
||||
#define Z_STEP_PIN 46
|
||||
#endif
|
||||
#define Z_DIR_PIN 48
|
||||
#define Z_ENABLE_PIN 62
|
||||
#ifndef Z_CS_PIN
|
||||
@@ -298,7 +300,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
#define E4_ENABLE_PIN 47
|
||||
#define E4_CS_PIN E0_CS_PIN
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
#endif // HAS_SPI_LCD
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
#define TEMP_1_PIN PC1 // Analog Input
|
||||
#define TEMP_BED_PIN PC2 // Analog Input
|
||||
|
||||
#if HOTENDS == 1 && TEMP_SENSOR_PROBE
|
||||
#define TEMP_PROBE_PIN PC1
|
||||
#endif
|
||||
|
||||
//
|
||||
// Heaters / Fans
|
||||
//
|
||||
@@ -199,3 +203,29 @@
|
||||
#define EXT7_PIN PD12
|
||||
#define EXT8_PIN PB10
|
||||
#define EXT9_PIN PB11
|
||||
|
||||
#if HAS_TMC_UART
|
||||
// TMC2208/TMC2209 stepper drivers
|
||||
//
|
||||
// Software serial
|
||||
//
|
||||
#define X_SERIAL_TX_PIN EXT0_PIN
|
||||
#define X_SERIAL_RX_PIN EXT0_PIN
|
||||
|
||||
#define Y_SERIAL_TX_PIN EXT1_PIN
|
||||
#define Y_SERIAL_RX_PIN EXT1_PIN
|
||||
|
||||
#define Z_SERIAL_TX_PIN EXT2_PIN
|
||||
#define Z_SERIAL_RX_PIN EXT2_PIN
|
||||
|
||||
#define E0_SERIAL_TX_PIN EXT3_PIN
|
||||
#define E0_SERIAL_RX_PIN EXT3_PIN
|
||||
|
||||
#define E1_SERIAL_RX_PIN EXT4_PIN
|
||||
#define E1_SERIAL_TX_PIN EXT4_PIN
|
||||
|
||||
#define Z2_SERIAL_RX_PIN EXT4_PIN
|
||||
#define Z2_SERIAL_TX_PIN EXT4_PIN
|
||||
|
||||
#define TMC_BAUD_RATE 19200
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*/
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// Software serial
|
||||
//
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
// Trinamic Software Serial
|
||||
//
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
#define X_SERIAL_TX_PIN PG13
|
||||
#define X_SERIAL_RX_PIN PG13
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#define FAN1_PIN PB0 // Fan1
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
#define E2_ENABLE_PIN PE3
|
||||
#define E2_CS_PIN PC15
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
//
|
||||
// TMC2208/TMC2209 stepper drivers
|
||||
//
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_TMC220x
|
||||
#if HAS_TMC_UART
|
||||
/**
|
||||
* TMC2208/TMC2209 stepper drivers
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user