Compare commits

..

63 Commits

Author SHA1 Message Date
InsanityAutomation 941acc64dc Update from devel 2020-06-20 10:13:01 -04:00
InsanityAutomation aa10268ea7 Set to raptor 2 default 2019-09-28 12:29:22 -04:00
InsanityAutomation 39a3dc998a Bump to head for M851XY 2019-09-28 09:49:12 -04:00
InsanityAutomation 90c67db50f Update Configuration.h 2019-09-16 22:13:50 -04:00
InsanityAutomation b894a6b83a Update Configuration.h 2019-09-06 23:52:00 -04:00
InsanityAutomation 283101dba1 Update Configuration.h 2019-09-06 23:50:03 -04:00
InsanityAutomation 77897aea67 fix laser pin 2019-09-06 23:44:14 -04:00
InsanityAutomation 1f1421a5a4 Update README.md 2019-08-28 09:44:02 -04:00
InsanityAutomation 0296e32c5c Bump to head 2019-08-25 13:07:10 -04:00
InsanityAutomation 192cc1d9d7 Bump 2019-08-02 21:54:15 -04:00
InsanityAutomation 6b8b1892f9 Bump to head 2019-07-05 17:06:08 -04:00
InsanityAutomation 04ab489264 Bump to head 2019-06-02 22:14:16 -04:00
InsanityAutomation 05e3a3412c Bump to head 2019-05-15 22:21:42 -04:00
InsanityAutomation c81b50633d Bump to head with bltouch v3 2019-05-08 16:52:42 -04:00
InsanityAutomation 3aa536a76a Update Configuration.h 2019-04-14 13:28:40 -04:00
InsanityAutomation 45d566a50d Bump to head with BLTouch V3 2019-04-08 11:11:39 -04:00
InsanityAutomation 66c5139fb7 Update Configuration_adv.h 2019-03-02 22:48:13 -05:00
InsanityAutomation b65000589c Update Configuration_adv.h 2019-03-02 22:21:32 -05:00
InsanityAutomation c3b6095bd7 Bump with babystepping additions and UBL Commission to 1 step 2019-03-02 22:18:23 -05:00
InsanityAutomation 9f256b038c Update Configuration.h 2019-02-20 10:58:23 -05:00
InsanityAutomation 4cec58a24f Bump 2019-02-20 10:55:28 -05:00
InsanityAutomation 8077ec2052 Update pins_FORMBOT_RAPTOR2.h 2019-02-18 16:59:34 -05:00
InsanityAutomation ab574eb649 Bump to head with Host Prompt Support 2019-02-16 12:09:49 -05:00
InsanityAutomation 9df4fc2265 Update Configuration.h 2019-01-16 11:00:14 -05:00
InsanityAutomation ef4c302898 Bump to head 2019-01-16 10:59:26 -05:00
InsanityAutomation b9cc802ff6 bump to head 2019-01-10 17:27:08 -05:00
InsanityAutomation baba7b6109 Add options to support 4988 drivers 2019-01-05 13:52:38 -05:00
InsanityAutomation b07dd87b7f set calculated value for babystepping to handle 2208 difference 2019-01-05 13:01:44 -05:00
InsanityAutomation be50832dc7 Bump to head 2019-01-05 12:51:29 -05:00
InsanityAutomation 560679a1b9 Bump to head 2018-12-17 07:50:20 -05:00
InsanityAutomation ee31e8e968 Bump to head with initial raptor2 support 2018-11-23 20:42:39 -05:00
InsanityAutomation daeee858c6 Pre-merge upstream pr 11973 2018-09-30 16:58:04 -04:00
InsanityAutomation 0acd1d0ce9 Few fixes and remove stale files 2018-09-28 20:57:24 -04:00
InsanityAutomation bb274563fc update url in version 2018-09-28 13:23:00 -04:00
InsanityAutomation c39be1d594 Bump to head 20180928 2018-09-28 09:54:04 -04:00
InsanityAutomation 80f47bb7c1 Add extra 30s to hotend watchdogs 2018-09-03 23:24:46 -04:00
InsanityAutomation e55a2b82d3 Fix led4 pin 2018-09-03 23:18:36 -04:00
InsanityAutomation 9cb597193d Fix bed output pin 2018-09-03 23:17:02 -04:00
InsanityAutomation db9148441d Fix stock raptor bed pin 2018-09-03 23:07:48 -04:00
InsanityAutomation 1c23fb21cd Intial commit 2018-09-02 20:15:00 -04:00
InsanityAutomation 1ab0d240b9 Bump to head with panner and ubl fixes 2018-07-08 16:48:40 -04:00
InsanityAutomation 5a4a107711 Move config to top 2018-07-01 00:13:37 -04:00
InsanityAutomation afa6a0c993 Catchup to Bugfix 20180526 2018-05-28 11:21:30 -04:00
InsanityAutomation 7429a39278 Add TMC2208 Spreadcycle and Extruder options 2018-05-26 15:43:50 -04:00
InsanityAutomation 156ed96649 Set UBL off by default to match stock 2018-05-09 13:32:10 -04:00
InsanityAutomation b018fb59d7 Slow nozzle park to help prevent shifting 2018-05-09 12:52:26 -04:00
InsanityAutomation 4d9190598b Bump config version and remove nozzle preheat to avoid runaway 2018-05-09 12:48:57 -04:00
InsanityAutomation 5dfec58d7b Couple tweaks
Turn on multiple probing, off power save recovery, bump version
2018-05-09 12:45:15 -04:00
InsanityAutomation 6d84ca7671 Merge branch 'bugfix-1.1.x' into TM_Raptor 2018-05-09 12:39:12 -04:00
InsanityAutomation d66afdc244 Replace stock pins file 2018-04-24 12:56:26 -04:00
InsanityAutomation 242cda28f6 Add all metal pid 2018-04-24 12:31:30 -04:00
InsanityAutomation 0dc4a5d928 Merge branch 'TM_Raptor' of https://github.com/InsanityAutomation/Marlin into TM_Raptor 2018-04-24 12:30:28 -04:00
InsanityAutomation 612ca52676 Disable brightness and rename menu 2018-04-24 11:03:41 -04:00
InsanityAutomation d1be569466 Version bump 2018-04-24 10:58:38 -04:00
InsanityAutomation 95e0ab52d6 Enable power loss recovery 2018-04-24 10:18:47 -04:00
InsanityAutomation e9214cf1fb Merge branch 'bugfix-1.1.x' into TM_Raptor 2018-04-24 10:11:30 -04:00
InsanityAutomation d46ba9e969 Merge pull request #2 from InsanityAutomation/bugfix-1.1.x
Catch up
2018-04-24 09:51:51 -04:00
InsanityAutomation b2d32227aa Fix AC bed temp limit 2018-04-24 09:38:10 -04:00
InsanityAutomation c1e14d6db7 Change instance of Light to LED 2018-04-24 09:32:40 -04:00
InsanityAutomation 7ef484be7e Re-enable fans and heaters when probing 2018-04-24 09:31:36 -04:00
InsanityAutomation 410b25d4e9 More featurefull config 2018-04-17 16:21:27 -04:00
InsanityAutomation 8c22e7710c Define case light as led to match stock 2018-04-17 15:32:17 -04:00
InsanityAutomation b4d2c19723 Update park position 2018-04-17 15:29:20 -04:00
409 changed files with 8154 additions and 78064 deletions
+1 -3
View File
@@ -1,3 +1 @@
github: [thinkyhead]
patreon: thinkyhead
custom: ["http://www.thinkyhead.com/donate-to-marlin"]
custom: http://www.thinkyhead.com/donate-to-marlin
-103
View File
@@ -1,103 +0,0 @@
#
# test-builds.yml
# Do test builds to catch compile errors
#
name: CI
on:
pull_request:
branches:
- bugfix-2.0.x
- dev-2.1.x
paths-ignore:
- config/**
- data/**
- docs/**
- '**/*.md'
jobs:
test_builds:
runs-on: ubuntu-latest
strategy:
matrix:
test-platform:
# Base Environments
- DUE
- esp32
- linux_native
- megaatmega2560
- teensy31
- teensy35
# Extended AVR Environments
- FYSETC_F6_13
- megaatmega1280
- rambo
- sanguino_atmega1284p
- sanguino_atmega644p
# Extended STM32 Environments
- STM32F103RC_bigtree
- STM32F103RC_bigtree_USB
- STM32F103RE_bigtree
- STM32F103RE_bigtree_USB
- STM32F103RC_fysetc
- jgaurora_a5s_a1
- STM32F103VE_longer
- STM32F407VE_black
- BIGTREE_SKR_PRO
- mks_robin
- ARMED
- FYSETC_S6
# Put lengthy tests last
- LPC1768
- LPC1769
# STM32 with non-STM framework. both broken for now. they should use HAL_STM32 which is working.
#- STM32F4
#- STM32F7
# Non-working environment tests
#- BIGTREE_BTT002
#- at90usb1286_cdc
#- at90usb1286_dfu
#- STM32F103CB_malyan
#- mks_robin_lite
#- mks_robin_mini
#- mks_robin_nano
#- SAMD51_grandcentral_m4
steps:
- name: Select Python 3.7
uses: actions/setup-python@v1
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install PlatformIO
run: |
pip install -U https://github.com/platformio/platformio-core/archive/master.zip
platformio update
- name: Check out the PR
uses: actions/checkout@v2
- name: Run ${{ matrix.test-platform }} Tests
run: |
# Inline tests script
[[ "$GITHUB_REPOSITORY" == "MarlinFirmware/Marlin" ]] || exit 0
chmod +x buildroot/bin/*
chmod +x buildroot/share/tests/*
export PATH=./buildroot/bin/:./buildroot/share/tests/:${PATH}
run_tests . ${{ matrix.test-platform }}
+4 -3
View File
@@ -14,12 +14,11 @@ env:
- TEST_PLATFORM="esp32"
- TEST_PLATFORM="linux_native"
- TEST_PLATFORM="megaatmega2560"
- TEST_PLATFORM="STM32F103RE"
- TEST_PLATFORM="teensy31"
- TEST_PLATFORM="teensy35"
# Extended AVR Environments
- TEST_PLATFORM="fysetc_f6_13"
- TEST_PLATFORM="FYSETC_F6_13"
- TEST_PLATFORM="megaatmega1280"
- TEST_PLATFORM="rambo"
- TEST_PLATFORM="sanguino_atmega1284p"
@@ -27,7 +26,9 @@ env:
# Extended STM32 Environments
- TEST_PLATFORM="STM32F103RC_bigtree"
- TEST_PLATFORM="STM32F103RC_bigtree_NOUSB"
- TEST_PLATFORM="STM32F103RC_bigtree_USB"
- TEST_PLATFORM="STM32F103RE_bigtree"
- TEST_PLATFORM="STM32F103RE_bigtree_USB"
- TEST_PLATFORM="STM32F103RC_fysetc"
- TEST_PLATFORM="jgaurora_a5s_a1"
- TEST_PLATFORM="STM32F103VE_longer"
+286 -195
View File
@@ -1,48 +1,102 @@
// If you have a trex 3, stock is this option plus 2208 on all axis. None in spreadcycle.
#define TREX3
// CUSTOMIZE FOR YOUR MACHINE BELOW
// CUSTOMIZE FOR YOUR MACHINE BELOW
// CUSTOMIZE FOR YOUR MACHINE BELOW
// CUSTOMIZE FOR YOUR MACHINE BELOW
// CUSTOMIZE FOR YOUR MACHINE BELOW
// If you have a trex 3 that was upgraded from a 2+ with the kit, modifies home position and offsets.
//#define TREX3_UPGRADE
// Enable this is you have a raptor 2.
// Selects pin file, runout sensor and stock TMC Drivers automatically
#define RAPTOR2
//Stock 2+ X is a 4988, all options off defaults to this
//#define X_2208
//#define X_Spreadcycle
//#define X_S109
// Y all options off defaults to 2+ 8825 / 3 2208
//#define Y_2208 // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
//#define Y_Spreadcycle
//#define Y_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define Y_S109
//Stock 2+ Z is a 8825, all options off defaults to this
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
//#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define Z_Spreadcycle
//#define Z_S109
//Stock 2+ Z is a 4988, all options off defaults to this
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
//#define E_Spreadcycle
//#define E_S109
#define BedAC
#define tallVersion
//#define ABL_Bilinear
/*
* Enables a filament sensor plugged into the laser pin. Disables the laser
/**
* Enable if you replace the stepper drivers with TMC 2208. Be sure to remove MS3 jumper
* underneath the stepper driver! Plug and Play will result in Stealth Chop 2 Mode enabled
* Stealthchop with 2208 on E will disabe Linear Advance! Please enable stealthchop if
* you require Linear Advance with a TMC2208 on the extruder!
* If you have used a UART connection to program the driver to SpreadCycle mode, pease seect that as well
*/
//#define FilamentSensor // Standard older TM3D runout sensor
//#define lerdgeFilSensor // Newer inverted logic TM3D Runout Sensor
//#define filamentEncoder
//#define autoCalibrationKit
//#define X_2208 // TMC2208 or 2209 in Standalone Mode
//#define X_SpreadCycle
//#define X_2209_Uart
//#define Y_2208
//#define Y_SpreadCycle // Highly recommended as large prints with high mass can cause layer shifts with stealthchop at high speed
//#define Y_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define Y_2209_Uart
//#define Z_2208 // NOT Recommended! Dual stepper current draw is above the recommended limit for this driver
//#define Z_SpreadCycle
//#define Z_4988 // Some machines shipped with 4988 drivers across the board. Set this if you arent sure what you have and all the drivers look identical
//#define Z_2209_Uart
//#define E_2208 // Not Recommended! Stealthchop mode faults with linear advance
//#define E_SpreadCycle
//#define E_4988
//#define E_2209_Uart
//////////////////////////////////DO not edit below here unless you know what youre doing! //////////////////////////////////
//#define SKR13
//#define SKR14
//#define SKR14Turbo
//#define SKRPRO11
//#define I2C_EEPROM // use I2C EEPROM on SRK PRO v1.1 e.g AT24C256
//#define SKR14_PowerLossKit // Bigtreetech power loss kit for SKR14
//#define DualZ // Uses 5th driver on SKR boards as Z2
/**
* Enable if you install a KEENOVO AC BED with Solid State Relay
*/
#define BED_AC
#define HotendAllMetal
//#define HotendMosquito
//#define ExtruderBMG
/**
* TM3D E3D Hemera Kit
* Swap center 2 wires on extruder connector on Raptor 2
*
*/
#define E3DHemeraExtruder
/**
* Enable if you install a filament runout sensor from www.formbotusa.com
*/
//#define RunoutSensor
#define RunoutEncoder
//#define tallVersion // For 700mm version
/**
* Enable if you wish to change the auto level strategy to Unified Bed Leveling. Under CUSTOM COMMANDS, run Step 1 and 2 before setting Z Offset
*/
//#define UBL //Disabled Firmware Retract and the animated boot screen
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
//ONLY MAKE CHANGES ABOVE FOR RELIABLE FUNCTION
#if ENABLED(RAPTOR2)
#if DISABLED(X_2209_Uart)
#define X_2208
#endif
#if DISABLED(Y_2209_Uart)
#define Y_2208
#endif
#if DISABLED(Z_2209_Uart)
#define Z_2208
#endif
#if DISABLED(E_2209_Uart)
#define E_2208
#endif
#define RunoutSensor
#endif
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11)
#define SKRBoard
#endif
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
@@ -66,23 +120,6 @@
*/
#pragma once
// The TREX2+ upgraded to the 3 enables most of the same options, simplify here
#if ENABLED(TREX3_UPGRADE)
#define TREX3
#endif
#if ENABLED(TREX3)
#if DISABLED(X_S109)
#define X_2208
#endif
#if DISABLED(Y_S109)
#define Y_2208
#endif
#define Z_2208
#define E_2208
#define FilamentSensor
#endif
/**
* Configuration.h
*
@@ -165,7 +202,11 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
#define SERIAL_PORT 0
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11)
#define SERIAL_PORT -1
#else
#define SERIAL_PORT 0
#endif
/**
* Select a secondary serial port on the board to use for communication with the host.
@@ -174,7 +215,9 @@
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
#if ANY(SKR13, SKR14, SKR14Turbo, SKRPRO11)
#define SERIAL_PORT_2 0
#endif
/**
* This setting determines the communication speed of the printer.
@@ -192,22 +235,23 @@
// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
#if ENABLED(TREX3)
#define MOTHERBOARD BOARD_FORMBOT_TREX3
#else
#define MOTHERBOARD BOARD_FORMBOT_TREX2PLUS
#endif
#if ENABLED(SKR14Turbo)
#define MOTHERBOARD BOARD_BTT_SKR_V1_4_TURBO
#elif ENABLED(SKR14)
#define MOTHERBOARD BOARD_BTT_SKR_V1_4
#elif ENABLED(SKR13)
#define MOTHERBOARD BOARD_BTT_SKR_V1_3
#elif ENABLED(SKRPRO11)
#define MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1
#elif ENABLED(RAPTOR2)
#define MOTHERBOARD BOARD_FORMBOT_RAPTOR2
#else
#define MOTHERBOARD BOARD_FORMBOT_RAPTOR
#endif
#endif
// Optional custom name for your RepStrap or other custom machine
// Displayed in the LCD "Ready" message
#if ENABLED(TREX3_UPGRADE)
#define CUSTOM_MACHINE_TIME "T-REX 3(u)"
#elif ENABLED(TREX3)
#define CUSTOM_MACHINE_NAME "T-REX 3"
#else
#define CUSTOM_MACHINE_NAME "T-REX 2+"
#endif
// Name displayed in the LCD "Ready" message and Info menu
//#define CUSTOM_MACHINE_NAME "TM3D RaPtOr"
// Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like http://www.uuidgenerator.net/version4
@@ -217,7 +261,7 @@
// This defines the number of extruders
// :[1, 2, 3, 4, 5, 6, 7, 8]
#define EXTRUDERS 2
#define EXTRUDERS 1
// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc.
#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
@@ -382,12 +426,7 @@
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder).
// For the other hotends it is their distance from the extruder 0 hotend.
#if ENABLED(TREX3)
#define HOTEND_OFFSET_X {0.0, 438.5} // (mm) relative X-offset for each nozzle
#else
#define HOTEND_OFFSET_X {0.0, 442.0} // (mm) relative X-offset for each nozzle
#endif
//#define HOTEND_OFFSET_X { 0.0, 20.00 } // (mm) relative X-offset for each nozzle
//#define HOTEND_OFFSET_Y { 0.0, 5.00 } // (mm) relative Y-offset for each nozzle
//#define HOTEND_OFFSET_Z { 0.0, 0.00 } // (mm) relative Z-offset for each nozzle
@@ -485,23 +524,26 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*/
#if ENABLED(TREX3)
#if ENABLED(HotendMosquito)
#define TEMP_SENSOR_0 67
#elif ENABLED(RAPTOR2)
#define TEMP_SENSOR_0 61
#define TEMP_SENSOR_1 61
#elif ENABLED(E3DHemeraExtruder)
#define TEMP_SENSOR_0 5
#else
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 1
#endif
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_3 0
#define TEMP_SENSOR_4 0
#define TEMP_SENSOR_5 0
#define TEMP_SENSOR_6 0
#define TEMP_SENSOR_7 0
#if(ENABLED(BedAC))
#define TEMP_SENSOR_BED 11
#if(ENABLED(BED_AC))
#define TEMP_SENSOR_BED 11
#else
#define TEMP_SENSOR_BED 0
#define TEMP_SENSOR_BED 1
#endif
#define TEMP_SENSOR_PROBE 0
#define TEMP_SENSOR_CHAMBER 0
@@ -515,11 +557,11 @@
//#define TEMP_SENSOR_1_AS_REDUNDANT
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10
#define TEMP_RESIDENCY_TIME 3 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109
#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
#define TEMP_BED_RESIDENCY_TIME 5 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190
#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer
#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target
@@ -538,20 +580,25 @@
// Above this temperature the heater will be switched off.
// This can protect components from overheating, but NOT from shorts and failures.
// (Use MINTEMP for thermistor short/failure protection.)
#if ENABLED(TREX3)
#define HEATER_0_MAXTEMP 350
#define HEATER_1_MAXTEMP 350
#if ENABLED(HotendMosquito)
#define HEATER_0_MAXTEMP 450
#elif ENABLED(RAPTOR2)
#define HEATER_0_MAXTEMP 345
#else
#define HEATER_0_MAXTEMP 410
#define HEATER_1_MAXTEMP 295
#define HEATER_0_MAXTEMP 305
#endif
#define HEATER_1_MAXTEMP 275
#define HEATER_2_MAXTEMP 275
#define HEATER_3_MAXTEMP 275
#define HEATER_4_MAXTEMP 275
#define HEATER_5_MAXTEMP 275
#define HEATER_6_MAXTEMP 275
#define HEATER_7_MAXTEMP 275
#define BED_MAXTEMP 150
#if(ENABLED(BED_AC))
#define BED_MAXTEMP 165
#else
#define BED_MAXTEMP 100
#endif
//===========================================================================
//============================= PID Settings ================================
@@ -569,7 +616,7 @@
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
// Set/get with gcode: M301 E[extruder number, 0-2]
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
@@ -577,14 +624,18 @@
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// Ultimaker
#if ENABLED(TREX3)
#define DEFAULT_Kp 14.64
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 53.36
#if ENABLED(E3DHemeraExtruder)
#define DEFAULT_Kp 21.9
#define DEFAULT_Ki 1.5
#define DEFAULT_Kd 79.88
#elif ENABLED(HotendAllMetal)
#define DEFAULT_Kp 21.9
#define DEFAULT_Ki 1.5
#define DEFAULT_Kd 79.88
#else
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114
#define DEFAULT_Kp 22.2
#define DEFAULT_Ki 1.08
#define DEFAULT_Kd 114
#endif
// MakerGear
//#define DEFAULT_Kp 7.0
@@ -615,7 +666,7 @@
* heater. If your configuration is significantly different than this and you don't understand
* the issues involved, don't use bed PID until someone else verifies that your hardware works.
*/
//#define PIDTEMPBED
#define PIDTEMPBED
//#define BED_LIMIT_SWITCHING
@@ -633,9 +684,15 @@
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
#if(ENABLED(BED_AC))
#define DEFAULT_bedKp 100.0
#define DEFAULT_bedKi 15.0
#define DEFAULT_bedKd 200.0
#else
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
#endif
//120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
//from pidautotune
@@ -713,7 +770,7 @@
#define USE_XMIN_PLUG
//#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define USE_XMAX_PLUG
//#define USE_XMAX_PLUG
#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
@@ -744,7 +801,7 @@
#endif
// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
@@ -768,24 +825,31 @@
* TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
* :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
*/
#if ENABLED(X_2208)
#if ENABLED(X_2209_Uart)
#define X_DRIVER_TYPE TMC2209
#define X2_DRIVER_TYPE TMC2209
#elif ENABLED(X_2208)
#define X_DRIVER_TYPE TMC2208_STANDALONE
#define X2_DRIVER_TYPE TMC2208_STANDALONE
#else
#define X_DRIVER_TYPE A4988
#define X2_DRIVER_TYPE A4988
#endif
#if ENABLED(Y_2208)
#if ENABLED(Y_2209_Uart)
#define Y_DRIVER_TYPE TMC2209
#elif ENABLED(Y_2208)
#define Y_DRIVER_TYPE TMC2208_STANDALONE
#elif ENABLED(Y_4988)
#define Y_DRIVER_TYPE A4988
#else
#define Y_DRIVER_TYPE DRV8825
#endif
#if ENABLED(Z_2208)
#if ENABLED(Z_2209_Uart)
#define Z_DRIVER_TYPE TMC2209
#elif ENABLED(Z_2208)
#define Z_DRIVER_TYPE TMC2208_STANDALONE
#elif ENABLED(Z_4988)
#define Z_DRIVER_TYPE A4988
#define Z_DRIVER_TYPE A4988
#else
#define Z_DRIVER_TYPE DRV8825
#endif
@@ -793,11 +857,14 @@
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
//#define Z4_DRIVER_TYPE A4988
#if ENABLED(E_2208)
#define E0_DRIVER_TYPE TMC2208_STANDALONE
#if ENABLED(E_2209_Uart)
#define E0_DRIVER_TYPE TMC2209
#define E1_DRIVER_TYPE TMC2209
#elif ENABLED(E_2208)
#define E0_DRIVER_TYPE TMC2208_STANDALONE
#define E1_DRIVER_TYPE TMC2208_STANDALONE
#else
#define E0_DRIVER_TYPE DRV8825
#define E0_DRIVER_TYPE DRV8825
#define E1_DRIVER_TYPE DRV8825
#endif
//#define E2_DRIVER_TYPE A4988
@@ -850,37 +917,44 @@
* Override with M92
* X, Y, Z, E0 [, E1[, E2...]]
*/
#if ENABLED(E3DHemeraExtruder)
#if ANY(E_2208, E_4988, E_2209_Uart)
#define E_STEPSMM 409
#else
#define E_STEPSMM 818
#endif
#else
#if ANY(E_2208, E_4988, E_2209_Uart)
#define E_STEPSMM 96
#else
#define E_STEPSMM 192
#endif
#endif
#if(ENABLED(Y_2208) || ENABLED(Y_4988) || ENABLED(Y_S109))
#if ANY(Y_2208, Y_4988, Y_2209_Uart)
#define Y_STEPSMM 80
#else
#define Y_STEPSMM 160
#endif
#if(ENABLED(Z_2208) || ENABLED(Z_4988))
#if ANY(Z_2208, Z_4988, Z_2209_Uart)
#define Z_STEPSMM 800
#else
#define Z_STEPSMM 1600
#endif
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, Y_STEPSMM, Z_STEPSMM, 93 }
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, Y_STEPSMM, Z_STEPSMM, E_STEPSMM }
/**
* Default Max Feed Rate (mm/s)
* Override with M203
* X, Y, Z, E0 [, E1[, E2...]]
*/
#if ENABLED(Y_2208) && DISABLED(Y_Spreadcycle)
#define Y_MAXFEED 100
#else
#define Y_MAXFEED 150
#endif
#define DEFAULT_MAX_FEEDRATE { 200, Y_MAXFEED, 8, 75 }
#define DEFAULT_MAX_FEEDRATE { 300, 150, 5, 70 }
#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING)
#define MAX_FEEDRATE_EDIT_VALUES { 300, 200, 15, 150 } // ...or, set your own edit limits
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
#endif
/**
@@ -889,11 +963,30 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 750, 500, 400, 3000 }
#if(ENABLED(X_2208))
#if(ENABLED(X_SpreadCycle))
#define x_accel 750
#else
#define x_accel 500
#endif
#else
#define x_accel 750
#endif
#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if(ENABLED(Y_2208))
#if(ENABLED(Y_SpreadCycle))
#define y_accel 500
#else
#define y_accel 300
#endif
#else
#define y_accel 500
#endif
#define DEFAULT_MAX_ACCELERATION { x_accel, y_accel, 400, 4000 }
//#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
#define MAX_ACCEL_EDIT_VALUES { 1500, 1500, 800, 5000 } // ...or, set your own edit limits
#define MAX_ACCEL_EDIT_VALUES { 6000, 6000, 200, 20000 } // ...or, set your own edit limits
#endif
/**
@@ -905,7 +998,7 @@
* M204 T Travel Acceleration
*/
#define DEFAULT_ACCELERATION 500 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
#define DEFAULT_RETRACT_ACCELERATION 500 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 500 // X, Y, Z acceleration for travel (non printing) moves
/**
@@ -1095,24 +1188,27 @@
*
* Specify a Probe position as { X, Y, Z }
*/
#if ENABLED(TREX3)
#define NOZZLE_TO_PROBE_OFFSET { -3, 31, 0 }
#if ENABLED(E3DHemeraExtruder)
#define NOZZLE_TO_PROBE_OFFSET { -38, 0, 0 }
#elif ENABLED(HotendMosquito)
#define NOZZLE_TO_PROBE_OFFSET { 35, 10, 0 }
#else
#define NOZZLE_TO_PROBE_OFFSET { -7, 29, 0 }
#define NOZZLE_TO_PROBE_OFFSET { -22, 0, 0 }
#endif
// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
#define MIN_PROBE_EDGE 10
#define MIN_PROBE_EDGE 8
// X and Y axis travel speed (mm/m) between probes
#define XY_PROBE_SPEED 5000
#define XY_PROBE_SPEED 10000
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
#define Z_PROBE_SPEED_FAST (HOMING_FEEDRATE_Z * 2)
// Feedrate (mm/m) for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
#define Z_PROBE_SPEED_SLOW Z_PROBE_SPEED_FAST
/**
* Multiple Probing
@@ -1145,14 +1241,14 @@
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
#define Z_AFTER_PROBING 5 // Z position after probing is done
#define Z_PROBE_LOW_POINT -3 // Farthest distance below the trigger-point to go before stopping
#define Z_PROBE_LOW_POINT -4 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -9
#define Z_PROBE_OFFSET_RANGE_MAX 9
// Enable the M48 repeatability test to test probe accuracy
#define Z_MIN_PROBE_REPEATABILITY_TEST
//#define Z_MIN_PROBE_REPEATABILITY_TEST
// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW
@@ -1199,30 +1295,32 @@
// @section machine
// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#if ENABLED(X_2208)
#if ANY(X_2208, X_2209_Uart)
#define INVERT_X_DIR true
#else
#define INVERT_X_DIR false
#endif
#if ENABLED(Y_2208)
#if ANY(Y_2208, Y_2209_Uart)
#define INVERT_Y_DIR true
#else
#define INVERT_Y_DIR false
#endif
#if ENABLED(Z_2208)
#if ANY(Z_2208, Z_2209_Uart)
#define INVERT_Z_DIR false
#else
#define INVERT_Z_DIR true
#endif
// @section extruder
// For direct drive extruder v9 set to true, for geared extruder set to false.
#if ENABLED(E_2208) && DISABLED(TREX3)
#define INVERT_E0_DIR true
#define INVERT_E1_DIR false
#else
#if (ANY(E_2208, E_2209_Uart) && NONE(HotendMosquito, ExtruderBMG)) || (ANY(HotendMosquito, ExtruderBMG) && NONE(E_2208, E_2209_Uart))
#define INVERT_E0_DIR false
#define INVERT_E1_DIR true
#else
#define INVERT_E0_DIR true
#define INVERT_E1_DIR false
#endif
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
@@ -1237,7 +1335,7 @@
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
//#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
#define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure to have this much clearance over your Z_MAX_POS to prevent grinding.
//#define Z_AFTER_HOMING 10 // (mm) Height to move to after homing Z
@@ -1245,29 +1343,25 @@
// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR 1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1
// @section machine
// The size of the print bed
#define X_BED_SIZE 400
#if ANY(RAPTOR2, E3DHemeraExtruder)
#define X_BED_SIZE 385
#else
#define X_BED_SIZE 400
#endif
#define Y_BED_SIZE 400
// Travel limits (mm) after homing, corresponding to endstop positions.
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
#define X_MIN_POS -42
#define Y_MIN_POS 0
#define Z_MIN_POS -3
#define X_MAX_POS 450
#define Y_MAX_POS Y_BED_SIZE
#else
#define X_MIN_POS -47
#define Y_MIN_POS 0
#define Z_MIN_POS -3
#define X_MAX_POS 460
#define Y_MAX_POS Y_BED_SIZE
#endif
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#if(ENABLED(tallVersion))
#define Z_MAX_POS 700
#else
@@ -1311,20 +1405,17 @@
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
* By default the firmware assumes HIGH=FILAMENT PRESENT.
*/
#if ANY(FilamentSensor, filamentEncoder, lerdgeFilSensor)
#if ANY(RunoutSensor, RunoutEncoder)
#define FILAMENT_RUNOUT_SENSOR
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#if ENABLED(TREX3)
#define NUM_RUNOUT_SENSORS 2
#else
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#endif
#if ENABLED(lerdgeFilSensor) || ENABLED(TREX3)
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#else
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.
#endif
#if NONE(RAPTOR2, SKRBoard)
#define FIL_RUNOUT_PIN 57
#define FIL_RUNOUT_INVERTING true // set to true to invert the logic of the sensor.
#else
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
#endif
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
@@ -1335,7 +1426,7 @@
// After a runout is detected, continue printing this length of filament
// before executing the runout script. Useful for a sensor at the end of
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
#if ENABLED(filamentEncoder)
#if ENABLED(RunoutEncoder)
#define FILAMENT_RUNOUT_DISTANCE_MM 15
#else
#define FILAMENT_RUNOUT_DISTANCE_MM 5
@@ -1345,7 +1436,7 @@
// Enable this option to use an encoder disc that toggles the runout pin
// as the filament moves. (Be sure to set FILAMENT_RUNOUT_DISTANCE_MM
// large enough to avoid false positives.)
#if ENABLED(filamentEncoder)
#if ENABLED(RunoutEncoder)
#define FILAMENT_MOTION_SENSOR
#endif
#endif
@@ -1391,11 +1482,12 @@
*/
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
#if ENABLED(ABL_Bilinear)
#define AUTO_BED_LEVELING_BILINEAR
#else
#if(ENABLED(UBL))
#define AUTO_BED_LEVELING_UBL
#else
#define AUTO_BED_LEVELING_BILINEAR
#endif
//#define MESH_BED_LEVELING
/**
@@ -1451,7 +1543,7 @@
// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID
#define EXTRAPOLATE_BEYOND_GRID
//
// Experimental Subdivision of the grid by Catmull-Rom method.
@@ -1473,7 +1565,7 @@
#define MESH_EDIT_GFX_OVERLAY // Display a graphics overlay while editing the mesh
#define MESH_INSET 3 // Set Mesh bounds as an inset region of the bed
#define MESH_INSET 5 // Set Mesh bounds as an inset region of the bed
#define GRID_MAX_POINTS_X 15 // Don't use more than 15 points per axis, implementation limited.
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
@@ -1516,7 +1608,7 @@
#define LEVEL_CORNERS_INSET_LFRB { 30, 30, 30, 30 } // (mm) Left, Front, Right, Back insets
#define LEVEL_CORNERS_HEIGHT 0.0 // (mm) Z height of nozzle at leveling points
#define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Z height of nozzle between leveling points
//#define LEVEL_CENTER_TOO // Move to the center after the last corner
#define LEVEL_CENTER_TOO // Move to the center after the last corner
#endif
/**
@@ -1535,7 +1627,7 @@
// For DELTA this is the top-center of the Cartesian print volume.
//#define MANUAL_X_HOME_POS 0
//#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
//
@@ -1555,7 +1647,7 @@
// Homing speeds (mm/m)
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (6*60)
#define HOMING_FEEDRATE_Z (4*60)
// Validate that endstops are triggered on homing moves
#define VALIDATE_HOMING_ENDSTOPS
@@ -1686,10 +1778,10 @@
#define NOZZLE_PARK_FEATURE
#if ENABLED(NOZZLE_PARK_FEATURE)
// Specify a park position as { X, Y, Z_raise }
#define NOZZLE_PARK_POINT { 150, (Y_MIN_POS + 10), 10 }
#define NOZZLE_PARK_XY_FEEDRATE 100 // (mm/s) X and Y axes feedrate (also used for delta Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // (mm/s) Z axis feedrate (not used for delta printers)
// Specify a park position as { X, Y, Z }
#define NOZZLE_PARK_POINT { 10, 10, 20}
#define NOZZLE_PARK_XY_FEEDRATE 70 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
#define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
#endif
/**
@@ -1730,19 +1822,19 @@
* Attention: EXPERIMENTAL. G-code arguments may change.
*
*/
#define NOZZLE_CLEAN_FEATURE
//#define NOZZLE_CLEAN_FEATURE
#if ENABLED(NOZZLE_CLEAN_FEATURE)
// Default number of pattern repetitions
#define NOZZLE_CLEAN_STROKES 4
#define NOZZLE_CLEAN_STROKES 12
// Default number of triangles
#define NOZZLE_CLEAN_TRIANGLES 3
// Specify positions for each tool as { { X, Y, Z }, { X, Y, Z } }
// Dual hotend system may use { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
#define NOZZLE_CLEAN_START_POINT { { -20, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { 420, (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
#define NOZZLE_CLEAN_END_POINT { { (-30), (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }, { (430), (Y_BED_SIZE / 2), (Z_MIN_POS + 1) }}
#define NOZZLE_CLEAN_START_POINT { { 30, 30, (Z_MIN_POS + 1) } }
#define NOZZLE_CLEAN_END_POINT { { 100, 60, (Z_MIN_POS + 1) } }
// Circular pattern radius
#define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
@@ -1933,7 +2025,7 @@
// If you have a speaker that can produce tones, enable it here.
// By default Marlin assumes you have a buzzer with a fixed frequency.
//
//#define SPEAKER
#define SPEAKER
//
// The duration and frequency for the UI feedback sound.
@@ -2320,9 +2412,8 @@
// Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
// which is not as annoying as with the hardware PWM. On the other hand, if this frequency
// is too low, you should also increment SOFT_PWM_SCALE.
#if ENABLED(TREX3)
#define FAN_SOFT_PWM
#endif
//#define FAN_SOFT_PWM
// Incrementing this by 1 will double the software PWM frequency,
// affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
// However, control resolution will be halved for each increment;
+162 -121
View File
@@ -169,7 +169,7 @@
* and/or decrease WATCH_TEMP_INCREASE. WATCH_TEMP_INCREASE should not be set
* below 2.
*/
#define WATCH_TEMP_PERIOD 60 // Seconds
#define WATCH_TEMP_PERIOD 210 // Seconds
#define WATCH_TEMP_INCREASE 2 // Degrees Celsius
#endif
@@ -177,13 +177,13 @@
* Thermal Protection parameters for the bed are just as above for hotends.
*/
#if ENABLED(THERMAL_PROTECTION_BED)
#define THERMAL_PROTECTION_BED_PERIOD 80 // Seconds
#define THERMAL_PROTECTION_BED_PERIOD 300 // Seconds
#define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
/**
* As described above, except for the bed (M140/M190/M303).
*/
#define WATCH_BED_TEMP_PERIOD 80 // Seconds
#define WATCH_BED_TEMP_PERIOD 60 // Seconds
#define WATCH_BED_TEMP_INCREASE 2 // Degrees Celsius
#endif
@@ -413,14 +413,12 @@
* Multiple extruders can be assigned to the same pin in which case
* the fan will turn on when any selected extruder is above the threshold.
*/
#if ENABLED(TREX3)
#define E0_AUTO_FAN_PIN 6
#define E1_AUTO_FAN_PIN 45
#if ENABLED(RAPTOR2) && DISABLED(SKRBoard)
#define E0_AUTO_FAN_PIN 9
#else
#define E0_AUTO_FAN_PIN -1
#define E1_AUTO_FAN_PIN -1
#endif
#define E1_AUTO_FAN_PIN -1
#define E2_AUTO_FAN_PIN -1
#define E3_AUTO_FAN_PIN -1
#define E4_AUTO_FAN_PIN -1
@@ -446,9 +444,11 @@
/**
* M355 Case Light on-off / brightness
*/
#define CASE_LIGHT_ENABLE
#if DISABLED(SKRBoard)
#define CASE_LIGHT_ENABLE
#endif
#if ENABLED(CASE_LIGHT_ENABLE)
//#define CASE_LIGHT_PIN 4 // Override the default pin if needed
#define CASE_LIGHT_PIN 5 // Override the default pin if needed
#define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW
#define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on
#define CASE_LIGHT_DEFAULT_BRIGHTNESS 255 // Set default power-up brightness (0-255, requires PWM pin)
@@ -516,7 +516,11 @@
//
// For Z set the number of stepper drivers
//
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
#if ENABLED(SKRBoard) && ENABLED(DualZ)
#define NUM_Z_STEPPER_DRIVERS 2 // (1-4) Z options change based on how many
#else
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
#endif
#if NUM_Z_STEPPER_DRIVERS > 1
//#define Z_MULTI_ENDSTOPS
@@ -562,16 +566,12 @@
* Set the initial X offset and temperature differential with M605 S2 X[offs] R[deg] and
* follow with M605 S3 to initiate mirrored movement.
*/
#define DUAL_X_CARRIAGE
//#define DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
#define X1_MIN_POS X_MIN_POS // Set to X_MIN_POS
#define X1_MAX_POS X_BED_SIZE // Set a maximum so the first X-carriage can't hit the parked second X-carriage
#define X2_MIN_POS 0 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage
#if DISABLED(TREX3) || ENABLED(TREX3_UPGRADE)
#define X2_MAX_POS 442 // Set this to the distance between toolheads when both heads are homed
#else
#define X2_MAX_POS 446 // Set this to the distance between toolheads when both heads are homed
#endif
#define X2_MIN_POS 80 // Set a minimum to ensure the second X-carriage can't hit the parked first X-carriage
#define X2_MAX_POS 353 // Set this to the distance between toolheads when both heads are homed
#define X2_HOME_DIR 1 // Set to 1. The second X-carriage always homes to the maximum endstop position
#define X2_HOME_POS X2_MAX_POS // Default X2 home position. Set to X2_MAX_POS.
// However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
@@ -583,7 +583,7 @@
#define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_AUTO_PARK_MODE
// Default x offset in duplication mode (typically set to half print bed width)
#define DEFAULT_DUPLICATION_X_OFFSET 200
#define DEFAULT_DUPLICATION_X_OFFSET 100
#endif // DUAL_X_CARRIAGE
@@ -678,7 +678,9 @@
* Z Steppers Auto-Alignment
* Add the G34 command to align multiple Z steppers using a bed probe.
*/
//#define Z_STEPPER_AUTO_ALIGN
#if ENABLED(SKRBoard) && ENABLED(DualZ)
#define Z_STEPPER_AUTO_ALIGN
#endif
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
// Define probe X and Y positions for Z1, Z2 [, Z3 [, Z4]]
// If not defined, probe limits will be used.
@@ -758,7 +760,7 @@
#define DEFAULT_MINIMUMFEEDRATE 0.0 // minimum feedrate
#define DEFAULT_MINTRAVELFEEDRATE 0.0
//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated
// Minimum time that a segment needs to take if the buffer is emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (ms)
@@ -780,7 +782,9 @@
// Backlash Compensation
// Adds extra movement to axes on direction-changes to account for backlash.
//
#define BACKLASH_COMPENSATION
#if ENABLED(SKRBoard)
#define BACKLASH_COMPENSATION
#endif
#if ENABLED(BACKLASH_COMPENSATION)
// Define values for backlash distance and correction.
// If BACKLASH_GCODE is enabled these values are the defaults.
@@ -822,9 +826,7 @@
* Note: HOTEND_OFFSET and CALIBRATION_OBJECT_CENTER must be set to within
* ±5mm of true values for G425 to succeed.
*/
#if ENABLED(autoCalibrationKit)
#define CALIBRATION_GCODE
#endif
//#define CALIBRATION_GCODE
#if ENABLED(CALIBRATION_GCODE)
#define CALIBRATION_MEASUREMENT_RESOLUTION 0.01 // mm
@@ -841,8 +843,8 @@
//#define CALIBRATION_REPORTING
// The true location and dimension the cube/bolt/washer on the bed.
#define CALIBRATION_OBJECT_CENTER { 264.0, 25.0, 12.5 } // mm
#define CALIBRATION_OBJECT_DIMENSIONS { 12.55, 12.55, 4.0 } // mm
#define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm
#define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm
// Comment out any sides which are unreachable by the probe. For best
// auto-calibration results, all sides must be reachable.
@@ -853,12 +855,12 @@
// Probing at the exact top center only works if the center is flat. If
// probing on a screwhead or hollow washer, probe near the edges.
#define CALIBRATION_MEASURE_AT_TOP_EDGES
//#define CALIBRATION_MEASURE_AT_TOP_EDGES
// Define the pin to read during calibration
#ifndef CALIBRATION_PIN
#define CALIBRATION_PIN 58 // Override in pins.h or set to -1 to use your Z endstop
#define CALIBRATION_PIN_INVERTING true // Set to true to invert the pin
//#define CALIBRATION_PIN -1 // Define here to override the default pin
#define CALIBRATION_PIN_INVERTING false // Set to true to invert the custom pin
//#define CALIBRATION_PIN_PULLDOWN
#define CALIBRATION_PIN_PULLUP
#endif
@@ -870,7 +872,9 @@
* vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
* lowest stepping frequencies.
*/
//#define ADAPTIVE_STEP_SMOOTHING
#if ENABLED(SKRBoard)
#define ADAPTIVE_STEP_SMOOTHING
#endif
/**
* Custom Microstepping
@@ -965,7 +969,7 @@
#if HAS_LCD_MENU
// Include a page of printer information in the LCD Main Menu
#define LCD_INFO_MENU
//#define LCD_INFO_MENU
#if ENABLED(LCD_INFO_MENU)
//#define LCD_PRINTER_INFO_IS_BOOTSCREEN // Show bootscreen(s) instead of Printer Info pages
#endif
@@ -1048,7 +1052,7 @@
//#define MENU_ADDAUTOSTART // Add a menu option to run auto#.g files
#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
#define EVENT_GCODE_SD_STOP "G1X50Y50\nM84" // G-code to run on Stop Print (e.g., "G28XY" or "G27")
/**
* Continue after Power-Loss (Creality3D)
@@ -1066,8 +1070,10 @@
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
#if ENABLED(SKRBoard)
#define POWER_LOSS_PIN -1 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
#define POWER_LOSS_STATE LOW // State of pin indicating power loss
#endif
//#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
//#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power.
@@ -1227,7 +1233,7 @@
*/
#if HAS_GRAPHICAL_LCD
// Show SD percentage next to the progress bar
//#define DOGM_SD_PERCENT
#define DOGM_SD_PERCENT
// Enable to save many cycles by drawing a hollow frame on the Info Screen
#define XYZ_HOLLOW_FRAME
@@ -1237,7 +1243,7 @@
// A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_BIG_EDIT_FONT
#define USE_BIG_EDIT_FONT
// A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
@@ -1285,13 +1291,18 @@
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
#if ENABLED(UBL) && DISABLED(SKRBoard)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
#else
#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~3260 (or ~940) bytes of PROGMEM.
#endif
// Frivolous Game Options
//#define MARLIN_BRICKOUT
//#define MARLIN_INVADERS
//#define MARLIN_SNAKE
#if ENABLED(SKRBoard)
#define MARLIN_BRICKOUT
#define MARLIN_INVADERS
#define MARLIN_SNAKE
#endif
//#define GAMES_EASTER_EGG // Add extra blank lines above the "Games" sub-menu
#endif // HAS_GRAPHICAL_LCD
@@ -1314,9 +1325,9 @@
#define DGUS_PREHEAT_UI // Display a preheat screen during heatup
#if ENABLED(DGUS_LCD_UI_FYSETC)
//#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
//#define DUGS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
#else
#define DGUS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
#define DUGS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
#endif
#define DGUS_FILAMENT_LOADUNLOAD
@@ -1471,7 +1482,7 @@
//#define BABYSTEP_WITHOUT_HOMING
//#define BABYSTEP_XY // Also enable X/Y Babystepping. Not supported on DELTA!
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
#define BABYSTEP_MULTIPLICATOR_Z 20 // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR_Z (Z_STEPSMM / 40) // Babysteps are very small. Increase for faster motion.
#define BABYSTEP_MULTIPLICATOR_XY 1
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
@@ -1489,7 +1500,7 @@
#define BABYSTEP_ZPROBE_OFFSET // Combine M851 Z and Babystepping
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
//#define BABYSTEP_HOTEND_Z_OFFSET // For multiple hotends, babystep relative Z offsets
#define BABYSTEP_ZPROBE_GFX_OVERLAY // Enable graphical overlay on Z-offset editor
#endif
#endif
@@ -1512,12 +1523,12 @@
* See http://marlinfw.org/docs/features/lin_advance.html for full instructions.
* Mention @Sebastianv650 on GitHub to alert the author of any issues.
*/
#if DISABLED(E_2208) || ENABLED(E_Spreadcycle)
#if DISABLED(E_2208)
#define LIN_ADVANCE
#endif
#if ENABLED(LIN_ADVANCE)
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
#define LIN_ADVANCE_K 0.0 // Unit: mm compression per 1mm/s extruder speed
#define LIN_ADVANCE_K 0.00 // Unit: mm compression per 1mm/s extruder speed
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
#endif
@@ -1562,10 +1573,10 @@
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
// Override the mesh area if the automatic (max) area is too large
#define MESH_MIN_X X_MIN_POS + MESH_INSET
#define MESH_MIN_Y Y_MIN_POS + MESH_INSET
#define MESH_MAX_X X_MAX_POS - MESH_INSET
#define MESH_MAX_Y Y_MAX_POS - MESH_INSET
//#define MESH_MIN_X MESH_INSET
//#define MESH_MIN_Y MESH_INSET
//#define MESH_MAX_X X_BED_SIZE - (MESH_INSET)
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif
/**
@@ -1628,9 +1639,7 @@
//
// G2/G3 Arc Support
//
#if DISABLED(autoCalibrationKit)
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
#endif
#define ARC_SUPPORT // Disable this feature to save ~3226 bytes
#if ENABLED(ARC_SUPPORT)
#define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment
//#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min
@@ -1642,10 +1651,9 @@
#endif
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
#if DISABLED(autoCalibrationKit)
//#define BEZIER_CURVE_SUPPORT
#if DISABLED(UBL) && DISABLED(SKRBoard)
#define BEZIER_CURVE_SUPPORT
#endif
/**
* G38 Probe Target
*
@@ -1675,8 +1683,8 @@
*
* Override the default value based on the driver type set in Configuration.h.
*/
//#define MINIMUM_STEPPER_POST_DIR_DELAY 650
//#define MINIMUM_STEPPER_PRE_DIR_DELAY 650
#define MINIMUM_STEPPER_POST_DIR_DELAY 250
#define MINIMUM_STEPPER_PRE_DIR_DELAY 250
/**
* Minimum stepper driver pulse width (in µs)
@@ -1718,8 +1726,8 @@
// The number of linear motions that can be in the plan at any give time.
// THE BLOCK_BUFFER_SIZE NEEDS TO BE A POWER OF 2 (e.g. 8, 16, 32) because shifts and ors are used to do the ring-buffering.
#if ENABLED(SDSUPPORT)
#define BLOCK_BUFFER_SIZE 16 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#if ENABLED(UBL)
#define BLOCK_BUFFER_SIZE 8 // SD,LCD,Buttons take more memory, block buffer needs to be smaller
#else
#define BLOCK_BUFFER_SIZE 16 // maximize block buffer
#endif
@@ -1728,7 +1736,11 @@
// The ASCII buffer for serial input
#define MAX_CMD_SIZE 96
#define BUFSIZE 4
#if ENABLED(SKRBoard)
#define BUFSIZE 16
#else
#define BUFSIZE 8
#endif
// Transmission to Host Buffer Size
// To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
@@ -1737,8 +1749,11 @@
// For debug-echo: 128 bytes for the optimal speed.
// Other output doesn't need to be that speedy.
// :[0, 2, 4, 8, 16, 32, 64, 128, 256]
#define TX_BUFFER_SIZE 0
#if ENABLED(SKRBoard)
#define TX_BUFFER_SIZE 32
#else
#define TX_BUFFER_SIZE 0
#endif
// Host Receive Buffer Size
// Without XON/XOFF flow control (see SERIAL_XON_XOFF below) 32 bytes should be enough.
// To use flow control, set this buffer size to at least 1024 bytes.
@@ -1768,7 +1783,9 @@
// enter the serial receive buffer, so they cannot be blocked.
// Currently handles M108, M112, M410
// Does not work on boards using AT90USB (USBCON) processors!
#define EMERGENCY_PARSER
#if DISABLED(SKR11Pro)
#define EMERGENCY_PARSER
#endif
// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
@@ -1809,7 +1826,7 @@
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*
*/
#if ENABLED(ABL_Bilinear)
#if DISABLED(UBL) && DISABLED(SKRBoard)
#define FWRETRACT
#endif
#if ENABLED(FWRETRACT)
@@ -1837,19 +1854,19 @@
*/
#if EXTRUDERS > 1
// Z raise distance for tool-change, as needed for some extruders
#define TOOLCHANGE_ZRAISE 1 // (mm)
#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
#define TOOLCHANGE_ZRAISE 2 // (mm)
//#define TOOLCHANGE_NO_RETURN // Never return to the previous position on tool-change
#if ENABLED(TOOLCHANGE_NO_RETURN)
#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // G-code to run after tool-change is complete
//#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // G-code to run after tool-change is complete
#endif
// Retract and prime filament on tool-change
#define TOOLCHANGE_FILAMENT_SWAP
//#define TOOLCHANGE_FILAMENT_SWAP
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
#define TOOLCHANGE_FIL_SWAP_LENGTH 4 // (mm)
#define TOOLCHANGE_FIL_SWAP_LENGTH 12 // (mm)
#define TOOLCHANGE_FIL_EXTRA_PRIME 2 // (mm)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3000 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3000 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_RETRACT_SPEED 3600 // (mm/m)
#define TOOLCHANGE_FIL_SWAP_PRIME_SPEED 3600 // (mm/m)
#endif
/**
@@ -1876,25 +1893,25 @@
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (mm/s) Initial retract feedrate.
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
#define PAUSE_PARK_RETRACT_LENGTH 2 // (mm) Initial retract.
// This short retract is done immediately, before parking the nozzle.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 41 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 70 // (mm) The length of filament for a complete unload.
#define FILAMENT_CHANGE_UNLOAD_LENGTH 100 // (mm) The length of filament for a complete unload.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
// Set to 0 for manual unloading.
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
// 0 to disable start loading and skip to fast load only
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 6 // (mm/s) Load filament feedrate. This can be pretty fast.
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 50 // (mm) Load length of filament, from extruder gear to nozzle.
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 2 // (mm) Load length of filament, from extruder gear to nozzle.
// For Bowden, the full length of the tube and nozzle.
// For direct drive, the full length of the nozzle.
//#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
#define ADVANCED_PAUSE_PURGE_FEEDRATE 3 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
#define ADVANCED_PAUSE_PURGE_LENGTH 20 // (mm) Length to extrude after loading.
#define ADVANCED_PAUSE_PURGE_LENGTH 50 // (mm) Length to extrude after loading.
// Set to 0 for manual extrusion.
// Filament can be extruded repeatedly from the Filament Change menu
// until extrusion is consistent, and to purge old filament.
@@ -1902,17 +1919,17 @@
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
// Filament Unload does a Retract, Delay, and Purge first:
#define FILAMENT_UNLOAD_PURGE_RETRACT 4 // (mm) Unload initial retract length.
#define FILAMENT_UNLOAD_PURGE_DELAY 2000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_RETRACT 13 // (mm) Unload initial retract length.
#define FILAMENT_UNLOAD_PURGE_DELAY 5000 // (ms) Delay for the filament to cool after retract.
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
#define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 1 // Number of alert beeps to play when a response is needed.
#define FILAMENT_CHANGE_ALERT_BEEPS 2 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change.
#define HOME_BEFORE_FILAMENT_CHANGE // Ensure homing has been completed prior to parking for filament change
#define FILAMENT_LOAD_UNLOAD_GCODES // Add M701/M702 Load/Unload G-codes, plus Load/Unload in the LCD Prepare menu.
#define FILAMENT_UNLOAD_ALL_EXTRUDERS // Allow M702 to unload all extruders above a minimum target temp (as set by M302)
@@ -2211,15 +2228,35 @@
* Set *_SERIAL_TX_PIN and *_SERIAL_RX_PIN to match for all drivers
* on the same serial port, either here or in your board's pins file.
*/
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#if ENABLED(SKRBoard)
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 0
#define Z_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#else
#define X_SLAVE_ADDRESS 0
#define Y_SLAVE_ADDRESS 2
#define Z_SLAVE_ADDRESS 1
#define E0_SLAVE_ADDRESS 3
#define X_SERIAL_TX_PIN 58
#define X_SERIAL_RX_PIN 12
#define Y_SERIAL_TX_PIN 58
#define Y_SERIAL_RX_PIN 12
#define Z_SERIAL_TX_PIN 58
#define Z_SERIAL_RX_PIN 12
#define E0_SERIAL_TX_PIN 58
#define E0_SERIAL_RX_PIN 12
#endif
#define X2_SLAVE_ADDRESS 0
#define Y2_SLAVE_ADDRESS 0
#define Z2_SLAVE_ADDRESS 0
#define Z3_SLAVE_ADDRESS 0
#define Z4_SLAVE_ADDRESS 0
#define E0_SLAVE_ADDRESS 0
#define E1_SLAVE_ADDRESS 0
#define E2_SLAVE_ADDRESS 0
#define E3_SLAVE_ADDRESS 0
@@ -2243,7 +2280,7 @@
*/
#define STEALTHCHOP_XY
#define STEALTHCHOP_Z
#define STEALTHCHOP_E
//#define STEALTHCHOP_E
/**
* Optimize spreadCycle chopper parameters by using predefined parameter sets
@@ -2259,7 +2296,7 @@
* Define you own with
* { <off_time[1..15]>, <hysteresis_end[-3..12]>, hysteresis_start[1..8] }
*/
#define CHOPPER_TIMING CHOPPER_DEFAULT_12V
#define CHOPPER_TIMING CHOPPER_DEFAULT_24V
/**
* Monitor Trinamic drivers for error conditions,
@@ -2272,7 +2309,9 @@
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
* M122 - Report driver parameters (Requires TMC_DEBUG)
*/
//#define MONITOR_DRIVER_STATUS
#if ENABLED(SKRBoard)
#define MONITOR_DRIVER_STATUS
#endif
#if ENABLED(MONITOR_DRIVER_STATUS)
#define CURRENT_STEP_DOWN 50 // [mA]
@@ -2287,12 +2326,12 @@
* STEALTHCHOP_(XY|Z|E) must be enabled to use HYBRID_THRESHOLD.
* M913 X/Y/Z/E to live tune the setting
*/
//#define HYBRID_THRESHOLD
#define HYBRID_THRESHOLD
#define X_HYBRID_THRESHOLD 100 // [mm/s]
#define X2_HYBRID_THRESHOLD 100
#define Y_HYBRID_THRESHOLD 100
#define Y2_HYBRID_THRESHOLD 100
#define X_HYBRID_THRESHOLD 70 // [mm/s]
#define X2_HYBRID_THRESHOLD 70
#define Y_HYBRID_THRESHOLD 50
#define Y2_HYBRID_THRESHOLD 50
#define Z_HYBRID_THRESHOLD 3
#define Z2_HYBRID_THRESHOLD 3
#define Z3_HYBRID_THRESHOLD 3
@@ -2345,7 +2384,7 @@
* Beta feature!
* Create a 50/50 square wave step pulse optimal for stepper drivers.
*/
//#define SQUARE_WAVE_STEPPING
#define SQUARE_WAVE_STEPPING
/**
* Enable M122 debugging command for TMC stepper drivers.
@@ -2366,7 +2405,7 @@
*/
#define TMC_ADV() { }
#endif // HAS_TRINAMIC_CONFIG
#endif // HAS_TRINAMIC
// @section L64XX
@@ -2661,12 +2700,11 @@
*
* See http://marlinfw.org/docs/configuration/laser_spindle.html for more config details.
*/
#if ENABLED(TREX3)
//#define SPINDLE_FEATURE
#if ENABLED(RAPTOR2) && DISABLED(SKRBoard)
#define LASER_FEATURE
#endif
#if EITHER(SPINDLE_FEATURE, LASER_FEATURE)
//#define SHOW_CUTTER_ICON
#define SPINDLE_LASER_ACTIVE_HIGH true // Set to "true" if the on/off function is active HIGH
#define SPINDLE_LASER_PWM false // Set to "true" if your controller supports setting the speed/power
#define SPINDLE_LASER_PWM_INVERT true // Set to "true" if the speed/power goes up when you want it to go slower
@@ -2853,37 +2891,40 @@
/**
* User-defined menu items that execute custom GCode
*/
#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
//#define USER_SCRIPT_DONE "M117 User Script Done"
#define CUSTOM_USER_MENU_TITLE "Setup"
#define CUSTOM_USER_MENU_TITLE "Leveling Tools"
#define USER_SCRIPT_AUDIBLE_FEEDBACK
#define USER_SCRIPT_RETURN // Return to status screen after a script
#if ENABLED(TREX3)
#define COMMFANNSPEED " "
#if ENABLED(DualZ)
#define DZ_Script "G34I8\n"
#else
#define COMMFANNSPEED "M106 S128 \n"
#define DZ_Script
#endif
#define USER_DESC_1 "Setup"
#if ENABLED(UBL)
#define USER_GCODE_1 "M190S75\nG28\n" DZ_Script "G29P1\nG29P3\nM109S215\nG29S1\nG29S0\nG29F0.0\nG29A\nG28\nG1X150Y150F5000\nG1Z0\nM500\nM400\nM117 Set Z Offset"
#else
#define USER_GCODE_1 "M190S75\nG28\n" DZ_Script "G29\nM400\nM109S215\nG28\nM420S1\nG1X100Y100F5000\nG1Z0\nM500\nM117 Set Z Offset"
#endif
#define USER_DESC_1 "Mesh Setup"
#define USER_DESC_3 "Prep for Z Adjust"
#if ENABLED(ABL_Bilinear)
#define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 \n M500 \n G28 \n M420 S1 \n " COMMFANNSPEED " M109 S225 \n G1 X100 Y 100 \n G1 Z0 \n M77 \n M117 Set Z Offset"
#define USER_GCODE_3 "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n M420 S1 \n G1 X100 Y 100 \n G1 Z0"
#else
#define USER_GCODE_1 "M502 \n M500 \n M501 \n M190 S75 \n G28 \n G29 P1 \n G29 S1 \n G29 S0 \n G29 F 10.0 \n G29 A \n M500 \n G28 \n G29 L1 \n " COMMFANNSPEED " M109 S225 \n G1 X150 Y 150 \n G1 Z0 \n M77 \n M117 Set Z Offset"
#define USER_GCODE_3 "M190 S75 \n " COMMFANNSPEED " M104 235 \n G28 \n G29 L1 \n G1 X100 Y 100 \n G1 Z0"
#endif
#define USER_DESC_2 "PID Hotend"
#define USER_GCODE_2 "G28\nG1X200Y200Z5\nM106S128\nM303C8S215E0U\nM500\nM117 PID Tune Done"
#define USER_DESC_4 "Fill Mesh Points"
#define USER_GCODE_4 "G29 P3 \n G29 P3 \n G29 P3 \n G29 T"
#define USER_DESC_3 "PID Bed"
#define USER_GCODE_3 "M303C4S75E-1U\nM500\nM117 PID Tune Done"
#define USER_DESC_2 "PID Bed"
#define USER_GCODE_2 "M303 C4 S75 E-1 U \n M500 \n M117 PID Tune Done"
#define USER_DESC_4 "Prep for Z Adjust"
#define USER_GCODE_4 "M190S75\nM104S215\nG28\nG29L1\nG1 X100Y100F5000\nG1Z0"
#define USER_DESC_5 "Run Mesh Validation"
#define USER_GCODE_5 "G26"
#define USER_DESC_5 "Store Settings"
#define USER_GCODE_5 "M500\nM117 Settings Stored"
#define USER_DESC_6 "Run Mesh Validation"
#define USER_GCODE_6 "G26"
#endif
/**
+65 -91
View File
@@ -92,9 +92,6 @@ U8GLIB ?= 1
# this defines whether to include the Trinamic TMCStepper library
TMC ?= 1
# this defines whether to include the AdaFruit NeoPixel library
NEOPIXEL ?= 0
############
# Try to automatically determine whether RELOC_WORKAROUND is needed based
# on GCC versions:
@@ -188,7 +185,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1109)
else ifeq ($(HARDWARE_MOTHERBOARD),1110)
# zrib V2.0 control board (Chinese knock off RAMPS replica)
else ifeq ($(HARDWARE_MOTHERBOARD),1111)
# BigTreeTech or BIQU KFB2.0
# Bigtreetech or BIQU KFB2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1112)
# Felix 2.0+ Electronics Board (RAMPS like)
else ifeq ($(HARDWARE_MOTHERBOARD),1113)
@@ -240,7 +237,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1134)
else ifeq ($(HARDWARE_MOTHERBOARD),1135)
# Dagoma F5
else ifeq ($(HARDWARE_MOTHERBOARD),1136)
# FYSETC F6
# Fysetc F6
else ifeq ($(HARDWARE_MOTHERBOARD),1137)
# Duplicator i3 Plus
else ifeq ($(HARDWARE_MOTHERBOARD),1138)
@@ -250,92 +247,69 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1139)
else ifeq ($(HARDWARE_MOTHERBOARD),1140)
# Z-Bolt X Series
else ifeq ($(HARDWARE_MOTHERBOARD),1141)
# TT OSCAR
else ifeq ($(HARDWARE_MOTHERBOARD),1142)
# Overlord/Overlord Pro
else ifeq ($(HARDWARE_MOTHERBOARD),1143)
# ADIMLab Gantry v1
else ifeq ($(HARDWARE_MOTHERBOARD),1144)
# ADIMLab Gantry v2
else ifeq ($(HARDWARE_MOTHERBOARD),1145)
# BIQU Tango V1
else ifeq ($(HARDWARE_MOTHERBOARD),1146)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1147)
#
# RAMBo and derivatives
#
# Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
# Mini-Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
# Mini-Rambo 1.0a
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
# Einsy Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
# Einsy Retro
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
# abee Scoovo X9H
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
#
# Other ATmega1280, ATmega2560
#
# Cartesio CN Controls V11
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
else ifeq ($(HARDWARE_MOTHERBOARD),1200)
# Cartesio CN Controls V12
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
# Cartesio CN Controls V15
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
else ifeq ($(HARDWARE_MOTHERBOARD),1201)
# Cheaptronic v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
else ifeq ($(HARDWARE_MOTHERBOARD),1202)
# Cheaptronic v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
else ifeq ($(HARDWARE_MOTHERBOARD),1203)
# Makerbot Mightyboard Revision E
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
else ifeq ($(HARDWARE_MOTHERBOARD),1204)
# Megatronics
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
else ifeq ($(HARDWARE_MOTHERBOARD),1205)
# Megatronics v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
else ifeq ($(HARDWARE_MOTHERBOARD),1206)
# Megatronics v3.0
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
else ifeq ($(HARDWARE_MOTHERBOARD),1207)
# Megatronics v3.1
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
else ifeq ($(HARDWARE_MOTHERBOARD),1208)
# Megatronics v3.2
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
else ifeq ($(HARDWARE_MOTHERBOARD),1209)
# Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1210)
# Mini-Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1211)
# Mini-Rambo 1.0a
else ifeq ($(HARDWARE_MOTHERBOARD),1212)
# Einsy Rambo
else ifeq ($(HARDWARE_MOTHERBOARD),1213)
# Einsy Retro
else ifeq ($(HARDWARE_MOTHERBOARD),1214)
# Elefu Ra Board (v3)
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
else ifeq ($(HARDWARE_MOTHERBOARD),1215)
# Leapfrog
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
else ifeq ($(HARDWARE_MOTHERBOARD),1216)
# Mega controller
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
else ifeq ($(HARDWARE_MOTHERBOARD),1217)
# abee Scoovo X9H
else ifeq ($(HARDWARE_MOTHERBOARD),1218)
# Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
else ifeq ($(HARDWARE_MOTHERBOARD),1219)
# Geeetech GT2560 Rev. A
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
else ifeq ($(HARDWARE_MOTHERBOARD),1220)
# Geeetech GT2560 Rev. A+ (with auto level probe)
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
else ifeq ($(HARDWARE_MOTHERBOARD),1221)
# Geeetech GT2560 Rev B for A10(M/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
else ifeq ($(HARDWARE_MOTHERBOARD),1222)
# Geeetech GT2560 Rev B for A20(M/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
else ifeq ($(HARDWARE_MOTHERBOARD),1223)
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1320)
else ifeq ($(HARDWARE_MOTHERBOARD),1224)
#
# ATmega1281, ATmega2561
#
# Minitronics v1.0/1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
MCU ?= atmega1281
# Silvergate v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
MCU ?= atmega1281
#
@@ -343,43 +317,43 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1401)
#
# Sanguinololu < 1.2
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
else ifeq ($(HARDWARE_MOTHERBOARD),1400)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Sanguinololu 1.2 and above
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
else ifeq ($(HARDWARE_MOTHERBOARD),1401)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Melzi
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
else ifeq ($(HARDWARE_MOTHERBOARD),1402)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Melzi with ATmega1284 (MaKr3d version)
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
else ifeq ($(HARDWARE_MOTHERBOARD),1403)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Melzi Creality3D board (for CR-10 etc)
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
else ifeq ($(HARDWARE_MOTHERBOARD),1404)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Melzi Malyan M150 board
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
else ifeq ($(HARDWARE_MOTHERBOARD),1405)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Tronxy X5S
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
else ifeq ($(HARDWARE_MOTHERBOARD),1406)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# STB V1.1
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
else ifeq ($(HARDWARE_MOTHERBOARD),1407)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Azteeg X1
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
else ifeq ($(HARDWARE_MOTHERBOARD),1408)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
# Anet 1.0 (Melzi clone)
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
else ifeq ($(HARDWARE_MOTHERBOARD),1409)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega1284p
@@ -388,51 +362,51 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1509)
#
# Gen3 Monolithic Electronics
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
else ifeq ($(HARDWARE_MOTHERBOARD),1500)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Gen3+
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
else ifeq ($(HARDWARE_MOTHERBOARD),1501)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Gen6
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
else ifeq ($(HARDWARE_MOTHERBOARD),1502)
HARDWARE_VARIANT ?= Gen6
MCU ?= atmega644p
# Gen6 deluxe
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
else ifeq ($(HARDWARE_MOTHERBOARD),1503)
HARDWARE_VARIANT ?= Gen6
MCU ?= atmega644p
# Gen7 custom (Alfons3 Version)
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
else ifeq ($(HARDWARE_MOTHERBOARD),1504)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644
F_CPU ?= 20000000
# Gen7 v1.1, v1.2
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
else ifeq ($(HARDWARE_MOTHERBOARD),1505)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
# Gen7 v1.3
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
else ifeq ($(HARDWARE_MOTHERBOARD),1506)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega644p
F_CPU ?= 20000000
# Gen7 v1.4
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
else ifeq ($(HARDWARE_MOTHERBOARD),1507)
HARDWARE_VARIANT ?= Gen7
MCU ?= atmega1284p
F_CPU ?= 20000000
# Alpha OMCA board
else ifeq ($(HARDWARE_MOTHERBOARD),1608)
else ifeq ($(HARDWARE_MOTHERBOARD),1508)
HARDWARE_VARIANT ?= SanguinoA
MCU ?= atmega644
# Final OMCA board
else ifeq ($(HARDWARE_MOTHERBOARD),1609)
else ifeq ($(HARDWARE_MOTHERBOARD),1509)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
# Sethi 3D_1
else ifeq ($(HARDWARE_MOTHERBOARD),1610)
else ifeq ($(HARDWARE_MOTHERBOARD),1510)
HARDWARE_VARIANT ?= Sanguino
MCU ?= atmega644p
@@ -441,35 +415,35 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1610)
#
# Teensylu
else ifeq ($(HARDWARE_MOTHERBOARD),1700)
else ifeq ($(HARDWARE_MOTHERBOARD),1600)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Printrboard (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),1701)
else ifeq ($(HARDWARE_MOTHERBOARD),1601)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Printrboard Revision F (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),1702)
else ifeq ($(HARDWARE_MOTHERBOARD),1602)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Brainwave (AT90USB646)
else ifeq ($(HARDWARE_MOTHERBOARD),1703)
else ifeq ($(HARDWARE_MOTHERBOARD),1603)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb646
# Brainwave Pro (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),1704)
else ifeq ($(HARDWARE_MOTHERBOARD),1604)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# SAV Mk-I (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),1705)
else ifeq ($(HARDWARE_MOTHERBOARD),1605)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# Teensy++2.0 (AT90USB1286)
else ifeq ($(HARDWARE_MOTHERBOARD),1706)
else ifeq ($(HARDWARE_MOTHERBOARD),1606)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
# 5DPrint D8 Driver Board
else ifeq ($(HARDWARE_MOTHERBOARD),1707)
else ifeq ($(HARDWARE_MOTHERBOARD),1607)
HARDWARE_VARIANT ?= Teensy
MCU ?= at90usb1286
@@ -700,7 +674,7 @@ CXXSTANDARD = -std=gnu++11
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
-fshort-enums -ffunction-sections -fdata-sections
ifneq ($(HARDWARE_MOTHERBOARD),)
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
+1 -1
View File
@@ -3,7 +3,7 @@
Marlin Firmware
(c) 2011-2019 MarlinFirmware
(c) 2011-2018 MarlinFirmware
Portions of Marlin are (c) by their respective authors.
All code complies with GPLv2 and/or GPLv3
+4 -4
View File
@@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
#define SHORT_BUILD_VERSION "2.0.5_TR24"
#define SHORT_BUILD_VERSION "2.0.5_R10"
/**
* Verbose version identifier which should contain a reference to the location
@@ -41,12 +41,12 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define STRING_DISTRIBUTION_DATE "2020-04-02"
#define STRING_DISTRIBUTION_DATE "2020-03-25"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
*/
#define MACHINE_NAME "TM3D Trex"
#define MACHINE_NAME "TM3D Raptor"
/**
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
@@ -54,7 +54,7 @@
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/TM_Trex2+_2.0.x"
#define SOURCE_CODE_URL "https://github.com/InsanityAutomation/Marlin/tree/Raptor_2.0.X"
/**
* Default generic printer UUID.
+68 -56
View File
@@ -32,62 +32,74 @@
#define CUSTOM_BOOTSCREEN_TIMEOUT 2500
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
#define CUSTOM_BOOTSCREEN_INVERTED
#define CUSTOM_BOOTSCREEN_BMPHEIGHT 64
const unsigned char custom_start_bmp[] PROGMEM = {
B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,B11111111,B11111111,B11111111,
B11111110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,B11111111,B11111111,B11111111,
B11111100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000101,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000110,B00000111,B11000000,B00000000,B00000001,B11110000,B00111111,
B11111110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000100,B00001010,B00100000,B00000000,B00000010,B00001000,B00011111,
B11111100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000110,B00010100,B00010000,B00000000,B00000101,B00000100,B00111111,
B11111110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000100,B00101000,B00001000,B00000000,B00001010,B00000010,B00011111,
B11111100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000110,B01010100,B00000100,B00000000,B00010101,B00000001,B00111111,
B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101110,B01010000,B00000100,B00000000,B00010100,B00000001,B00111111,
B11111110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010100,B01100000,B00000100,B00000000,B00011000,B00000001,B00011111,
B11111100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100110,B01010100,B00000100,B00011100,B00010101,B00000001,B00111111,
B11111110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010100,B00101000,B00001000,B00101010,B00001010,B00000010,B00011111,
B11111100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101110,B00010100,B00010000,B01010001,B00000101,B00000100,B00111111,
B11111110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00001010,B00100000,B01100001,B00000010,B10001000,B00011111,
B11111100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000110,B00000111,B11000000,B01010001,B00000001,B11110000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000100,B00000000,B00000000,B00101010,B00000000,B00000000,B00011111,
B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111110,B00000000,B00000000,B00011100,B00000000,B00000000,B00111111,
B11111110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010100,B00000000,B00000000,B00000000,B00000000,B00000000,B00011111,
B11111100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000110,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000110,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000100,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111100,B11000100,B00010000,B01000001,B00000100,B00010001,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000110,B10000100,B00010000,B01000001,B00000100,B00010000,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010100,B11010101,B01010101,B01010101,B01010101,B01010101,B10111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111100,B11111111,B11111111,B11111111,B11111111,B11111111,B10011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111110,B00000000,B00000000,B00000000,B00000000,B00000000,B00111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111101,B01010101,B01010101,B01010101,B01010101,B01010101,B01011111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,
B11100000,B00101110,B11111011,B01111101,B11111011,B11111011,B11001111,B11000001,B11011111,B10111011,B00111110,B11000000,B11100001,B11111110,B00111100,B00011111,
B11111101,B11101110,B01111011,B00111001,B11111001,B11110011,B11001111,B10011110,B11011111,B10111011,B00111110,B11011111,B11011110,B11111100,B11011101,B11100111,
B11111101,B11101110,B00111011,B10111011,B11111001,B11101011,B11010111,B10111111,B01011111,B10111011,B01011110,B11011111,B11011110,B11111101,B11101101,B11110111,
B11111101,B11101110,B10111011,B11010011,B11111010,B11101011,B10110111,B00111111,B11011111,B10111011,B01001110,B11011111,B11011111,B11111111,B11001101,B11110011,
B11111101,B11101110,B11011011,B11000111,B11111010,B11101011,B10111011,B01111111,B11000000,B00111011,B01101110,B11000000,B11100011,B11111111,B00011101,B11110011,
B11111101,B11101110,B11001011,B11101111,B11111010,B11011011,B10111011,B01111111,B11011111,B10111011,B01100110,B11011111,B11111000,B11111111,B11001101,B11110011,
B11111101,B11101110,B11101011,B11101111,B11111011,B01011011,B00000011,B00111111,B01011111,B10111011,B01110110,B11011111,B11111110,B01111111,B11101101,B11110011,
B11111101,B11101110,B11110011,B11101111,B11111011,B01011011,B01111001,B10111110,B11011111,B10111011,B01111010,B11011111,B11011110,B01111101,B11101101,B11110111,
B11111101,B11101110,B11110011,B11101111,B11111011,B10111010,B11111101,B10011110,B11011111,B10111011,B01111100,B11011111,B11011110,B11111101,B11001101,B11100111,
B11111101,B11101110,B11111011,B11101111,B11111011,B10111010,B11111101,B11000001,B11011111,B10111011,B01111110,B11000000,B11100000,B11111110,B00011100,B00011111
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFD, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFC, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFC, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F, 0xFF, 0xFF, 0xFF,
0xFE, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xFF, 0xFF, 0xFF,
0xFC, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFE, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x05, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
0xFC, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFE, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
0xFC, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x06, 0x07, 0xC0, 0x00, 0x01, 0xF0, 0x3F,
0xFE, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x04, 0x0A, 0x20, 0x00, 0x02, 0x08, 0x1F,
0xFC, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x06, 0x14, 0x10, 0x00, 0x05, 0x04, 0x3F,
0xFE, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x04, 0x28, 0x08, 0x00, 0x0A, 0x02, 0x1F,
0xFC, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x06, 0x54, 0x04, 0x00, 0x15, 0x01, 0x3F,
0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
0xFC, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2E, 0x50, 0x04, 0x00, 0x14, 0x01, 0x3F,
0xFE, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x54, 0x60, 0x04, 0x00, 0x18, 0x01, 0x1F,
0xFC, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x66, 0x54, 0x04, 0x1C, 0x15, 0x01, 0x3F,
0xFE, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x54, 0x28, 0x08, 0x2A, 0x0A, 0x02, 0x1F,
0xFC, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2E, 0x14, 0x10, 0x51, 0x05, 0x04, 0x3F,
0xFE, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x0A, 0x20, 0x61, 0x02, 0x88, 0x1F,
0xFC, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x06, 0x07, 0xC0, 0x51, 0x01, 0xF0, 0x3F,
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x1F,
0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x3F,
0xFE, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F,
0xFC, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x46, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x46, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x44, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x56, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFC, 0xC4, 0x10, 0x41, 0x04, 0x11, 0xBF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x06, 0x84, 0x10, 0x41, 0x04, 0x10, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x54, 0xD5, 0x55, 0x55, 0x55, 0x55, 0xBF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xE0, 0x2E, 0xFB, 0x7D, 0xFB, 0xFB, 0xCF, 0xC1, 0xDF, 0xBB, 0x3E, 0xC0, 0xE1, 0xFE, 0x3C, 0x1F,
0xFD, 0xEE, 0x7B, 0x39, 0xF9, 0xF3, 0xCF, 0x9E, 0xDF, 0xBB, 0x3E, 0xDF, 0xDE, 0xFC, 0xDD, 0xE7,
0xFD, 0xEE, 0x3B, 0xBB, 0xF9, 0xEB, 0xD7, 0xBF, 0x5F, 0xBB, 0x5E, 0xDF, 0xDE, 0xFD, 0xED, 0xF7,
0xFD, 0xEE, 0xBB, 0xD3, 0xFA, 0xEB, 0xB7, 0x3F, 0xDF, 0xBB, 0x4E, 0xDF, 0xDF, 0xFF, 0xCD, 0xF3,
0xFD, 0xEE, 0xDB, 0xC7, 0xFA, 0xEB, 0xBB, 0x7F, 0xC0, 0x3B, 0x6E, 0xC0, 0xE3, 0xFF, 0x1D, 0xF3,
0xFD, 0xEE, 0xCB, 0xEF, 0xFA, 0xDB, 0xBB, 0x7F, 0xDF, 0xBB, 0x66, 0xDF, 0xF8, 0xFF, 0xCD, 0xF3,
0xFD, 0xEE, 0xEB, 0xEF, 0xFB, 0x5B, 0x03, 0x3F, 0x5F, 0xBB, 0x76, 0xDF, 0xFE, 0x7F, 0xED, 0xF3,
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0x5B, 0x79, 0xBE, 0xDF, 0xBB, 0x7A, 0xDF, 0xDE, 0x7D, 0xED, 0xF7,
0xFD, 0xEE, 0xF3, 0xEF, 0xFB, 0xBA, 0xFD, 0x9E, 0xDF, 0xBB, 0x7C, 0xDF, 0xDE, 0xFD, 0xCD, 0xE7,
0xFD, 0xEE, 0xFB, 0xEF, 0xFB, 0xBA, 0xFD, 0xC1, 0xDF, 0xBB, 0x7E, 0xC0, 0xE0, 0xFE, 0x1C, 0x1F,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
+2 -2
View File
@@ -98,9 +98,9 @@
#define SET_INPUT(IO) _SET_INPUT(IO)
#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _WRITE(IO, HIGH); }while(0)
#define SET_INPUT_PULLDOWN SET_INPUT
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
#define IS_INPUT(IO) _IS_INPUT(IO)
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
@@ -25,7 +25,7 @@
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; }
+1 -1
View File
@@ -57,7 +57,7 @@
#if ENABLED(FLASH_EEPROM_EMULATION)
#include "../shared/Marduino.h"
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#define EEPROMSize 4096
#define PagesPerGroup 128
+1 -1
View File
@@ -166,7 +166,7 @@
// Set pin as output (wrapper) - reads the pin and sets the output to that value
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
// Set pin as PWM
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
// Check if pin is an input
#define IS_INPUT(IO) ((digitalPinToPort(IO)->PIO_OSR & digitalPinToBitMask(IO)) == 0)
+43 -104
View File
@@ -46,31 +46,6 @@
#include "G2_PWM.h"
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
#define G2_PWM_X 1
#else
#define G2_PWM_X 0
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
#define G2_PWM_Y 1
#else
#define G2_PWM_Y 0
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Z)
#define G2_PWM_Z 1
#else
#define G2_PWM_Z 0
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_E)
#define G2_PWM_E 1
#else
#define G2_PWM_E 0
#endif
#define G2_MASK_X(V) (G2_PWM_X * (V))
#define G2_MASK_Y(V) (G2_PWM_Y * (V))
#define G2_MASK_Z(V) (G2_PWM_Z * (V))
#define G2_MASK_E(V) (G2_PWM_E * (V))
volatile uint32_t *SODR_A = &PIOA->PIO_SODR,
*SODR_B = &PIOB->PIO_SODR,
*CODR_A = &PIOA->PIO_CODR,
@@ -80,18 +55,10 @@ PWM_map ISR_table[NUM_PWMS] = PWM_MAP_INIT;
void Stepper::digipot_init() {
#if PIN_EXISTS(MOTOR_CURRENT_PWM_X)
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
#endif
#if PIN_EXISTS(MOTOR_CURRENT_PWM_Y)
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
#endif
#if G2_PWM_Z
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
#endif
#if G2_PWM_E
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
#endif
OUT_WRITE(MOTOR_CURRENT_PWM_X_PIN, 0); // init pins
OUT_WRITE(MOTOR_CURRENT_PWM_Y_PIN, 0);
OUT_WRITE(MOTOR_CURRENT_PWM_Z_PIN, 0);
OUT_WRITE(MOTOR_CURRENT_PWM_E_PIN, 0);
#define WPKEY (0x50574D << 8) // “PWM” in ASCII
#define WPCMD_DIS_SW 0 // command to disable Write Protect SW
@@ -104,51 +71,30 @@ void Stepper::digipot_init() {
PWM->PWM_WPCR = WPKEY | WPRG_ALL | WPCMD_DIS_SW; // enable setting of all PWM registers
PWM->PWM_CLK = PWM_CLOCK_F; // enable CLK_A and set it to 1MHz, leave CLK_B disabled
PWM->PWM_CH_NUM[0].PWM_CMR = 0b1011; // set channel 0 to Clock A input & to left aligned
if (G2_PWM_X) PWM->PWM_CH_NUM[1].PWM_CMR = 0b1011; // set channel 1 to Clock A input & to left aligned
if (G2_PWM_Y) PWM->PWM_CH_NUM[2].PWM_CMR = 0b1011; // set channel 2 to Clock A input & to left aligned
if (G2_PWM_Z) PWM->PWM_CH_NUM[3].PWM_CMR = 0b1011; // set channel 3 to Clock A input & to left aligned
if (G2_PWM_E) PWM->PWM_CH_NUM[4].PWM_CMR = 0b1011; // set channel 4 to Clock A input & to left aligned
PWM->PWM_CH_NUM[1].PWM_CMR = 0b1011; // set channel 1 to Clock A input & to left aligned
PWM->PWM_CH_NUM[2].PWM_CMR = 0b1011; // set channel 2 to Clock A input & to left aligned
PWM->PWM_CH_NUM[3].PWM_CMR = 0b1011; // set channel 3 to Clock A input & to left aligned
PWM->PWM_CH_NUM[4].PWM_CMR = 0b1011; // set channel 4 to Clock A input & to left aligned
PWM->PWM_CH_NUM[0].PWM_CPRD = PWM_PERIOD_US; // set channel 0 Period
PWM->PWM_IER2 = PWM_IER1_CHID0; // generate interrupt when counter0 overflows
PWM->PWM_IER2 = PWM_IER2_CMPM0
| G2_MASK_X(PWM_IER2_CMPM1)
| G2_MASK_Y(PWM_IER2_CMPM2)
| G2_MASK_Z(PWM_IER2_CMPM3)
| G2_MASK_E(PWM_IER2_CMPM4)
; // generate interrupt on compare event
PWM->PWM_IER2 = PWM_IER2_CMPM0 | PWM_IER2_CMPM1 | PWM_IER2_CMPM2 | PWM_IER2_CMPM3 | PWM_IER2_CMPM4; // generate interrupt on compare event
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 1 PWM inactive
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 2 PWM inactive
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[1])); // interrupt when counter0 == CMPV - used to set Motor 3 PWM inactive
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[2])); // interrupt when counter0 == CMPV - used to set Motor 4 PWM inactive
PWM->PWM_CMP[1].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 1 PWM inactive
PWM->PWM_CMP[2].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[0])); // interrupt when counter0 == CMPV - used to set Motor 2 PWM inactive
PWM->PWM_CMP[3].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[1])); // interrupt when counter0 == CMPV - used to set Motor 3 PWM inactive
PWM->PWM_CMP[4].PWM_CMPV = 0x010000000LL | G2_VREF_COUNT(G2_VREF(motor_current_setting[2])); // interrupt when counter0 == CMPV - used to set Motor 4 PWM inactive
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPM = 0x0001; // enable compare event
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPM = 0x0001; // enable compare event
if (G2_PWM_Z) PWM->PWM_CMP[3].PWM_CMPM = 0x0001; // enable compare event
if (G2_PWM_E) PWM->PWM_CMP[4].PWM_CMPM = 0x0001; // enable compare event
PWM->PWM_CMP[1].PWM_CMPM = 0x0001; // enable compare event
PWM->PWM_CMP[2].PWM_CMPM = 0x0001; // enable compare event
PWM->PWM_CMP[3].PWM_CMPM = 0x0001; // enable compare event
PWM->PWM_CMP[4].PWM_CMPM = 0x0001; // enable compare event
PWM->PWM_SCM = PWM_SCM_UPDM_MODE0 | PWM_SCM_SYNC0
| G2_MASK_X(PWM_SCM_SYNC1)
| G2_MASK_Y(PWM_SCM_SYNC2)
| G2_MASK_Z(PWM_SCM_SYNC3)
| G2_MASK_E(PWM_SCM_SYNC4)
; // sync 1-4 with 0, use mode 0 for updates
PWM->PWM_SCM = PWM_SCM_UPDM_MODE0 | PWM_SCM_SYNC0 | PWM_SCM_SYNC1 | PWM_SCM_SYNC2 | PWM_SCM_SYNC3 | PWM_SCM_SYNC4; // sync 1-4 with 0, use mode 0 for updates
PWM->PWM_ENA = PWM_ENA_CHID0
| G2_MASK_X(PWM_ENA_CHID1)
| G2_MASK_Y(PWM_ENA_CHID2)
| G2_MASK_Z(PWM_ENA_CHID3)
| G2_MASK_E(PWM_ENA_CHID4)
; // enable channels used by G2
PWM->PWM_IER1 = PWM_IER1_CHID0
| G2_MASK_X(PWM_IER1_CHID1)
| G2_MASK_Y(PWM_IER1_CHID2)
| G2_MASK_Z(PWM_IER1_CHID3)
| G2_MASK_E(PWM_IER1_CHID4)
; // enable interrupts for channels used by G2
PWM->PWM_ENA = PWM_ENA_CHID0 | PWM_ENA_CHID1 | PWM_ENA_CHID2 | PWM_ENA_CHID3 | PWM_ENA_CHID4; // enable the channels used by G2
PWM->PWM_IER1 = PWM_IER1_CHID0 | PWM_IER1_CHID1 | PWM_IER1_CHID2 | PWM_IER1_CHID3 | PWM_IER1_CHID4; // enable interrupts for the channels used by G2
NVIC_EnableIRQ(PWM_IRQn); // Enable interrupt handler
NVIC_SetPriority(PWM_IRQn, NVIC_EncodePriority(0, 10, 0)); // normal priority for PWM module (can stand some jitter on the Vref signals)
@@ -159,27 +105,20 @@ void Stepper::digipot_current(const uint8_t driver, const int16_t current) {
if (!(PWM->PWM_CH_NUM[0].PWM_CPRD == PWM_PERIOD_US)) digipot_init(); // Init PWM system if needed
switch (driver) {
case 0:
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update X & Y
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current));
if (G2_PWM_X) PWM->PWM_CMP[1].PWM_CMPMUPD = 0x0001; // enable compare event
if (G2_PWM_Y) PWM->PWM_CMP[2].PWM_CMPMUPD = 0x0001; // enable compare event
if (G2_PWM_X || G2_PWM_Y) PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
break;
case 1:
if (G2_PWM_Z) {
PWM->PWM_CMP[3].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update Z
PWM->PWM_CMP[3].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
}
break;
default:
if (G2_PWM_E) {
PWM->PWM_CMP[4].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update E
PWM->PWM_CMP[4].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
}
break;
case 0: PWM->PWM_CMP[1].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update X & Y
PWM->PWM_CMP[2].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current));
PWM->PWM_CMP[1].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_CMP[2].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
break;
case 1: PWM->PWM_CMP[3].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update Z
PWM->PWM_CMP[3].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
break;
default:PWM->PWM_CMP[4].PWM_CMPVUPD = 0x010000000LL | G2_VREF_COUNT(G2_VREF(current)); // update E
PWM->PWM_CMP[4].PWM_CMPMUPD = 0x0001; // enable compare event
PWM->PWM_SCUC = PWM_SCUC_UPDULOCK; // tell the PWM controller to update the values on the next cycle
break;
}
}
@@ -188,17 +127,17 @@ volatile uint32_t PWM_ISR1_STATUS, PWM_ISR2_STATUS;
void PWM_Handler() {
PWM_ISR1_STATUS = PWM->PWM_ISR1;
PWM_ISR2_STATUS = PWM->PWM_ISR2;
if (PWM_ISR1_STATUS & PWM_IER1_CHID0) { // CHAN_0 interrupt
if (G2_PWM_X) *ISR_table[0].set_register = ISR_table[0].write_mask; // set X to active
if (G2_PWM_Y) *ISR_table[1].set_register = ISR_table[1].write_mask; // set Y to active
if (G2_PWM_Z) *ISR_table[2].set_register = ISR_table[2].write_mask; // set Z to active
if (G2_PWM_E) *ISR_table[3].set_register = ISR_table[3].write_mask; // set E to active
if (PWM_ISR1_STATUS & PWM_IER1_CHID0) { // CHAN_0 interrupt
*ISR_table[0].set_register = ISR_table[0].write_mask; // set X to active
*ISR_table[1].set_register = ISR_table[1].write_mask; // set Y to active
*ISR_table[2].set_register = ISR_table[2].write_mask; // set Z to active
*ISR_table[3].set_register = ISR_table[3].write_mask; // set E to active
}
else {
if (G2_PWM_X && (PWM_ISR2_STATUS & PWM_IER2_CMPM1)) *ISR_table[0].clr_register = ISR_table[0].write_mask; // set X to inactive
if (G2_PWM_Y && (PWM_ISR2_STATUS & PWM_IER2_CMPM2)) *ISR_table[1].clr_register = ISR_table[1].write_mask; // set Y to inactive
if (G2_PWM_Z && (PWM_ISR2_STATUS & PWM_IER2_CMPM3)) *ISR_table[2].clr_register = ISR_table[2].write_mask; // set Z to inactive
if (G2_PWM_E && (PWM_ISR2_STATUS & PWM_IER2_CMPM4)) *ISR_table[3].clr_register = ISR_table[3].write_mask; // set E to inactive
if (PWM_ISR2_STATUS & PWM_IER2_CMPM1) *ISR_table[0].clr_register = ISR_table[0].write_mask; // set X to inactive
if (PWM_ISR2_STATUS & PWM_IER2_CMPM2) *ISR_table[1].clr_register = ISR_table[1].write_mask; // set Y to inactive
if (PWM_ISR2_STATUS & PWM_IER2_CMPM3) *ISR_table[2].clr_register = ISR_table[2].write_mask; // set Z to inactive
if (PWM_ISR2_STATUS & PWM_IER2_CMPM4) *ISR_table[3].clr_register = ISR_table[3].write_mask; // set E to inactive
}
return;
}
+1 -1
View File
@@ -21,7 +21,7 @@
*/
#pragma once
#if USE_FALLBACK_EEPROM
#if USE_EMULATED_EEPROM
#undef SRAM_EEPROM_EMULATION
#undef SDCARD_EEPROM_EMULATION
#define FLASH_EEPROM_EMULATION
@@ -27,7 +27,7 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../../inc/MarlinConfig.h"
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#if !defined(E2END) && ENABLED(FLASH_EEPROM_EMULATION)
#define E2END 0xFFF // Default to Flash emulated EEPROM size (EepromEmulation_Due.cpp)
+1 -1
View File
@@ -56,7 +56,7 @@
#define SET_OUTPUT(IO) do{ _SET_OUTPUT(IO); }while(0)
// Set pin as PWM
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
// Set pin as output and init
#define OUT_WRITE(IO,V) do{ _SET_OUTPUT(IO); WRITE(IO,V); }while(0)
+3 -3
View File
@@ -21,7 +21,7 @@
*/
#pragma once
#undef USE_WIRED_EEPROM
#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
#define USE_WIRED_EEPROM 1
// 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
@@ -24,10 +24,10 @@
#include "../../inc/MarlinConfig.h"
#if USE_WIRED_EEPROM
#if ENABLED(EEPROM_SETTINGS) && DISABLED(FLASH_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include <EEPROM.h>
#include "../shared/persistent_store_api.h"
#include "EEPROM.h"
#define EEPROM_SIZE 4096
@@ -59,5 +59,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
#endif // USE_WIRED_EEPROM
#endif // EEPROM_SETTINGS
#endif // ARDUINO_ARCH_ESP32
@@ -26,7 +26,7 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#include <stdio.h>
#define LINUX_EEPROM_SIZE (E2END + 1)
+1 -1
View File
@@ -104,7 +104,7 @@
/// set pin as output wrapper - reads the pin and sets the output to that value
#define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0)
// set pin as PWM
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
/// check if pin is an input wrapper
#define IS_INPUT(IO) _IS_INPUT(IO)
@@ -21,6 +21,6 @@
*/
#pragma once
#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#if USE_EMULATED_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#define FLASH_EEPROM_EMULATION
#endif
+1 -1
View File
@@ -90,7 +90,7 @@ void HAL_init() {
//debug_frmwrk_init();
//_DBG("\n\nDebug running\n");
// Initialize the SD card chip select pins as soon as possible
// Initialise the SD card chip select pins as soon as possible
#if PIN_EXISTS(SS)
OUT_WRITE(SS_PIN, HIGH);
#endif
@@ -21,6 +21,6 @@
*/
#pragma once
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#define FLASH_EEPROM_EMULATION
@@ -40,7 +40,7 @@
#if ENABLED(FLASH_EEPROM_EMULATION)
#include "eeprom_api.h"
#include "persistent_store_api.h"
extern "C" {
#include <lpc17xx_iap.h>
@@ -26,7 +26,7 @@
#if ENABLED(SDCARD_EEPROM_EMULATION)
#include "eeprom_api.h"
#include "persistent_store_api.h"
#include <chanfs/diskio.h>
#include <chanfs/ff.h>
-78
View File
@@ -1,78 +0,0 @@
/**
* 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/MarlinConfig.h"
#if ENABLED(QSPI_EEPROM)
#include "QSPIFlash.h"
#define INVALID_ADDR 0xffffffff
#define SECTOR_OF(a) (a & ~(SFLASH_SECTOR_SIZE - 1))
#define OFFSET_OF(a) (a & (SFLASH_SECTOR_SIZE - 1))
Adafruit_SPIFlashBase * QSPIFlash::_flashBase = nullptr;
uint8_t QSPIFlash::_buf[SFLASH_SECTOR_SIZE];
uint32_t QSPIFlash::_addr = INVALID_ADDR;
void QSPIFlash::begin() {
if (_flashBase != nullptr) return;
_flashBase = new Adafruit_SPIFlashBase(new Adafruit_FlashTransport_QSPI());
_flashBase->begin(NULL);
}
size_t QSPIFlash::size() {
return _flashBase->size();
}
uint8_t QSPIFlash::readByte(const uint32_t address) {
if (SECTOR_OF(address) == _addr) return _buf[OFFSET_OF(address)];
return _flashBase->read8(address);
}
void QSPIFlash::writeByte(const uint32_t address, const uint8_t value) {
uint32_t const sector_addr = SECTOR_OF(address);
// Page changes, flush old and update new cache
if (sector_addr != _addr) {
flush();
_addr = sector_addr;
// read a whole page from flash
_flashBase->readBuffer(sector_addr, _buf, SFLASH_SECTOR_SIZE);
}
_buf[OFFSET_OF(address)] = value;
}
void QSPIFlash::flush() {
if (_addr == INVALID_ADDR) return;
_flashBase->eraseSector(_addr / SFLASH_SECTOR_SIZE);
_flashBase->writeBuffer(_addr, _buf, SFLASH_SECTOR_SIZE);
_addr = INVALID_ADDR;
}
#endif // QSPI_EEPROM
-51
View File
@@ -1,51 +0,0 @@
/**
* @file QSPIFlash.h
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach and Dean Miller for Adafruit Industries LLC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* Derived from Adafruit_SPIFlash class with no SdFat references
*
*/
#pragma once
#include <Adafruit_SPIFlashBase.h>
// This class extends Adafruit_SPIFlashBase by adding caching support.
//
// This class will use 4096 Bytes of RAM as a block cache.
class QSPIFlash {
public:
static void begin();
static size_t size();
static uint8_t readByte(const uint32_t address);
static void writeByte(const uint32_t address, const uint8_t v);
static void flush();
private:
static Adafruit_SPIFlashBase * _flashBase;
static uint8_t _buf[SFLASH_SECTOR_SIZE];
static uint32_t _addr;
};
extern QSPIFlash qspi;
-66
View File
@@ -1,66 +0,0 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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/>.
*
*/
#ifdef __SAMD51__
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS) && NONE(QSPI_EEPROM, FLASH_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
size_t PersistentStore::capacity() { return E2END + 1; }
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; }
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
const uint8_t v = *value;
uint8_t * const p = (uint8_t * const)pos;
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
delay(2);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
#endif // EEPROM_SETTINGS && !(QSPI_EEPROM || FLASH_EEPROM_EMULATION)
#endif // __SAMD51__
-96
View File
@@ -1,96 +0,0 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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/>.
*
*/
#ifdef __SAMD51__
#include "../../inc/MarlinConfig.h"
#if ENABLED(FLASH_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#define NVMCTRL_CMD(c) do{ \
SYNC(!NVMCTRL->STATUS.bit.READY); \
NVMCTRL->INTFLAG.bit.DONE = true; \
NVMCTRL->CTRLB.reg = c | NVMCTRL_CTRLB_CMDEX_KEY; \
SYNC(NVMCTRL->INTFLAG.bit.DONE); \
}while(0)
#define NVMCTRL_FLUSH() do{ \
if (NVMCTRL->SEESTAT.bit.LOAD) \
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_SEEFLUSH); \
}while(0)
size_t PersistentStore::capacity() {
const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
sblk = NVMCTRL->SEESTAT.bit.SBLK;
return (!psz && !sblk) ? 0
: (psz <= 2) ? (0x200 << psz)
: (sblk == 1 || psz == 3) ? 4096
: (sblk == 2 || psz == 4) ? 8192
: (sblk <= 4 || psz == 5) ? 16384
: (sblk >= 9 && psz == 7) ? 65536
: 32768;
}
bool PersistentStore::access_start() {
NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED; // Buffered mode and segment reallocation active
if (NVMCTRL->SEESTAT.bit.RLOCK)
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE); // Unlock E2P data write access
return true;
}
bool PersistentStore::access_finish() {
NVMCTRL_FLUSH();
if (!NVMCTRL->SEESTAT.bit.LOCK)
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_LSEE); // Lock E2P data write access
return true;
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
const uint8_t v = *value;
SYNC(NVMCTRL->SEESTAT.bit.BUSY);
if (NVMCTRL->INTFLAG.bit.SEESFULL)
NVMCTRL_FLUSH(); // Next write will trigger a sector reallocation. I need to flush 'pagebuffer'
((volatile uint8_t *)SEEPROM_ADDR)[pos] = v;
SYNC(!NVMCTRL->INTFLAG.bit.SEEWRC);
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
SYNC(NVMCTRL->SEESTAT.bit.BUSY);
uint8_t c = ((volatile uint8_t *)SEEPROM_ADDR)[pos];
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
#endif // FLASH_EEPROM_EMULATION
#endif // __SAMD51__
-71
View File
@@ -1,71 +0,0 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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/>.
*
*/
#ifdef __SAMD51__
#include "../../inc/MarlinConfig.h"
#if ENABLED(QSPI_EEPROM)
#include "../shared/eeprom_api.h"
#include "QSPIFlash.h"
static bool initialized;
size_t PersistentStore::capacity() { return qspi.size(); }
bool PersistentStore::access_start() {
if (!initialized) {
qspi.begin();
initialized = true;
}
return true;
}
bool PersistentStore::access_finish() {
qspi.flush();
return true;
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
while (size--) {
const uint8_t v = *value;
qspi.writeByte(pos, v);
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c = qspi.readByte(pos);
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
#endif // QSPI_EEPROM
#endif // __SAMD51__
+2 -2
View File
@@ -100,9 +100,9 @@
PORT->Group[port].DIRCLR.reg = MASK(pin); \
}while(0)
// Set pin as PWM (push pull)
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
// Set pin as PWM (open drain)
#define SET_PWM_OD SET_OUTPUT_OD
#define SET_PWM_OD(IO) SET_OUTPUT_OD(IO)
// check if pin is an output
#define IS_OUTPUT(IO) ((PORT->Group[(EPortType)GET_SAMD_PORT(IO)].DIR.reg & MASK(GET_SAMD_PIN(IO))) \
@@ -21,6 +21,8 @@
*/
#pragma once
#if USE_FALLBACK_EEPROM && NONE(SDCARD_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#if USE_EMULATED_EEPROM
#undef SRAM_EEPROM_EMULATION
#undef SDCARD_EEPROM_EMULATION
#define FLASH_EEPROM_EMULATION
#endif
@@ -0,0 +1,129 @@
/**
* Marlin 3D Printer Firmware
*
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
* SAMD51 HAL developed by Giuliano Zaro (AKA GMagician)
*
* 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/>.
*
*/
#ifdef __SAMD51__
#include "../../inc/MarlinConfig.h"
#if ENABLED(EEPROM_SETTINGS)
#include "../shared/persistent_store_api.h"
#if ENABLED(FLASH_EEPROM_EMULATION)
#define NVMCTRL_CMD(c) do{ \
SYNC(!NVMCTRL->STATUS.bit.READY); \
NVMCTRL->INTFLAG.bit.DONE = true; \
NVMCTRL->CTRLB.reg = c | NVMCTRL_CTRLB_CMDEX_KEY; \
SYNC(NVMCTRL->INTFLAG.bit.DONE); \
}while(0)
#define NVMCTRL_FLUSH() do{ \
if (NVMCTRL->SEESTAT.bit.LOAD) \
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_SEEFLUSH); \
}while(0)
#endif
bool PersistentStore::access_start() {
#if ENABLED(FLASH_EEPROM_EMULATION)
NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED; // Buffered mode and segment reallocation active
#endif
return true;
}
bool PersistentStore::access_finish() {
#if ENABLED(FLASH_EEPROM_EMULATION)
NVMCTRL_FLUSH();
if (!NVMCTRL->SEESTAT.bit.LOCK)
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_LSEE); // Lock E2P data write access
#endif
return true;
}
bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
#if ENABLED(FLASH_EEPROM_EMULATION)
if (NVMCTRL->SEESTAT.bit.RLOCK)
NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE); // Unlock E2P data write access
#endif
while (size--) {
const uint8_t v = *value;
#if ENABLED(FLASH_EEPROM_EMULATION)
SYNC(NVMCTRL->SEESTAT.bit.BUSY);
if (NVMCTRL->INTFLAG.bit.SEESFULL)
NVMCTRL_FLUSH(); // Next write will trigger a sector reallocation. I need to flush 'pagebuffer'
((volatile uint8_t *)SEEPROM_ADDR)[pos] = v;
SYNC(!NVMCTRL->INTFLAG.bit.SEEWRC);
#else
uint8_t * const p = (uint8_t * const)pos;
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
delay(2);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
#endif
crc16(crc, &v, 1);
pos++;
value++;
}
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
while (size--) {
uint8_t c;
#if ENABLED(FLASH_EEPROM_EMULATION)
SYNC(NVMCTRL->SEESTAT.bit.BUSY);
c = ((volatile uint8_t *)SEEPROM_ADDR)[pos];
#else
c = eeprom_read_byte((uint8_t*)pos);
#endif
if (writing) *value = c;
crc16(crc, &c, 1);
pos++;
value++;
}
return false;
}
size_t PersistentStore::capacity() {
#if ENABLED(FLASH_EEPROM_EMULATION)
const uint8_t psz = NVMCTRL->SEESTAT.bit.PSZ,
sblk = NVMCTRL->SEESTAT.bit.SBLK;
if (!psz && !sblk) return 0;
else if (psz <= 2) return (0x200 << psz);
else if (sblk == 1 || psz == 3) return 4096;
else if (sblk == 2 || psz == 4) return 8192;
else if (sblk <= 4 || psz == 5) return 16384;
else if (sblk >= 9 && psz == 7) return 65536;
else return 32768;
#else
return E2END + 1;
#endif
}
#endif // EEPROM_SETTINGS
#endif // __SAMD51__
+7 -2
View File
@@ -29,7 +29,9 @@
* The latest version of this library can always be found at
* http://arduiniana.org.
*/
#pragma once
#ifndef SOFTWARESERIAL_H
#define SOFTWARESERIAL_H
#include <Arduino.h>
@@ -62,6 +64,7 @@ class SoftwareSerial : public Stream {
uint32_t delta_start = 0;
// static data
static bool initialised;
static HardwareTimer timer;
static const IRQn_Type timer_interrupt_number;
static uint32_t timer_interrupt_priority;
@@ -88,7 +91,7 @@ class SoftwareSerial : public Stream {
public:
// public methods
SoftwareSerial(uint16_t receivePin, uint16_t transmitPin, bool inverse_logic=false);
SoftwareSerial(uint16_t receivePin, uint16_t transmitPin, bool inverse_logic = false);
virtual ~SoftwareSerial();
void begin(long speed);
bool listen();
@@ -112,3 +115,5 @@ class SoftwareSerial : public Stream {
using Print::write;
};
#endif // SOFTWARESERIAL_H
+1 -1
View File
@@ -22,6 +22,6 @@
#pragma once
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#define SDCARD_EEPROM_EMULATION
#endif
@@ -27,7 +27,7 @@
#if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
// Only STM32F4 can support wear leveling at this time
@@ -24,9 +24,9 @@
#include "../../inc/MarlinConfig.h"
#if EITHER(USE_WIRED_EEPROM, SRAM_EEPROM_EMULATION)
#if EITHER(USE_REAL_EEPROM, SRAM_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() {
return true;
@@ -41,7 +41,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
uint8_t v = *value;
// Save to either external EEPROM, program flash or Backup SRAM
#if USE_WIRED_EEPROM
#if USE_REAL_EEPROM
// EEPROM has only ~100,000 write cycles,
// so only write bytes that have changed!
uint8_t * const p = (uint8_t * const)pos;
@@ -68,7 +68,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
do {
// Read from either external EEPROM, program flash or Backup SRAM
const uint8_t c = (
#if USE_WIRED_EEPROM
#if USE_REAL_EEPROM
eeprom_read_byte((uint8_t*)pos)
#else
(*(__IO uint8_t *)(BKPSRAM_BASE + ((uint8_t*)pos)))
@@ -85,7 +85,7 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
size_t PersistentStore::capacity() {
return (
#if USE_WIRED_EEPROM
#if USE_REAL_EEPROM
E2END + 1
#else
4096 // 4kB
@@ -93,5 +93,5 @@ size_t PersistentStore::capacity() {
);
}
#endif // USE_WIRED_EEPROM || SRAM_EEPROM_EMULATION
#endif // USE_REAL_EEPROM || SRAM_EEPROM_EMULATION
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
@@ -30,7 +30,7 @@
#if ENABLED(SDCARD_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#ifndef E2END
#define E2END 0xFFF // 4KB
@@ -22,9 +22,9 @@
#include "../../inc/MarlinConfig.h"
#if USE_WIRED_EEPROM
#if USE_REAL_EEPROM
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() {
#if ENABLED(SPI_EEPROM)
@@ -73,5 +73,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
size_t PersistentStore::capacity() { return E2END + 1; }
#endif // USE_WIRED_EEPROM
#endif // USE_REAL_EEPROM
#endif // __STM32F1__
@@ -31,9 +31,10 @@
#include "../../inc/MarlinConfig.h"
#if ENABLED(FLASH_EEPROM_EMULATION)
// This is for EEPROM emulation in flash
#if BOTH(EEPROM_SETTINGS, FLASH_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#include <flash_stm32.h>
#include <EEPROM.h>
@@ -107,5 +108,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
size_t PersistentStore::capacity() { return EEPROM_SIZE; }
#endif // FLASH_EEPROM_EMULATION
#endif // EEPROM_SETTINGS && EEPROM FLASH
#endif // __STM32F1__
@@ -31,7 +31,7 @@
#if ENABLED(SDCARD_EEPROM_EMULATION)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#ifndef E2END
#define E2END 0xFFF // 4KB
@@ -101,4 +101,5 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
size_t PersistentStore::capacity() { return HAL_EEPROM_SIZE; }
#endif // SDCARD_EEPROM_EMULATION
#endif // __STM32F1__
@@ -22,7 +22,7 @@
#pragma once
#if ENABLED(EEPROM_SETTINGS) && defined(STM32F7)
#undef USE_WIRED_EEPROM
#undef USE_REAL_EEPROM
#undef SRAM_EEPROM_EMULATION
#undef SDCARD_EEPROM_EMULATION
#define FLASH_EEPROM_EMULATION
@@ -27,7 +27,7 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; }
+1 -2
View File
@@ -76,9 +76,8 @@
#define SET_INPUT(IO) _SET_INPUT(IO)
#define SET_INPUT_PULLUP(IO) _SET_INPUT_PULLUP(IO)
#define SET_INPUT_PULLDOWN SET_INPUT
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
#define IS_INPUT(IO) _IS_INPUT(IO)
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
@@ -22,6 +22,6 @@
#pragma once
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_WIRED_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#if ENABLED(EEPROM_SETTINGS) && NONE(USE_REAL_EEPROM, FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION)
#define SDCARD_EEPROM_EMULATION
#endif
@@ -22,7 +22,7 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
bool PersistentStore::access_start() { return true; }
bool PersistentStore::access_finish() { return true; }
+1 -2
View File
@@ -76,9 +76,8 @@
#define SET_INPUT(IO) _SET_INPUT(IO)
#define SET_INPUT_PULLUP(IO) _SET_INPUT_PULLUP(IO)
#define SET_INPUT_PULLDOWN SET_INPUT
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
#define SET_PWM SET_OUTPUT
#define SET_PWM(IO) SET_OUTPUT(IO)
#define IS_INPUT(IO) _IS_INPUT(IO)
#define IS_OUTPUT(IO) _IS_OUTPUT(IO)
@@ -27,7 +27,7 @@
#if ENABLED(EEPROM_SETTINGS)
#include "../shared/eeprom_api.h"
#include "../shared/persistent_store_api.h"
#include <avr/eeprom.h>
bool PersistentStore::access_start() { return true; }
@@ -24,7 +24,7 @@
#if EITHER(EEPROM_SETTINGS, SD_FIRMWARE_UPDATE)
#include "eeprom_api.h"
#include "persistent_store_api.h"
PersistentStore persistentStore;
#endif
+62 -34
View File
@@ -210,19 +210,6 @@ bool wait_for_heatup = true;
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
#if HAS_RESUME_CONTINUE
bool wait_for_user; // = false;
void wait_for_user_response(millis_t ms/*=0*/, const bool no_sleep/*=false*/) {
#if DISABLED(ADVANCED_PAUSE_FEATURE)
UNUSED(no_sleep);
#endif
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true;
if (ms) ms += millis(); // expire time
while (wait_for_user && !(ms && ELAPSED(millis(), ms)))
idle(TERN_(ADVANCED_PAUSE_FEATURE, no_sleep));
wait_for_user = false;
}
#endif
// Inactivity shutdown
@@ -431,8 +418,56 @@ void startOrResumeJob() {
}
inline void finishSDPrinting() {
if (queue.enqueue_one_P(PSTR("M1001")))
marlin_state = MF_RUNNING;
bool did_state = true;
switch (card.sdprinting_done_state) {
case 1:
did_state = print_job_timer.duration() < 60 || queue.enqueue_one_P(PSTR("M31"));
break;
case 2:
did_state = queue.enqueue_one_P(PSTR("M77"));
break;
case 3:
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
ui.set_progress_done();
#endif
break;
case 4:
did_state = // Display "Click to Continue..."
#if HAS_RESUME_CONTINUE && HAS_LEDS_OFF_FLAG // 30 min timeout with LCD, 1 min without
queue.enqueue_one_P(
print_job_timer.duration() < 60 ? PSTR("M0Q1P1") : PSTR("M0Q1S" TERN(HAS_LCD_MENU, "1800", "60"))
)
#else
true
#endif
;
break;
case 5:
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.purge();
#endif
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
planner.finish_and_disable();
#endif
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
ui.reselect_last_file();
#endif
SERIAL_ECHOLNPGM(STR_FILE_PRINTED);
default:
did_state = false;
card.sdprinting_done_state = 0;
}
if (did_state) ++card.sdprinting_done_state;
}
#endif // SDSUPPORT
@@ -642,54 +677,52 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
/**
* Standard idle routine keeps the machine alive
*/
void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
// Handle Power-Loss Recovery
void idle(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
bool no_stepper_sleep/*=false*/
#endif
) {
#if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS)
recovery.outage();
#endif
// Run StallGuard endstop checks
#if ENABLED(SPI_ENDSTOPS)
if (endstops.tmc_spi_homing.any
&& TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period))
) LOOP_L_N(i, 4) // Read SGT 4 times per idle loop
#if ENABLED(IMPROVE_HOMING_RELIABILITY)
&& ELAPSED(millis(), sg_guard_period)
#endif
) {
for (uint8_t i = 4; i--;) // Read SGT 4 times per idle loop
if (endstops.tmc_spi_homing_check()) break;
}
#endif
// Max7219 heartbeat, animation, etc.
#if ENABLED(MAX7219_DEBUG)
max7219.idle_tasks();
#endif
// Read Buttons and Update the LCD
ui.update();
// Announce Host Keepalive state (if any)
#if ENABLED(HOST_KEEPALIVE_FEATURE)
gcode.host_keepalive();
#endif
// Core Marlin activities
manage_inactivity(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
no_stepper_sleep
#endif
);
// Manage heaters (and Watchdog)
thermalManager.manage_heater();
// Update the Print Job Timer state
#if ENABLED(PRINTCOUNTER)
print_job_timer.tick();
#endif
// Update the Beeper queue
#if USE_BEEPER
buzzer.tick();
#endif
// Run i2c Position Encoders
#if ENABLED(I2C_POSITION_ENCODERS)
static millis_t i2cpem_next_update_ms;
if (planner.has_blocks_queued()) {
@@ -701,12 +734,10 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
}
#endif
// Run HAL idle tasks
#ifdef HAL_IDLETASK
HAL_idletask();
#endif
// Auto-report Temperatures / SD Status
#if HAS_AUTO_REPORTING
if (!gcode.autoreport_paused) {
#if ENABLED(AUTO_REPORT_TEMPERATURES)
@@ -718,17 +749,14 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
}
#endif
// Handle USB Flash Drive insert / remove
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
Sd2Card::idle();
#endif
// Update the Prusa MMU2
#if ENABLED(PRUSA_MMU2)
mmu2.mmu_loop();
#endif
// Handle Joystick jogging
#if ENABLED(POLL_JOG)
joystick.inject_jog_moves();
#endif
@@ -1184,7 +1212,7 @@ void loop() {
#if ENABLED(SDSUPPORT)
card.checkautostart();
if (card.flag.abort_sd_printing) abortSDPrinting();
if (marlin_state == MF_SD_COMPLETE) finishSDPrinting();
if (card.sdprinting_done_state) finishSDPrinting();
#endif
queue.advance();
+13 -5
View File
@@ -38,9 +38,19 @@
void stop();
// Pass true to keep steppers from timing out
void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep=false));
inline void idle_no_sleep() { idle(TERN_(ADVANCED_PAUSE_FEATURE, true)); }
void idle(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
bool no_stepper_sleep=false // Pass true to keep steppers from timing out
#endif
);
inline void idle_no_sleep() {
idle(
#if ENABLED(ADVANCED_PAUSE_FEATURE)
true
#endif
);
}
#if ENABLED(EXPERIMENTAL_I2CBUS)
#include "feature/twibus.h"
@@ -73,7 +83,6 @@ enum MarlinState : uint8_t {
MF_PAUSED = _BV(1),
MF_WAITING = _BV(2),
MF_STOPPED = _BV(3),
MF_SD_COMPLETE = _BV(4),
MF_KILLED = _BV(7)
};
@@ -89,7 +98,6 @@ extern bool wait_for_heatup;
#if HAS_RESUME_CONTINUE
extern bool wait_for_user;
void wait_for_user_response(millis_t ms=0, const bool no_sleep=false);
#endif
// Inactivity shutdown timer
-1
View File
@@ -144,7 +144,6 @@
#define BOARD_LEAPFROG_XEED2015 1321 // Leapfrog Xeed 2015
#define BOARD_PICA_REVB 1322 // PICA Shield (original version)
#define BOARD_PICA 1323 // PICA Shield (rev C or later)
#define BOARD_INTAMSYS40 1324 // Intamsys 4.0 (Funmat HT)
//
// ATmega1281, ATmega2561
-3
View File
@@ -194,9 +194,6 @@
#define DISABLED(V...) DO(DIS,&&,V)
#define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1'
#define TERN0(O,A) _TERN(_ENA_1(O),0,A) // OPTION converted to A or '0'
#define TERN1(O,A) _TERN(_ENA_1(O),1,A) // OPTION converted to A or '1'
#define TERN_(O,A) _TERN(_ENA_1(O),,A) // OPTION converted to A or '<nul>'
#define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1'
#define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1'
#define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B.
+1 -1
View File
@@ -113,7 +113,7 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const
error_correction = 0; // Don't take up any backlash in this segment, as it would subtract steps
}
#endif
// Making a correction reduces the residual error and adds block steps
// Making a correction reduces the residual error and modifies delta_mm
if (error_correction) {
block->steps[axis] += ABS(error_correction);
residual_error[axis] -= error_correction;
+1 -1
View File
@@ -27,7 +27,7 @@
#include "../bedlevel.h"
#include "../../../MarlinCore.h"
#include "../../../HAL/shared/eeprom_api.h"
#include "../../../HAL/shared/persistent_store_api.h"
#include "../../../libs/hex_print_routines.h"
#include "../../../module/configuration_store.h"
#include "../../../lcd/ultralcd.h"
@@ -24,8 +24,8 @@
#if BOTH(DIGIPOT_I2C, DIGIPOT_MCP4018)
#include <Stream.h>
#include <utility/twi.h>
#include "Stream.h"
#include "utility/twi.h"
#include <SlowSoftI2CMaster.h> //https://github.com/stawel/SlowSoftI2CMaster
// Settings for the I2C based DIGIPOT (MCP4018) based on WT150
@@ -24,7 +24,7 @@
#if ENABLED(DIGIPOT_I2C) && DISABLED(DIGIPOT_MCP4018)
#include <Stream.h>
#include "Stream.h"
#include <Wire.h>
#if MB(MKS_SBASE)
+2 -1
View File
@@ -707,13 +707,14 @@ void MMU2::filament_runout() {
if (recover) {
LCD_MESSAGEPGM(MSG_MMU2_EJECT_RECOVER);
BUZZ(200, 404);
wait_for_user = true;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), CONTINUE_STR);
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"));
#endif
wait_for_user_response();
while (wait_for_user) idle();
BUZZ(200, 404);
BUZZ(200, 404);
+25 -14
View File
@@ -134,6 +134,15 @@ static bool ensure_safe_temperature(const PauseMode mode=PAUSE_MODE_SAME) {
return thermalManager.wait_for_hotend(active_extruder);
}
void do_pause_e_move(const float &length, const feedRate_t &fr_mm_s) {
#if HAS_FILAMENT_SENSOR
runout.reset();
#endif
current_position.e += length / planner.e_factor[active_extruder];
line_to_current_position(fr_mm_s);
planner.synchronize();
}
/**
* Load filament into the hotend
*
@@ -175,6 +184,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
#if ENABLED(HOST_PROMPT_SUPPORT)
const char tool = '0'
#if NUM_RUNOUT_SENSORS > 1
@@ -208,7 +218,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
// Slow Load filament
if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
// Fast Load Filament
if (fast_load_length) {
@@ -217,7 +227,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
planner.settings.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
#endif
unscaled_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
planner.settings.retract_acceleration = saved_acceleration;
@@ -236,15 +246,15 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
if (show_lcd) lcd_pause_show_message(PAUSE_MESSAGE_PURGE);
#endif
wait_for_user = true;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purging..."), CONTINUE_STR);
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onUserConfirmRequired_P(PSTR("Filament Purging..."));
#endif
wait_for_user = true; // A click or M108 breaks the purge_length loop
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
wait_for_user = false;
#else
@@ -257,7 +267,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
// Extrude filament to get into hotend
unscaled_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
}
#if ENABLED(HOST_PROMPT_SUPPORT)
@@ -322,13 +332,13 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
#endif
// Retract filament
unscaled_e_move(-(FILAMENT_UNLOAD_PURGE_RETRACT) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier);
do_pause_e_move(-(FILAMENT_UNLOAD_PURGE_RETRACT) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier);
// Wait for filament to cool
safe_delay(FILAMENT_UNLOAD_PURGE_DELAY);
// Quickly purge
unscaled_e_move((FILAMENT_UNLOAD_PURGE_RETRACT + FILAMENT_UNLOAD_PURGE_LENGTH) * mix_multiplier,
do_pause_e_move((FILAMENT_UNLOAD_PURGE_RETRACT + FILAMENT_UNLOAD_PURGE_LENGTH) * mix_multiplier,
(FILAMENT_UNLOAD_PURGE_FEEDRATE) * mix_multiplier);
// Unload filament
@@ -337,7 +347,7 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
planner.settings.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
#endif
unscaled_e_move(unload_length * mix_multiplier, (FILAMENT_CHANGE_UNLOAD_FEEDRATE) * mix_multiplier);
do_pause_e_move(unload_length * mix_multiplier, (FILAMENT_CHANGE_UNLOAD_FEEDRATE) * mix_multiplier);
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
planner.settings.retract_acceleration = saved_acceleration;
@@ -427,7 +437,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
// Initial retract before move to filament change position
if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
// Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
if (!axes_need_homing())
@@ -498,13 +508,13 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
// Wait for filament insert by user and press button
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; // LCD click or M108 will clear this
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Nozzle Parked"), CONTINUE_STR);
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onUserConfirmRequired_P(PSTR("Nozzle Parked"));
#endif
wait_for_user = true; // LCD click or M108 will clear this
while (wait_for_user) {
#if HAS_BUZZER
filament_change_beep(max_beep_count);
@@ -530,7 +540,8 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
ExtUI::onUserConfirmRequired_P(PSTR("HeaterTimeout"));
#endif
wait_for_user_response(0, true); // Wait for LCD click or M108
// Wait for LCD click or M108
while (wait_for_user) idle_no_sleep();
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_INFO, PSTR("Reheating"));
@@ -622,11 +633,11 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
#if ENABLED(FWRETRACT)
// If retracted before goto pause
if (fwretract.retracted[active_extruder])
unscaled_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
do_pause_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
#endif
// If resume_position is negative
if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
if (resume_position.e < 0) do_pause_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
// Move XY to starting position, then Z
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
@@ -635,7 +646,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
#if ADVANCED_PAUSE_RESUME_PRIME != 0
unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
do_pause_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
#endif
// Now all extrusion positions are resumed and ready to be confirmed
+2
View File
@@ -83,6 +83,8 @@ extern uint8_t did_pause_print;
#define DXC_PASS
#endif
void do_pause_e_move(const float &length, const feedRate_t &fr_mm_s);
bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS);
void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
+1 -1
View File
@@ -1254,7 +1254,7 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z
#endif
}
if (axis_connection) LCD_MESSAGEPGM(MSG_ERROR_TMC);
if (axis_connection) ui.set_status_P(GET_TEXT(MSG_ERROR_TMC));
}
#endif // HAS_TRINAMIC_CONFIG
+39 -17
View File
@@ -49,27 +49,37 @@ void TWIBus::address(const uint8_t adr) {
addr = adr;
debug(PSTR("address"), adr);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("address"), adr);
#endif
}
void TWIBus::addbyte(const char c) {
if (buffer_s >= COUNT(buffer)) return;
buffer[buffer_s++] = c;
debug(PSTR("addbyte"), c);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("addbyte"), c);
#endif
}
void TWIBus::addbytes(char src[], uint8_t bytes) {
debug(PSTR("addbytes"), bytes);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("addbytes"), bytes);
#endif
while (bytes--) addbyte(*src++);
}
void TWIBus::addstring(char str[]) {
debug(PSTR("addstring"), str);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("addstring"), str);
#endif
while (char c = *str++) addbyte(c);
}
void TWIBus::send() {
debug(PSTR("send"), addr);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("send"), addr);
#endif
Wire.beginTransmission(I2C_ADDRESS(addr));
Wire.write(buffer, buffer_s);
@@ -79,21 +89,21 @@ void TWIBus::send() {
}
// static
void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) {
void TWIBus::echoprefix(uint8_t bytes, const char prefix[], uint8_t adr) {
SERIAL_ECHO_START();
serialprintPGM(pref);
serialprintPGM(prefix);
SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:");
}
// static
void TWIBus::echodata(uint8_t bytes, const char pref[], uint8_t adr) {
echoprefix(bytes, pref, adr);
void TWIBus::echodata(uint8_t bytes, const char prefix[], uint8_t adr) {
echoprefix(bytes, prefix, adr);
while (bytes-- && Wire.available()) SERIAL_CHAR(Wire.read());
SERIAL_EOL();
}
void TWIBus::echobuffer(const char pref[], uint8_t adr) {
echoprefix(buffer_s, pref, adr);
void TWIBus::echobuffer(const char prefix[], uint8_t adr) {
echoprefix(buffer_s, prefix, adr);
LOOP_L_N(i, buffer_s) SERIAL_CHAR(buffer[i]);
SERIAL_EOL();
}
@@ -101,11 +111,15 @@ void TWIBus::echobuffer(const char pref[], uint8_t adr) {
bool TWIBus::request(const uint8_t bytes) {
if (!addr) return false;
debug(PSTR("request"), bytes);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("request"), bytes);
#endif
// requestFrom() is a blocking function
if (Wire.requestFrom(addr, bytes) == 0) {
debug("request fail", addr);
#if ENABLED(DEBUG_TWIBUS)
debug("request fail", addr);
#endif
return false;
}
@@ -113,7 +127,9 @@ bool TWIBus::request(const uint8_t bytes) {
}
void TWIBus::relay(const uint8_t bytes) {
debug(PSTR("relay"), bytes);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("relay"), bytes);
#endif
if (request(bytes))
echodata(bytes, PSTR("i2c-reply"), addr);
@@ -125,7 +141,9 @@ uint8_t TWIBus::capture(char *dst, const uint8_t bytes) {
while (count < bytes && Wire.available())
dst[count++] = Wire.read();
debug(PSTR("capture"), count);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("capture"), count);
#endif
return count;
}
@@ -138,12 +156,16 @@ void TWIBus::flush() {
#if I2C_SLAVE_ADDRESS > 0
void TWIBus::receive(uint8_t bytes) {
debug(PSTR("receive"), bytes);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("receive"), bytes);
#endif
echodata(bytes, PSTR("i2c-receive"), 0);
}
void TWIBus::reply(char str[]/*=nullptr*/) {
debug(PSTR("reply"), str);
#if ENABLED(DEBUG_TWIBUS)
debug(PSTR("reply"), str);
#endif
if (str) {
reset();
+2 -5
View File
@@ -223,6 +223,7 @@ class TWIBus {
#endif
#if ENABLED(DEBUG_TWIBUS)
/**
* @brief Prints a debug message
* @details Prints a simple debug message "TWIBus::function: value"
@@ -232,10 +233,6 @@ class TWIBus {
static void debug(const char func[], char c);
static void debug(const char func[], char adr[]);
static inline void debug(const char func[], uint8_t v) { debug(func, (uint32_t)v); }
#else
static inline void debug(const char[], uint32_t) {}
static inline void debug(const char[], char) {}
static inline void debug(const char[], char[]) {}
static inline void debug(const char[], uint8_t) {}
#endif
};
+12 -8
View File
@@ -255,28 +255,28 @@ void GcodeSuite::G28() {
#define HAS_HOMING_CURRENT (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2))
#if HAS_HOMING_CURRENT
auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b){
serialprintPGM(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
auto debug_current = [](const char * const s, const int16_t a, const int16_t b){
DEBUG_ECHO(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b);
};
#if HAS_CURRENT_HOME(X)
const int16_t tmc_save_current_X = stepperX.getMilliamps();
stepperX.rms_current(X_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("X"), tmc_save_current_X, X_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current("X", tmc_save_current_X, X_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(X2)
const int16_t tmc_save_current_X2 = stepperX2.getMilliamps();
stepperX2.rms_current(X2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("X2"), tmc_save_current_X2, X2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current("X2", tmc_save_current_X2, X2_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(Y)
const int16_t tmc_save_current_Y = stepperY.getMilliamps();
stepperY.rms_current(Y_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y"), tmc_save_current_Y, Y_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current("Y", tmc_save_current_Y, Y_CURRENT_HOME);
#endif
#if HAS_CURRENT_HOME(Y2)
const int16_t tmc_save_current_Y2 = stepperY2.getMilliamps();
stepperY2.rms_current(Y2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME);
if (DEBUGGING(LEVELING)) debug_current("Y2", tmc_save_current_Y2, Y2_CURRENT_HOME);
#endif
#endif
@@ -345,8 +345,12 @@ void GcodeSuite::G28() {
#endif
// Home Y (before X)
if (ENABLED(HOME_Y_BEFORE_X) && (doY || (ENABLED(CODEPENDENT_XY_HOMING) && doX)))
homeaxis(Y_AXIS);
#if ENABLED(HOME_Y_BEFORE_X)
if (doY || (doX && ENABLED(CODEPENDENT_XY_HOMING)))
homeaxis(Y_AXIS);
#endif
// Home X
if (doX || (doY && ENABLED(CODEPENDENT_XY_HOMING) && DISABLED(HOME_Y_BEFORE_X))) {
+59 -85
View File
@@ -37,21 +37,6 @@
#include "../../module/endstops.h"
#include "../../feature/bedlevel/bedlevel.h"
#if !AXIS_CAN_CALIBRATE(X)
#undef CALIBRATION_MEASURE_LEFT
#undef CALIBRATION_MEASURE_RIGHT
#endif
#if !AXIS_CAN_CALIBRATE(Y)
#undef CALIBRATION_MEASURE_FRONT
#undef CALIBRATION_MEASURE_BACK
#endif
#if !AXIS_CAN_CALIBRATE(Z)
#undef CALIBRATION_MEASURE_AT_TOP_EDGES
#endif
/**
* G425 backs away from the calibration object by various distances
* depending on the confidence level:
@@ -222,52 +207,42 @@ inline float measure(const AxisEnum axis, const int dir, const bool stop_state,
inline void probe_side(measurements_t &m, const float uncertainty, const side_t side, const bool probe_top_at_edge=false) {
const xyz_float_t dimensions = CALIBRATION_OBJECT_DIMENSIONS;
AxisEnum axis;
float dir = 1;
float dir;
park_above_object(m, uncertainty);
switch (side) {
#if AXIS_CAN_CALIBRATE(Z)
case TOP: {
const float measurement = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty);
m.obj_center.z = measurement - dimensions.z / 2;
m.obj_side[TOP] = measurement;
return;
}
#endif
#if AXIS_CAN_CALIBRATE(X)
case LEFT: axis = X_AXIS; break;
case RIGHT: axis = X_AXIS; dir = -1; break;
#endif
#if AXIS_CAN_CALIBRATE(Y)
case FRONT: axis = Y_AXIS; break;
case BACK: axis = Y_AXIS; dir = -1; break;
#endif
case TOP: {
const float measurement = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty);
m.obj_center.z = measurement - dimensions.z / 2;
m.obj_side[TOP] = measurement;
return;
}
case RIGHT: axis = X_AXIS; dir = -1; break;
case FRONT: axis = Y_AXIS; dir = 1; break;
case LEFT: axis = X_AXIS; dir = 1; break;
case BACK: axis = Y_AXIS; dir = -1; break;
default: return;
}
if (probe_top_at_edge) {
#if AXIS_CAN_CALIBRATE(Z)
// Probe top nearest the side we are probing
current_position[axis] = m.obj_center[axis] + (-dir) * (dimensions[axis] / 2 - m.nozzle_outer_dimension[axis]);
calibration_move();
m.obj_side[TOP] = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty);
m.obj_center.z = m.obj_side[TOP] - dimensions.z / 2;
#endif
// Probe top nearest the side we are probing
current_position[axis] = m.obj_center[axis] + (-dir) * (dimensions[axis] / 2 - m.nozzle_outer_dimension[axis]);
calibration_move();
m.obj_side[TOP] = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty);
m.obj_center.z = m.obj_side[TOP] - dimensions.z / 2;
}
if (AXIS_CAN_CALIBRATE(X) && axis == X_AXIS || AXIS_CAN_CALIBRATE(Y) && axis == Y_AXIS) {
// Move to safe distance to the side of the calibration object
current_position[axis] = m.obj_center[axis] + (-dir) * (dimensions[axis] / 2 + m.nozzle_outer_dimension[axis] / 2 + uncertainty);
calibration_move();
// Move to safe distance to the side of the calibration object
current_position[axis] = m.obj_center[axis] + (-dir) * (dimensions[axis] / 2 + m.nozzle_outer_dimension[axis] / 2 + uncertainty);
calibration_move();
// Plunge below the side of the calibration object and measure
current_position.z = m.obj_side[TOP] - (CALIBRATION_NOZZLE_TIP_HEIGHT) * 0.7f;
calibration_move();
const float measurement = measure(axis, dir, true, &m.backlash[side], uncertainty);
m.obj_center[axis] = measurement + dir * (dimensions[axis] / 2 + m.nozzle_outer_dimension[axis] / 2);
m.obj_side[side] = measurement;
}
// Plunge below the side of the calibration object and measure
current_position.z = m.obj_side[TOP] - CALIBRATION_NOZZLE_TIP_HEIGHT * 0.7;
calibration_move();
const float measurement = measure(axis, dir, true, &m.backlash[side], uncertainty);
m.obj_center[axis] = measurement + dir * (dimensions[axis] / 2 + m.nozzle_outer_dimension[axis] / 2);
m.obj_side[side] = measurement;
}
/**
@@ -277,7 +252,7 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t
* uncertainty in - How far away from the calibration object to begin probing
*/
inline void probe_sides(measurements_t &m, const float uncertainty) {
#if ENABLED(CALIBRATION_MEASURE_AT_TOP_EDGES)
#ifdef CALIBRATION_MEASURE_AT_TOP_EDGES
constexpr bool probe_top_at_edge = true;
#else
// Probing at the exact center only works if the center is flat. Probing on a washer
@@ -286,18 +261,18 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
probe_side(m, uncertainty, TOP);
#endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
#ifdef CALIBRATION_MEASURE_RIGHT
probe_side(m, uncertainty, RIGHT, probe_top_at_edge);
#endif
#if ENABLED(CALIBRATION_MEASURE_FRONT)
#ifdef CALIBRATION_MEASURE_FRONT
probe_side(m, uncertainty, FRONT, probe_top_at_edge);
#endif
#if ENABLED(CALIBRATION_MEASURE_LEFT)
#ifdef CALIBRATION_MEASURE_LEFT
probe_side(m, uncertainty, LEFT, probe_top_at_edge);
#endif
#if ENABLED(CALIBRATION_MEASURE_BACK)
#ifdef CALIBRATION_MEASURE_BACK
probe_side(m, uncertainty, BACK, probe_top_at_edge);
#endif
@@ -338,9 +313,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
#if ENABLED(CALIBRATION_REPORTING)
inline void report_measured_faces(const measurements_t &m) {
SERIAL_ECHOLNPGM("Sides:");
#if AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]);
#endif
SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]);
#if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]);
#endif
@@ -370,25 +343,19 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
inline void report_measured_backlash(const measurements_t &m) {
SERIAL_ECHOLNPGM("Backlash:");
#if AXIS_CAN_CALIBRATE(X)
#if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_LEFT)
SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]);
#endif
#if AXIS_CAN_CALIBRATE(Y)
#if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]);
#endif
#if ENABLED(CALIBRATION_MEASURE_RIGHT)
SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]);
#endif
#if AXIS_CAN_CALIBRATE(Z)
SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]);
#if ENABLED(CALIBRATION_MEASURE_FRONT)
SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]);
#endif
#if ENABLED(CALIBRATION_MEASURE_BACK)
SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]);
#endif
SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]);
SERIAL_EOL();
}
@@ -402,7 +369,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
#if HAS_Y_CENTER
SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y);
#endif
if (AXIS_CAN_CALIBRATE(Z)) SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z);
SERIAL_EOL();
}
@@ -450,7 +417,6 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) {
probe_sides(m, uncertainty);
#if ENABLED(BACKLASH_GCODE)
#if HAS_X_CENTER
backlash.distance_mm.x = (m.backlash[LEFT] + m.backlash[RIGHT]) / 2;
#elif ENABLED(CALIBRATION_MEASURE_LEFT)
@@ -467,18 +433,18 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) {
backlash.distance_mm.y = m.backlash[BACK];
#endif
if (AXIS_CAN_CALIBRATE(Z)) backlash.distance_mm.z = m.backlash[TOP];
backlash.distance_mm.z = m.backlash[TOP];
#endif
}
#if ENABLED(BACKLASH_GCODE)
// Turn on backlash compensation and move in all
// allowed directions to take up any backlash
// directions to take up any backlash
{
// New scope for TEMPORARY_BACKLASH_CORRECTION
TEMPORARY_BACKLASH_CORRECTION(all_on);
TEMPORARY_BACKLASH_SMOOTHING(0.0f);
const xyz_float_t move = { AXIS_CAN_CALIBRATE(X) * 3, AXIS_CAN_CALIBRATE(Y) * 3, AXIS_CAN_CALIBRATE(Z) * 3 };
const xyz_float_t move = { 3, 3, 3 };
current_position += move; calibration_move();
current_position -= move; calibration_move();
}
@@ -516,18 +482,26 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const
// Adjust the hotend offset
#if HAS_HOTEND_OFFSET
if (ENABLED(HAS_X_CENTER) && AXIS_CAN_CALIBRATE(X)) hotend_offset[extruder].x += m.pos_error.x;
if (ENABLED(HAS_Y_CENTER) && AXIS_CAN_CALIBRATE(Y)) hotend_offset[extruder].y += m.pos_error.y;
if (AXIS_CAN_CALIBRATE(Z)) hotend_offset[extruder].z += m.pos_error.z;
#if HAS_X_CENTER
hotend_offset[extruder].x += m.pos_error.x;
#endif
#if HAS_Y_CENTER
hotend_offset[extruder].y += m.pos_error.y;
#endif
hotend_offset[extruder].z += m.pos_error.z;
normalize_hotend_offsets();
#endif
// Correct for positional error, so the object
// is at the known actual spot
planner.synchronize();
if (ENABLED(HAS_X_CENTER) && AXIS_CAN_CALIBRATE(X)) update_measurements(m, X_AXIS);
if (ENABLED(HAS_Y_CENTER) && AXIS_CAN_CALIBRATE(Y)) update_measurements(m, Y_AXIS);
if (AXIS_CAN_CALIBRATE(Z)) update_measurements(m, Z_AXIS);
#if HAS_X_CENTER
update_measurements(m, X_AXIS);
#endif
#if HAS_Y_CENTER
update_measurements(m, Y_AXIS);
#endif
update_measurements(m, Z_AXIS);
sync_plan_position();
}
+3 -3
View File
@@ -47,7 +47,7 @@ void GcodeSuite::M425() {
bool noArgs = true;
LOOP_XYZ(a) {
if (CAN_CALIBRATE(a) && parser.seen(XYZ_CHAR(a))) {
if (parser.seen(XYZ_CHAR(a))) {
planner.synchronize();
backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a));
noArgs = false;
@@ -74,7 +74,7 @@ void GcodeSuite::M425() {
SERIAL_ECHOLNPGM("active:");
SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)");
SERIAL_ECHOPGM(" Backlash Distance (mm): ");
LOOP_XYZ(a) if (CAN_CALIBRATE(a)) {
LOOP_XYZ(a) {
SERIAL_CHAR(' ', XYZ_CHAR(a));
SERIAL_ECHO(backlash.distance_mm[a]);
SERIAL_EOL();
@@ -87,7 +87,7 @@ void GcodeSuite::M425() {
#if ENABLED(MEASURE_BACKLASH_WHEN_PROBING)
SERIAL_ECHOPGM(" Average measured backlash (mm):");
if (backlash.has_any_measurement()) {
LOOP_XYZ(a) if (CAN_CALIBRATE(a) && backlash.has_measurement(AxisEnum(a))) {
LOOP_XYZ(a) if (backlash.has_measurement(AxisEnum(a))) {
SERIAL_CHAR(' ', XYZ_CHAR(a));
SERIAL_ECHO(backlash.get_measurement(AxisEnum(a)));
}
+2 -10
View File
@@ -67,11 +67,7 @@ inline void toggle_pins() {
else {
watchdog_refresh();
report_pin_state_extended(pin, ignore_protection, true, PSTR("Pulsing "));
#ifdef __STM32F1__
const auto prior_mode = _GET_MODE(i);
#else
const bool prior_mode = GET_PINMODE(pin);
#endif
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);
@@ -100,11 +96,7 @@ inline void toggle_pins() {
watchdog_refresh();
}
}
#ifdef __STM32F1__
_SET_MODE(i, prior_mode);
#else
pinMode(pin, prior_mode);
#endif
pinMode(pin, prior_mode);
}
SERIAL_EOL();
}
+8 -2
View File
@@ -48,8 +48,14 @@
#ifdef PHOTO_RETRACT_MM
inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) {
if (length && thermalManager.hotEnoughToExtrude(active_extruder))
unscaled_e_move(length, fr_mm_s);
if (length && thermalManager.hotEnoughToExtrude(active_extruder)) {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
do_pause_e_move(length, fr_mm_s);
#else
current_position.e += length / planner.e_factor[active_extruder];
line_to_current_position(fr_mm_s);
#endif
}
}
#endif
@@ -29,11 +29,11 @@
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,
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, "%)"
);
+1 -1
View File
@@ -63,7 +63,7 @@ void GcodeSuite::M1000() {
#if HAS_LCD_MENU
ui.goto_screen(menu_job_recovery);
#elif ENABLED(EXTENSIBLE_UI)
ExtUI::onPowerLossResume();
ExtUI::OnPowerLossResume();
#else
SERIAL_ECHO_MSG("Resume requires LCD.");
#endif
+1 -5
View File
@@ -857,11 +857,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if ENABLED(POWER_LOSS_RECOVERY)
case 413: M413(); break; // M413: Enable/disable/query Power-Loss Recovery
case 1000: M1000(); break; // M1000: [INTERNAL] Resume from power-loss
#endif
#if ENABLED(SDSUPPORT)
case 1001: M1001(); break; // M1001: [INTERNAL] Handle SD completion
case 1000: M1000(); break; // M1000: Resume from power-loss
#endif
#if ENABLED(MAX7219_GCODE)
-4
View File
@@ -968,10 +968,6 @@ private:
static void M1000();
#endif
#if ENABLED(SDSUPPORT)
static void M1001();
#endif
#if ENABLED(MAX7219_GCODE)
static void M7219();
#endif
+33 -12
View File
@@ -24,19 +24,23 @@
#if HAS_RESUME_CONTINUE
#include "../../inc/MarlinConfig.h"
#include "../gcode.h"
#include "../../module/planner.h"
#include "../../module/planner.h" // for synchronize()
#include "../../MarlinCore.h" // for wait_for_user_response()
#include "../../inc/MarlinConfig.h"
#if HAS_LCD_MENU
#include "../../lcd/ultralcd.h"
#elif ENABLED(EXTENSIBLE_UI)
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#endif
#if HAS_LEDS_OFF_FLAG
#include "../../feature/leds/printer_event_leds.h"
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
#include "../../feature/host_actions.h"
#endif
@@ -52,11 +56,16 @@ void GcodeSuite::M0_M1() {
planner.synchronize();
const bool seenQ = parser.seen('Q');
#if HAS_LEDS_OFF_FLAG
if (seenQ) printerEventLEDs.onPrintCompleted(); // Change LED color for Print Completed
#endif
#if HAS_LCD_MENU
if (parser.string_arg)
ui.set_status(parser.string_arg, true);
else {
else if (!seenQ) {
LCD_MESSAGEPGM(MSG_USERWAIT);
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
ui.reset_progress_bar_timeout();
@@ -64,10 +73,12 @@ void GcodeSuite::M0_M1() {
}
#elif ENABLED(EXTENSIBLE_UI)
if (parser.string_arg)
ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
else
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
if (!seenQ) {
if (parser.string_arg)
ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string??
else
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT));
}
#else
if (parser.string_arg) {
@@ -77,15 +88,25 @@ void GcodeSuite::M0_M1() {
#endif
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true;
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR);
#endif
wait_for_user_response(ms);
if (ms > 0) ms += millis(); // wait until this time for a click
while (wait_for_user && (ms == 0 || PENDING(millis(), ms))) idle();
#if HAS_LEDS_OFF_FLAG
printerEventLEDs.onResumeAfterWait();
#endif
#if HAS_LCD_MENU
ui.reset_status();
if (!seenQ) ui.reset_status();
#endif
wait_for_user = false;
}
#endif // HAS_RESUME_CONTINUE
+1 -1
View File
@@ -236,7 +236,7 @@ void plan_arc(
planner.apply_leveling(raw);
#endif
planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0
planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, seg_length
#if ENABLED(SCARA_FEEDRATE_SCALING)
, inv_duration
#endif
-109
View File
@@ -1,109 +0,0 @@
/**
* 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/MarlinConfig.h"
#if ENABLED(SDSUPPORT)
#include "../gcode.h"
#include "../../module/printcounter.h"
#if EITHER(LCD_SET_PROGRESS_MANUALLY, SD_REPRINT_LAST_SELECTED_FILE)
#include "../../lcd/ultralcd.h"
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../feature/powerloss.h"
#endif
#if HAS_LEDS_OFF_FLAG
#include "../../feature/leds/printer_event_leds.h"
#endif
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
#endif
#if ENABLED(HOST_ACTION_COMMANDS)
#include "../../feature/host_actions.h"
#endif
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
#include "../../module/planner.h"
#endif
#ifndef PE_LEDS_COMPLETED_TIME
#define PE_LEDS_COMPLETED_TIME (30*60)
#endif
/**
* M1001: Execute actions for SD print completion
*/
void GcodeSuite::M1001() {
// Report total print time
const bool long_print = print_job_timer.duration() > 60;
if (long_print) gcode.process_subcommands_now_P(PSTR("M31"));
// Stop the print job timer
gcode.process_subcommands_now_P(PSTR("M77"));
// Set the progress bar "done" state
#if ENABLED(LCD_SET_PROGRESS_MANUALLY)
ui.set_progress_done();
#endif
// Purge the recovery file
#if ENABLED(POWER_LOSS_RECOVERY)
recovery.purge();
#endif
// Announce SD file completion
SERIAL_ECHOLNPGM(STR_FILE_PRINTED);
// Update the status LED color
#if HAS_LEDS_OFF_FLAG
if (long_print) {
printerEventLEDs.onPrintCompleted();
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PRINT_DONE));
#endif
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_PRINT_DONE), CONTINUE_STR);
#endif
wait_for_user_response(1000UL * TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30));
printerEventLEDs.onResumeAfterWait();
}
#endif
// Wait for the queue to empty (and "clean"), inject SD_FINISHED_RELEASECOMMAND
#if ENABLED(SD_FINISHED_STEPPERRELEASE) && defined(SD_FINISHED_RELEASECOMMAND)
planner.finish_and_disable();
#endif
// Re-select the last printed file in the UI
#if ENABLED(SD_REPRINT_LAST_SELECTED_FILE)
ui.reselect_last_file();
#endif
}
#endif // SDSUPPORT
+1 -1
View File
@@ -73,7 +73,7 @@ void GcodeSuite::M303() {
if (!WITHIN(e, SI, EI)) {
SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
ExtUI::OnPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
#endif
return;
}
+1 -1
View File
@@ -93,7 +93,7 @@
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
#define HAS_SOFTWARE_ENDSTOPS 1
#endif
#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS)
#if ANY(EXTENSIBLE_UI, NEWPANEL, EMERGENCY_PARSER)
#define HAS_RESUME_CONTINUE 1
#endif
+5 -21
View File
@@ -35,19 +35,16 @@
#define HAS_LINEAR_E_JERK 1
#endif
// Determine which type of 'EEPROM' is in use
// If no real EEPROM, Flash emulation, or SRAM emulation is available fall back to SD emulation
#if ENABLED(EEPROM_SETTINGS)
// EEPROM type may be defined by compile flags, configs, HALs, or pins
// Set additional flags to let HALs choose in their Conditionals_post.h
#if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && ANY(I2C_EEPROM, SPI_EEPROM, QSPI_EEPROM)
#define USE_WIRED_EEPROM 1
#if NONE(FLASH_EEPROM_EMULATION, SRAM_EEPROM_EMULATION, SDCARD_EEPROM_EMULATION) && EITHER(I2C_EEPROM, SPI_EEPROM)
#define USE_REAL_EEPROM 1
#else
#define USE_FALLBACK_EEPROM 1
#define USE_EMULATED_EEPROM 1
#endif
#else
#undef I2C_EEPROM
#undef SPI_EEPROM
#undef QSPI_EEPROM
#undef SDCARD_EEPROM_EMULATION
#undef SRAM_EEPROM_EMULATION
#undef FLASH_EEPROM_EMULATION
@@ -139,19 +136,6 @@
#define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n))
#endif
// Calibration codes only for non-core axes
#if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE)
#if IS_CORE
#define X_AXIS_INDEX 0
#define Y_AXIS_INDEX 1
#define Z_AXIS_INDEX 2
#define CAN_CALIBRATE(A,B) (A##_AXIS_INDEX == B##_INDEX)
#else
#define CAN_CALIBRATE(...) 1
#endif
#endif
#define AXIS_CAN_CALIBRATE(A) CAN_CALIBRATE(A,NORMAL_AXIS)
/**
* No adjustable bed on non-cartesians
*/
@@ -2164,7 +2148,7 @@
#define SHARED_SD_CARD
#endif
#if DISABLED(SHARED_SD_CARD)
#define INIT_SDCARD_ON_BOOT 1
#define INIT_SDCARD_ON_BOOT
#endif
#endif
+1 -2
View File
@@ -35,12 +35,11 @@
#include "Conditionals_post.h"
#include HAL_PATH(../HAL, inc/Conditionals_post.h)
#include "../core/types.h" // Ahead of sanity-checks
#include "SanityCheck.h"
#include HAL_PATH(../HAL, inc/SanityCheck.h)
// Include all core headers
#include "../core/types.h"
#include "../core/language.h"
#include "../core/utility.h"
#include "../core/serial.h"
+1 -1
View File
@@ -42,7 +42,7 @@
* version was tagged.
*/
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2020-04-02"
#define STRING_DISTRIBUTION_DATE "2020-03-25"
#endif
/**
+2 -2
View File
@@ -367,11 +367,11 @@ void MarlinUI::init_lcd() {
}
bool MarlinUI::detected() {
return (true
return true
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE)
&& lcd.LcdDetected() == 1
#endif
);
;
}
#if HAS_SLOW_BUTTONS
+7 -1
View File
@@ -244,7 +244,13 @@ void MarlinUI::init_lcd() {
#if DISABLED(MKS_LCD12864B)
#if PIN_EXISTS(LCD_BACKLIGHT)
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
OUT_WRITE(LCD_BACKLIGHT_PIN, (
#if ENABLED(DELAYED_BACKLIGHT_INIT)
LOW // Illuminate after reset
#else
HIGH // Illuminate right away
#endif
));
#endif
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
-194
View File
@@ -1,194 +0,0 @@
#pragma once
#include "string.h"
#include <Arduino.h>
#include "../ui_api.h"
#if ENABLED(EXTENSIBLE_UI)
namespace ExtUI {
/*********************************/
#define FHONE (0x5A)
#define FHTWO (0xA5)
#define TEXTBYTELEN 18
#define MaxFileNumber 20// 16
#define CEIconGrap 12
#define FileNum MaxFileNumber
#define FileNameLen TEXTBYTELEN
#define SizeofDatabuf 26
/*************Register and Variable addr*****************/
#define RegAddr_W 0x80
#define RegAddr_R 0x81
#define VarAddr_W 0x82
#define VarAddr_R 0x83
#define ExchangePageBase (unsigned long)0x5A010000 //the first page ID. other page = first page ID + relevant num;
#define StartSoundSet ((unsigned long)0x060480A0) // 06,start-music; 04, 4 musics; 80, the volume value; 04, return value about music number.
#define FONT_EEPROM 90
#define AutoLeve_EEPROM 100
#define FanOn 255
#define FanOff 0
/*variable addr*/
#define ExchangepageAddr 0x0084
#define SoundAddr 0x00A0
#define StartIcon 0x1000
#define FeedrateDisplay 0x1006 // Speed
#define Stopprint 0x1008
#define Pauseprint 0x100A
#define Resumeprint 0x100C
#define PrintscheduleIcon 0x100E
#define Timehour 0x1010
#define Timemin 0x1012
#define IconPrintstatus 0x1014
#define Percentage 0x1016
#define FanKeyIcon 0x101E
#define Flowrate 0x1300
#define StepMM_X 0x1242
#define StepMM_Y 0x1246
#define StepMM_Z 0x124A
#define StepMM_E 0x124E
#define ProbeOffset_X 0x1236
#define ProbeOffset_Y 0x123A
#define ProbeOffset_Z 0x123E
#define HotendPID_AutoTmp 0x1252
#define BedPID_AutoTmp 0x1254
#define HotendPID_P 0x1256
#define HotendPID_I 0x125A
#define HotendPID_D 0x125E
#define BedPID_P 0x1262
#define BedPID_I 0x1266
#define BedPID_D 0x126A
#define HeatPercentIcon 0x1024
#define NzBdSet 0x1032
#define NozzlePreheat 0x1034
#define NozzleTemp 0x1036
#define BedPreheat 0x103A
#define Bedtemp 0x103C
#define AutoZeroIcon 0x1042
#define AutoLevelIcon 0x1045
#define AutoZero 0x1046
#define DisplayXaxis 0x1048
#define DisplayYaxis 0x104A
#define DisplayZaxis 0x104C
#define FilementUnit1 0x1054
#define Exchfilement 0x1056
#define FilementUnit2 0x1058
#define MacVersion 0x1060
#define SoftVersion 0x106A
#define PrinterSize 0x1074
#define CorpWebsite 0x107E
#define VolumeIcon 0x108A
#define SoundIcon 0x108C
#define AutolevelIcon 0x108D
#define ExchFlmntIcon 0x108E
#define AutolevelVal 0x1100
#define FilenameIcon 0x1200
#define FilenameIcon1 0x1220
#define Printfilename 0x2000
#define SDFILE_ADDR 0x200A
#define FilenamePlay 0x20D2
#define FilenameChs 0x20D3
#define Choosefilename 0x20D4
#define FilenameCount 0x20DE
#define FilenameNature 0x6003
#if ANY(MachineCR10SPro, MachineEnder5Plus, MachineCR10Max) || ENABLED(Force10SProDisplay)
#define StatusMessageString 0x3000
#else
#define StatusMessageString 0x20E8
#endif
#if defined(MCU_LPC1769) || defined(MCU_LPC1768)
#define DWIN_SERIAL DGUS_SERIAL
#elif defined(TARGET_STM32F4)
#define DWIN_SERIAL Serial1
#else
#define DWIN_SERIAL Serial2
#endif
/************struct**************/
typedef struct DataBuf
{
unsigned char len;
unsigned char head[2];
unsigned char command;
unsigned long addr;
unsigned long bytelen;
unsigned short data[32];
unsigned char reserv[4];
} DB;
typedef struct CardRecord
{
char recordcount;
int Filesum;
unsigned long addr[FileNum];
char Cardshowfilename[FileNum][FileNameLen];
char Cardfilename[FileNum][FileNameLen];
}CRec;
class RTSSHOW {
public:
RTSSHOW();
int RTS_RecData();
void RTS_SDCardInit(void);
void RTS_SDCardUpate(bool, bool);
int RTS_CheckFilement(int);
void RTS_SndData(void);
void RTS_SndData(const String &, unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(const char[], unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(char, unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(unsigned char*, unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(int, unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(float, unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(unsigned int,unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(long,unsigned long, unsigned char = VarAddr_W);
void RTS_SndData(unsigned long,unsigned long, unsigned char = VarAddr_W);
void RTS_SDcard_Stop();
void RTS_HandleData();
void RTS_Init();
DB recdat;
DB snddat;
unsigned char databuf[SizeofDatabuf];
};
static RTSSHOW rtscheck;
#define Addvalue 3
#define PrintChoice_Value (0+Addvalue)
#define Zoffset_Value (3+Addvalue)
#define Setting_Value (8+Addvalue)
#define XYZEaxis_Value (12+Addvalue)
#define Filement_Value (15+Addvalue)
#define Language_Value (18+Addvalue)
#define Filename_Value (22+Addvalue)
enum PROC_COM {Printfile=0,Ajust,Feedrate,PrintChoice=PrintChoice_Value,Zoffset=Zoffset_Value,TempControl,ManualSetTemp,Setting=Setting_Value,
ReturnBack,Bedlevel,Autohome,XYZEaxis=XYZEaxis_Value,Filement=Filement_Value,LanguageChoice=Language_Value,No_Filement,PwrOffNoF,Volume,Filename=Filename_Value};
const unsigned long Addrbuf[] = {0x1002, 0x1004, 0x1006, 0x1008, 0x100A, 0x100C, 0x1026, 0x1030, 0x1032, 0x1034, 0x103A,
0x103E, 0x1040, 0x1044, 0x1046, 0x1048, 0x104A, 0x104C, 0x1054, 0x1056, 0x1058,
0x105C, 0x105E, 0x105F, 0x1088, 0};
void RTSUpdate();
void RTSInit();
}
#ifndef USER_GCODE_1
#define USER_GCODE_1 "G28"
#endif
#endif
@@ -441,6 +441,7 @@ void DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variab
DGUSLCD_SendStringToDisplay(var);
}
void DGUSScreenVariableHandler::SDCardInserted() {
top_file = 0;
auto cs = ScreenHandler.getCurrentScreen();
@@ -38,11 +38,6 @@ namespace FTDI {
SET_OUTPUT(CLCD_SPI_CS);
WRITE(CLCD_SPI_CS, 1);
#ifdef CLCD_SPI_EXTRA_CS
SET_OUTPUT(CLCD_SPI_EXTRA_CS);
WRITE(CLCD_SPI_EXTRA_CS, 1);
#endif
#ifdef SPI_FLASH_SS
SET_OUTPUT(SPI_FLASH_SS);
WRITE(SPI_FLASH_SS, 1);
@@ -116,18 +111,12 @@ namespace FTDI {
::SPI.beginTransaction(spi_settings);
#endif
WRITE(CLCD_SPI_CS, 0);
#ifdef CLCD_SPI_EXTRA_CS
WRITE(CLCD_SPI_EXTRA_CS, 0);
#endif
delayMicroseconds(1);
}
// CLCD SPI - Chip Deselect
void SPI::spi_ftdi_deselect() {
WRITE(CLCD_SPI_CS, 1);
#ifdef CLCD_SPI_EXTRA_CS
WRITE(CLCD_SPI_EXTRA_CS, 1);
#endif
#ifndef CLCD_USE_SOFT_SPI
::SPI.endTransaction();
#endif
@@ -176,12 +176,11 @@
#undef MAKE_ARDUINO_PINS
} // namespace fast_io
#define SET_INPUT(pin) fast_io::pin::set_input()
#define SET_INPUT_PULLUP(pin) do{ fast_io::pin::set_input(); fast_io::pin::set_high(); }while(0)
#define SET_INPUT_PULLDOWN SET_INPUT
#define SET_OUTPUT(pin) fast_io::pin::set_output()
#define READ(pin) fast_io::pin::read()
#define WRITE(pin, value) fast_io::pin::write(value)
#define SET_INPUT(pin) fast_io::pin::set_input()
#define SET_INPUT_PULLUP(pin) fast_io::pin::set_input(); fast_io::pin::set_high()
#define SET_OUTPUT(pin) fast_io::pin::set_output()
#define READ(pin) fast_io::pin::read()
#define WRITE(pin, value) fast_io::pin::write(value)
#ifndef pgm_read_word_far
#define pgm_read_word_far pgm_read_word
@@ -196,11 +195,11 @@
#endif
#define SERIAL_ECHO_START()
#define SERIAL_ECHOLNPGM(str) Serial.println(F(str))
#define SERIAL_ECHOPGM(str) Serial.print(F(str))
#define SERIAL_ECHO_MSG(str) Serial.println(str)
#define SERIAL_ECHOLNPAIR(str, val) do{ Serial.print(F(str)); Serial.println(val); }while(0)
#define SERIAL_ECHOPAIR(str, val) do{ Serial.print(F(str)); Serial.print(val); }while(0)
#define SERIAL_ECHOLNPGM(str) Serial.println(F(str))
#define SERIAL_ECHOPGM(str) Serial.print(F(str))
#define SERIAL_ECHO_MSG(str) Serial.println(str)
#define SERIAL_ECHOLNPAIR(str, val) {Serial.print(F(str)); Serial.println(val);}
#define SERIAL_ECHOPAIR(str, val) {Serial.print(F(str)); Serial.print(val);}
#define safe_delay delay
@@ -191,7 +191,7 @@ namespace FTDI {
#if ENABLED(TOUCH_UI_DEBUG)
SERIAL_ECHO_START();
SERIAL_ECHOLNPAIR("Touch end: ", pressed_tag);
SERIAL_ECHOLNPAIR("Touch end: ", tag);
#endif
const uint8_t saved_pressed_tag = pressed_tag;
@@ -70,15 +70,13 @@ namespace Language_en {
PROGMEM Language_Str MSG_PRINT_FINISHED = u8"Print finished";
PROGMEM Language_Str MSG_PRINT_ERROR = u8"Print error";
PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_1 = u8"Color Touch Panel";
PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2 = WEBSITE_URL;
PROGMEM Language_Str MSG_LICENSE = u8"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.\n\nTo view a copy of the GNU General "
"Public License, go to the following location: http://www.gnu.org/licenses.";
PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2 = u8"Portions " COPYRIGHT_SIGN " 2019 Aleph Objects, Inc.\n"
"Portions " COPYRIGHT_SIGN " 2019 Cocoa Press";
PROGMEM Language_Str MSG_FIRMWARE_FOR_TOOLHEAD = u8"Firmware for toolhead:\n%s\n\n";
PROGMEM Language_Str MSG_RUNOUT_1 = u8"Runout 1";
PROGMEM Language_Str MSG_RUNOUT_2 = u8"Runout 2";
PROGMEM Language_Str MSG_DISPLAY_MENU = u8"Display";
PROGMEM Language_Str MSG_INTERFACE = u8"Interface";
PROGMEM Language_Str MSG_INTERFACE_SETTINGS = u8"Interface Settings";
PROGMEM Language_Str MSG_MEASURE_AUTOMATICALLY = u8"Measure automatically";
PROGMEM Language_Str MSG_H_OFFSET = u8"H Offset";
PROGMEM Language_Str MSG_V_OFFSET = u8"V Offset";
@@ -131,7 +129,7 @@ namespace Language_en {
PROGMEM Language_Str MSG_SOUND_VOLUME = u8"Sound volume";
PROGMEM Language_Str MSG_SCREEN_LOCK = u8"Screen lock";
PROGMEM Language_Str MSG_BOOT_SCREEN = u8"Boot screen";
PROGMEM Language_Str MSG_SOUNDS = u8"Sounds";
PROGMEM Language_Str MSG_INTERFACE_SOUNDS = u8"Interface Sounds";
PROGMEM Language_Str MSG_CLICK_SOUNDS = u8"Click sounds";
PROGMEM Language_Str MSG_EEPROM_RESTORED = u8"Settings restored from backup";
PROGMEM Language_Str MSG_EEPROM_RESET = u8"Settings restored to default";
@@ -146,12 +144,12 @@ namespace Language_en {
PROGMEM Language_Str MSG_TOUCH_CALIBRATION_START = u8"Release to begin screen calibration";
PROGMEM Language_Str MSG_TOUCH_CALIBRATION_PROMPT = u8"Touch the dots to calibrate";
PROGMEM Language_Str MSG_AUTOLEVEL_X_AXIS = u8"Level X Axis";
#ifdef TOUCH_UI_LULZBOT_BIO
PROGMEM Language_Str MSG_MOVE_TO_HOME = u8"Move to Home";
PROGMEM Language_Str MSG_RAISE_PLUNGER = u8"Raise Plunger";
PROGMEM Language_Str MSG_RELEASE_XY_AXIS = u8"Release X and Y Axis";
PROGMEM Language_Str MSG_AUTOLEVEL_X_AXIS = u8"Auto-level X Axis";
PROGMEM Language_Str MSG_BED_TEMPERATURE = u8"Bed Temperature";
PROGMEM Language_Str MSG_HOME_XYZ_WARNING = u8"About to move to home position. Ensure the top and the bed of the printer are clear.\n\nContinue?";
PROGMEM Language_Str MSG_HOME_E_WARNING = u8"About to re-home plunger and auto-level. Remove syringe prior to proceeding.\n\nContinue?";
@@ -131,14 +131,8 @@ namespace ExtUI {
}
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
void onPowerLossResume() {
// Called on resume from power-loss
}
#endif
#if HAS_PID_HEATING
void onPidTuning(const result_t rst) {
void OnPidTuning(const result_t rst) {
// Called for temperature PID tuning result
SERIAL_ECHOLNPAIR("OnPidTuning:", rst);
switch (rst) {
@@ -129,13 +129,12 @@
* 9 GND GND GND --> GND
* 10 5V 5V 5V --> KILL [3]
*
* [1] This configuration allows daisy-chaining of the
* display and SD/USB on EXP2, except for [2]
* [1] This configuration is not compatible with the
* EinsyRetro 1.1a because there is a level shifter
* on MISO enabled by SD/USB chip select.
*
* [2] The Ultimachine Einsy boards have a level shifter
* on MISO enabled by SD_CSEL chip select, hence it
* is not possible to run both the display and the
* SD/USB on EXP2.
* [2] This configuration allows daisy-chaining of the
* display and SD/USB on EXP2.
*
* [3] Archim Rambo provides 5V on this pin. On any other
* board, divert this wire from the ribbon cable and
@@ -149,8 +148,4 @@
#define CLCD_SPI_CS BTN_EN1
#define CLCD_MOD_RESET BTN_EN2
#if MB(EINSY_RAMBO, EINSY_RETRO) && DISABLED(SDSUPPORT)
#define CLCD_SPI_EXTRA_CS SDSS
#endif
#endif
@@ -27,7 +27,7 @@
#include "screens.h"
#define GRID_COLS 4
#define GRID_ROWS 7
#define GRID_ROWS 9
using namespace FTDI;
using namespace Theme;
@@ -45,32 +45,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
.cmd(COLOR_RGB(bg_text_enabled))
.tag(0);
#define HEADING_POS BTN_POS(1,2), BTN_SIZE(4,1)
#define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1)
#define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1)
#define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,2)
#define STATS_POS BTN_POS(1,7), BTN_SIZE(2,1)
#define BACK_POS BTN_POS(3,7), BTN_SIZE(2,1)
#define _INSET_POS(x,y,w,h) x + w/10, y, w - w/5, h
#define INSET_POS(pos) _INSET_POS(pos)
char about_str[
strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) +
strlen_P(TOOLHEAD_NAME) + 1
];
#ifdef TOOLHEAD_NAME
// If MSG_ABOUT_TOUCH_PANEL_2 has %s, substitute in the toolhead name.
// But this is optional, so squelch the compiler warning here.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-extra-args"
sprintf_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2), TOOLHEAD_NAME);
#pragma GCC diagnostic pop
#else
strcpy_P(about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2));
#endif
draw_text_box(cmd, HEADING_POS,
draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(4,1),
#ifdef CUSTOM_MACHINE_NAME
F(CUSTOM_MACHINE_NAME)
#else
@@ -78,29 +53,42 @@ void AboutScreen::onRedraw(draw_mode_t) {
#endif
, OPT_CENTER, font_xlarge
);
draw_text_box(cmd, FW_VERS_POS, progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
cmd.font(font_medium)
.colors(normal_btn)
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
#ifdef TOOLHEAD_NAME
char about_str[
strlen_P(GET_TEXT(FIRMWARE_FOR_TOOLHEAD)) +
strlen_P(TOOLHEAD_NAME) +
strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) + 1
];
sprintf_P(about_str, GET_TEXT(MSG_FIRMWARE_FOR_TOOLHEAD), TOOLHEAD_NAME);
strcat_P (about_str, GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2));
#endif
cmd.tag(2);
draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3),
#ifdef TOOLHEAD_NAME
about_str
#else
GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_2)
#endif
, OPT_CENTER, font_medium
);
cmd.tag(0);
draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_OKAY));
}
bool AboutScreen::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1: GOTO_PREVIOUS(); break;
#if ENABLED(PRINTCOUNTER)
case 2: GOTO_SCREEN(StatisticsScreen); break;
#endif
#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
case 3: GOTO_SCREEN(DeveloperMenu); break;
#endif
default: return false;
case 1: GOTO_PREVIOUS(); return true;
#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
case 2: GOTO_SCREEN(DeveloperMenu); return true;
#endif
default: return false;
}
return true;
}
#endif // TOUCH_UI_FTDI_EVE
@@ -37,116 +37,127 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.cmd(CLEAR(true,true,true));
}
#ifdef TOUCH_UI_PORTRAIT
#if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
#define GRID_ROWS 9
#else
#define GRID_ROWS 8
#endif
#define GRID_COLS 2
#define RESTORE_DEFAULTS_POS BTN_POS(1,1), BTN_SIZE(2,1)
#define DISPLAY_POS BTN_POS(1,2), BTN_SIZE(1,1)
#define INTERFACE_POS BTN_POS(2,2), BTN_SIZE(1,1)
#define ZPROBE_ZOFFSET_POS BTN_POS(1,3), BTN_SIZE(1,1)
#define STEPS_PER_MM_POS BTN_POS(2,3), BTN_SIZE(1,1)
#define FILAMENT_POS BTN_POS(1,4), BTN_SIZE(1,1)
#define VELOCITY_POS BTN_POS(2,4), BTN_SIZE(1,1)
#define TMC_CURRENT_POS BTN_POS(1,5), BTN_SIZE(1,1)
#define ACCELERATION_POS BTN_POS(2,5), BTN_SIZE(1,1)
#define ENDSTOPS_POS BTN_POS(1,6), BTN_SIZE(1,1)
#define JERK_POS BTN_POS(2,6), BTN_SIZE(1,1)
#define OFFSETS_POS BTN_POS(1,7), BTN_SIZE(1,1)
#define BACKLASH_POS BTN_POS(2,7), BTN_SIZE(1,1)
#define CASE_LIGHT_POS BTN_POS(1,8), BTN_SIZE(1,1)
#define TMC_HOMING_THRS_POS BTN_POS(2,8), BTN_SIZE(1,1)
#if HAS_CASE_LIGHT || ENABLED(SENSORLESS_HOMING)
#define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1)
#else
#define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1)
#endif
#else
#define GRID_ROWS 6
#define GRID_COLS 3
#define ZPROBE_ZOFFSET_POS BTN_POS(1,1), BTN_SIZE(1,1)
#define CASE_LIGHT_POS BTN_POS(1,4), BTN_SIZE(1,1)
#define STEPS_PER_MM_POS BTN_POS(2,1), BTN_SIZE(1,1)
#define TMC_CURRENT_POS BTN_POS(3,1), BTN_SIZE(1,1)
#define TMC_HOMING_THRS_POS BTN_POS(3,2), BTN_SIZE(1,1)
#define BACKLASH_POS BTN_POS(3,3), BTN_SIZE(1,1)
#define FILAMENT_POS BTN_POS(1,3), BTN_SIZE(1,1)
#define ENDSTOPS_POS BTN_POS(3,4), BTN_SIZE(1,1)
#define DISPLAY_POS BTN_POS(3,5), BTN_SIZE(1,1)
#define INTERFACE_POS BTN_POS(1,5), BTN_SIZE(2,1)
#define RESTORE_DEFAULTS_POS BTN_POS(1,6), BTN_SIZE(2,1)
#define VELOCITY_POS BTN_POS(2,2), BTN_SIZE(1,1)
#define ACCELERATION_POS BTN_POS(2,3), BTN_SIZE(1,1)
#define JERK_POS BTN_POS(2,4), BTN_SIZE(1,1)
#define OFFSETS_POS BTN_POS(1,2), BTN_SIZE(1,1)
#define BACK_POS BTN_POS(3,6), BTN_SIZE(1,1)
#endif
if (what & FOREGROUND) {
CommandProcessor cmd;
cmd.colors(normal_btn)
.font(Theme::font_medium)
#ifdef TOUCH_UI_PORTRAIT
#define GRID_ROWS 10
#define GRID_COLS 2
.enabled(
#if HAS_BED_PROBE
1
#endif
)
.tag(2) .button( ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
.enabled(
#if HAS_CASE_LIGHT
1
#endif
)
.tag(16).button( CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT))
.tag(3) .button( STEPS_PER_MM_POS, GET_TEXT_F(MSG_STEPS_PER_MM))
.tag(16).button( BTN_POS(1,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
.enabled(
#if HAS_TRINAMIC_CONFIG
1
#endif
)
.tag(13).button( TMC_CURRENT_POS, GET_TEXT_F(MSG_TMC_CURRENT))
.tag(13).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
.enabled(
#if ENABLED(SENSORLESS_HOMING)
#if HAS_TRINAMIC_CONFIG
1
#endif
)
.tag(14).button( TMC_HOMING_THRS_POS, GET_TEXT_F(MSG_TMC_HOMING_THRS))
.tag(14).button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_TMC_HOMING_THRS))
.enabled(
#if HOTENDS > 1
1
#endif
)
.tag(4) .button( OFFSETS_POS, GET_TEXT_F(MSG_OFFSETS_MENU))
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU))
.enabled(
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
1
#endif
)
.tag(11).button( FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT))
.tag(12).button( ENDSTOPS_POS, GET_TEXT_F(MSG_LCD_ENDSTOPS))
.tag(15).button( DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU))
.tag(9) .button( INTERFACE_POS, GET_TEXT_F(MSG_INTERFACE))
.tag(10).button( RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.tag(5) .button( VELOCITY_POS, GET_TEXT_F(MSG_VELOCITY))
.tag(6) .button( ACCELERATION_POS, GET_TEXT_F(MSG_ACCELERATION))
.tag(7) .button( JERK_POS, GET_TEXT_F(
#if DISABLED(CLASSIC_JERK)
MSG_JUNCTION_DEVIATION
#else
JERK_POS
#endif
))
.tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT))
.tag(12).button( BTN_POS(1,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
.tag(15).button( BTN_POS(2,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
.tag(9) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
.tag(10).button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION))
#if DISABLED(CLASSIC_JERK)
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JUNCTION_DEVIATION))
#else
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK))
#endif
.enabled(
#if ENABLED(BACKLASH_GCODE)
1
#endif
)
.tag(8).button( BACKLASH_POS, GET_TEXT_F(MSG_BACKLASH))
.tag(8).button( BTN_POS(2,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH))
.colors(action_btn)
.tag(1).button( BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1) .button( BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
#undef GRID_COLS
#undef GRID_ROWS
#else
#define GRID_ROWS 6
#define GRID_COLS 3
.enabled(
#if HAS_BED_PROBE
1
#endif
)
.tag(2) .button( BTN_POS(1,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_ZPROBE_ZOFFSET))
.enabled(
#if HAS_CASE_LIGHT
1
#endif
)
.tag(16).button( BTN_POS(1,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_CASE_LIGHT))
.enabled(1)
.tag(3) .button( BTN_POS(2,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_STEPS_PER_MM))
.enabled(
#if HAS_TRINAMIC_CONFIG
1
#endif
)
.tag(13).button( BTN_POS(3,1), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_CURRENT))
.enabled(
#if HAS_TRINAMIC_CONFIG
1
#endif
)
.tag(14).button( BTN_POS(3,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_TMC_HOMING_THRS))
.enabled(
#if ENABLED(BACKLASH_GCODE)
1
#endif
)
.tag(8).button( BTN_POS(3,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACKLASH))
.enabled(
#if HOTENDS > 1
1
#endif
)
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_OFFSETS_MENU))
.tag(12).button( BTN_POS(3,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_LCD_ENDSTOPS))
.tag(5) .button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_VELOCITY))
.tag(6) .button( BTN_POS(2,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_ACCELERATION))
#if DISABLED(CLASSIC_JERK)
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JUNCTION_DEVIATION))
#else
.tag(7) .button( BTN_POS(2,4), BTN_SIZE(1,1), GET_TEXT_F(MSG_JERK))
#endif
.tag(11).button( BTN_POS(1,3), BTN_SIZE(1,1), GET_TEXT_F(MSG_FILAMENT))
.tag(15).button( BTN_POS(3,5), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISPLAY_MENU))
.tag(9) .button( BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
.tag(10).button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1) .button( BTN_POS(3,6), BTN_SIZE(1,1), GET_TEXT_F(MSG_BACK));
#endif
}
}
@@ -180,8 +191,6 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
case 12: GOTO_SCREEN(EndstopStatesScreen); break;
#if HAS_TRINAMIC_CONFIG
case 13: GOTO_SCREEN(StepperCurrentScreen); break;
#endif
#if ENABLED(SENSORLESS_HOMING)
case 14: GOTO_SCREEN(StepperBumpSensitivityScreen); break;
#endif
case 15: GOTO_SCREEN(DisplayTuningScreen); break;
@@ -192,4 +201,5 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
}
return true;
}
#endif // TOUCH_UI_FTDI_EVE
@@ -345,14 +345,10 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) {
}
cmd.font(LAYOUT_FONT);
_button(cmd, tag+0, BTN_POS(5,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_X));
_button(cmd, tag+1, BTN_POS(7,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Y));
#if DISABLED(Z_SAFE_HOMING)
_button(cmd, tag+2, BTN_POS(9,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Z));
_button(cmd, tag+3, BTN_POS(11,_line), BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
#else
_button(cmd, tag+3, BTN_POS(9,_line), BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
#endif
_button(cmd, tag+0, BTN_POS(5,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_X));
_button(cmd, tag+1, BTN_POS(7,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Y));
_button(cmd, tag+2, BTN_POS(9,_line), BTN_SIZE(2,1), GET_TEXT_F(MSG_AXIS_Z));
_button(cmd, tag+3, BTN_POS(11,_line), BTN_SIZE(3,1), GET_TEXT_F(MSG_AXIS_ALL));
_line++;
}
@@ -46,7 +46,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
return false;
}
#if LCD_TIMEOUT_TO_STATUS
#ifdef LCD_TIMEOUT_TO_STATUS
if (EventLoop::get_pressed_tag() != 0) {
reset_menu_timeout();
}
@@ -66,7 +66,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
}
void BaseScreen::onIdle() {
#if LCD_TIMEOUT_TO_STATUS
#ifdef LCD_TIMEOUT_TO_STATUS
if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) {
reset_menu_timeout();
#if ENABLED(TOUCH_UI_DEBUG)
@@ -78,12 +78,12 @@ void BaseScreen::onIdle() {
}
void BaseScreen::reset_menu_timeout() {
#if LCD_TIMEOUT_TO_STATUS
#ifdef LCD_TIMEOUT_TO_STATUS
last_interaction = millis();
#endif
}
#if LCD_TIMEOUT_TO_STATUS
#ifdef LCD_TIMEOUT_TO_STATUS
uint32_t BaseScreen::last_interaction;
#endif
@@ -85,7 +85,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
#endif
)
.tag(12) .button( BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_LINEAR_ADVANCE))
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE))
.tag(13) .button( BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE_SETTINGS))
.tag(14) .button( BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
@@ -36,13 +36,11 @@ void BioConfirmHomeE::onRedraw(draw_mode_t) {
bool BioConfirmHomeE::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
#if defined(AXIS_LEVELING_COMMANDS) && defined(PARK_AND_RELEASE_COMMANDS)
SpinnerDialogBox::enqueueAndWait_P(F(
"G28 E\n"
AXIS_LEVELING_COMMANDS "\n"
PARK_AND_RELEASE_COMMANDS
));
#endif
SpinnerDialogBox::enqueueAndWait_P(F(
"G28 E\n"
AXIS_LEVELING_COMMANDS "\n"
PARK_AND_RELEASE_COMMANDS
));
current_screen.forget();
break;
case 2:
@@ -36,12 +36,10 @@ void BioConfirmHomeXYZ::onRedraw(draw_mode_t) {
bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) {
switch (tag) {
case 1:
#ifdef PARK_AND_RELEASE_COMMANDS
SpinnerDialogBox::enqueueAndWait_P(F(
"G28\n"
PARK_AND_RELEASE_COMMANDS
));
#endif
SpinnerDialogBox::enqueueAndWait_P(F(
"G28\n"
PARK_AND_RELEASE_COMMANDS
));
current_screen.forget();
break;
case 2:

Some files were not shown because too many files have changed in this diff Show More