mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-22 18:25:18 +00:00
Merge branch 'bugfix-2.1.x' into pr/26662
This commit is contained in:
commit
a1dd48a67b
14
.github/workflows/ci-build-tests.yml
vendored
14
.github/workflows/ci-build-tests.yml
vendored
@ -43,6 +43,7 @@ jobs:
|
||||
|
||||
# Native
|
||||
- linux_native
|
||||
- simulator_linux_release
|
||||
|
||||
# AVR
|
||||
- mega2560
|
||||
@ -105,9 +106,9 @@ jobs:
|
||||
|
||||
# STM32F4
|
||||
- ARMED
|
||||
- BIGTREE_BTT002
|
||||
- BIGTREE_GTR_V1_0
|
||||
- BIGTREE_SKR_PRO
|
||||
- BTT_BTT002
|
||||
- BTT_GTR_V1_0
|
||||
- BTT_SKR_PRO
|
||||
- FLYF407ZG
|
||||
- FYSETC_S6
|
||||
- LERDGEK
|
||||
@ -182,6 +183,13 @@ jobs:
|
||||
pio upgrade --dev
|
||||
pio pkg update --global
|
||||
|
||||
- name: Install Simulator dependencies
|
||||
run: |
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libsdl2-dev
|
||||
sudo apt-get install libsdl2-net-dev
|
||||
sudo apt-get install libglm-dev
|
||||
|
||||
- name: Run ${{ matrix.test-platform }} Tests
|
||||
run: |
|
||||
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}
|
||||
|
@ -50,7 +50,7 @@
|
||||
*
|
||||
* Calibration Guides: https://reprap.org/wiki/Calibration
|
||||
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
|
||||
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
|
||||
* https://youtu.be/wAL9d7FgInk
|
||||
* https://teachingtechyt.github.io/calibration.html
|
||||
*
|
||||
@ -1723,6 +1723,8 @@
|
||||
#define PROBING_BED_TEMP 50
|
||||
#endif
|
||||
|
||||
// @section stepper drivers
|
||||
|
||||
// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
|
||||
// :{ 0:'Low', 1:'High' }
|
||||
#define X_ENABLE_ON 0
|
||||
@ -1896,6 +1898,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section filament runout sensors
|
||||
*
|
||||
* Filament Runout Sensors
|
||||
* Mechanical or opto endstops are used to check for the presence of filament.
|
||||
*
|
||||
@ -2418,9 +2422,9 @@
|
||||
#define PREHEAT_2_TEMP_CHAMBER 35
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
// @section motion
|
||||
|
||||
/**
|
||||
* @section nozzle park
|
||||
*
|
||||
* Nozzle Park
|
||||
*
|
||||
* Park the nozzle at the given XYZ position on idle or G27.
|
||||
@ -2443,6 +2447,8 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @section nozzle clean
|
||||
*
|
||||
* Clean Nozzle Feature
|
||||
*
|
||||
* Adds the G12 command to perform a nozzle cleaning process.
|
||||
@ -2603,9 +2609,24 @@
|
||||
//#include "Configuration_Secure.h" // External file with PASSWORD_DEFAULT_VALUE
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
//============================= LCD and SD support ============================
|
||||
//=============================================================================
|
||||
// @section media
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* SD Card support is disabled by default. If your controller has an SD slot,
|
||||
* you must uncomment the following option or it won't work.
|
||||
*/
|
||||
//#define SDSUPPORT
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
#if ENABLED(SDSUPPORT)
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
#endif
|
||||
|
||||
// @section interface
|
||||
|
||||
@ -2652,21 +2673,6 @@
|
||||
*/
|
||||
#define LCD_INFO_SCREEN_STYLE 0
|
||||
|
||||
/**
|
||||
* SD CARD
|
||||
*
|
||||
* SD Card support is disabled by default. If your controller has an SD slot,
|
||||
* you must uncomment the following option or it won't work.
|
||||
*/
|
||||
//#define SDSUPPORT
|
||||
|
||||
/**
|
||||
* SD CARD: ENABLE CRC
|
||||
*
|
||||
* Use CRC checks and retries on the SD communication.
|
||||
*/
|
||||
//#define SD_CHECK_AND_RETRY
|
||||
|
||||
/**
|
||||
* LCD Menu Items
|
||||
*
|
||||
@ -2795,7 +2801,7 @@
|
||||
|
||||
//
|
||||
// Original RADDS LCD Display+Encoder+SDCardReader
|
||||
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/
|
||||
// https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
|
||||
//
|
||||
//#define RADDS_DISPLAY
|
||||
|
||||
@ -2861,7 +2867,7 @@
|
||||
|
||||
//
|
||||
// Elefu RA Board Control Panel
|
||||
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
|
||||
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
|
||||
//
|
||||
//#define RA_CONTROL_PANEL
|
||||
|
||||
@ -2993,7 +2999,7 @@
|
||||
|
||||
//
|
||||
// Cartesio UI
|
||||
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
|
||||
//
|
||||
//#define CARTESIO_UI
|
||||
|
||||
|
@ -3443,7 +3443,7 @@
|
||||
/**
|
||||
* Step on both rising and falling edge signals (as with a square wave).
|
||||
*/
|
||||
//#define EDGE_STEPPING
|
||||
#define EDGE_STEPPING
|
||||
|
||||
/**
|
||||
* Enable M122 debugging command for TMC stepper drivers.
|
||||
@ -3525,7 +3525,7 @@
|
||||
//#define PHOTOGRAPH_PIN 23
|
||||
|
||||
// Canon Hack Development Kit
|
||||
// https://web.archive.org/web/20200920094805/https://captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
// https://web.archive.org/web/20200920094805/captain-slow.dk/2014/03/09/3d-printing-timelapses/
|
||||
//#define CHDK_PIN 4
|
||||
|
||||
// Optional second move with delay to trigger the camera shutter
|
||||
|
@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-07-16"
|
||||
//#define STRING_DISTRIBUTION_DATE "2024-07-29"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
@ -26,7 +26,7 @@
|
||||
*
|
||||
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
|
||||
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
|
||||
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
|
||||
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
|
||||
*/
|
||||
|
||||
#include "../fastio.h"
|
||||
|
@ -114,22 +114,19 @@
|
||||
// Misc. Functions
|
||||
//
|
||||
#ifndef analogInputToDigitalPin
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#define analogInputToDigitalPin(p) pin_t(p)
|
||||
#endif
|
||||
|
||||
#define CRITICAL_SECTION_START \
|
||||
uint32_t primask = __get_PRIMASK(); \
|
||||
(void)__iCliRetVal()
|
||||
#define CRITICAL_SECTION_START() \
|
||||
const bool irqon = !__get_PRIMASK(); \
|
||||
__disable_irq(); \
|
||||
__DSB();
|
||||
#define CRITICAL_SECTION_END() \
|
||||
__DSB(); \
|
||||
if (irqon) __enable_irq();
|
||||
|
||||
#define CRITICAL_SECTION_END \
|
||||
if (!primask) \
|
||||
(void)__iSeiRetVal()
|
||||
|
||||
// Disable interrupts
|
||||
#define cli() noInterrupts()
|
||||
|
||||
// Enable interrupts
|
||||
#define sei() interrupts()
|
||||
#define cli() __disable_irq()
|
||||
#define sei() __enable_irq()
|
||||
|
||||
// bss_end alias
|
||||
#define __bss_end __bss_end__
|
||||
|
@ -81,4 +81,4 @@ void eeprom_write_byte(uint8_t *pos, uint8_t value) {
|
||||
}
|
||||
|
||||
#endif // USE_SHARED_EEPROM
|
||||
#endif // I2C_EEPROM
|
||||
#endif // SPI_EEPROM
|
||||
|
@ -162,8 +162,8 @@
|
||||
#define STR_SOFT_MIN " Min: "
|
||||
#define STR_SOFT_MAX " Max: "
|
||||
|
||||
#define STR_SAVED_POS "Position saved"
|
||||
#define STR_RESTORING_POS "Restoring position"
|
||||
#define STR_SAVED_POSITION "Saved position #"
|
||||
#define STR_RESTORING_POSITION "Restoring position #"
|
||||
#define STR_INVALID_POS_SLOT "Invalid slot. Total: "
|
||||
#define STR_DONE "Done."
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
|
||||
// Macros for bit masks
|
||||
#undef _BV
|
||||
#define _BV(n) (1<<(n))
|
||||
#define _BV(b) (1 << (b))
|
||||
#define TEST(n,b) (!!((n)&_BV(b)))
|
||||
#define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
|
||||
#ifndef SBI
|
||||
|
@ -159,36 +159,90 @@ template <class L, class R> struct IF<true, L, R> { typedef L type; };
|
||||
#define FI FORCE_INLINE
|
||||
|
||||
// Define types based on largest bit width stored value required
|
||||
#define bits_t(W) typename IF<((W)> 16), uint32_t, typename IF<((W)> 8), uint16_t, uint8_t>::type>::type
|
||||
#define bits_t(W) typename IF<((W)> 32), uint64_t, typename IF<((W)> 16), uint32_t, typename IF<((W)>8), uint16_t, uint8_t>::type>::type>::type
|
||||
#define uvalue_t(V) typename IF<((V)>65535), uint32_t, typename IF<((V)>255), uint16_t, uint8_t>::type>::type
|
||||
#define value_t(V) typename IF<((V)>32767), int32_t, typename IF<((V)>127), int16_t, int8_t>::type>::type
|
||||
|
||||
// General Flags for some number of states
|
||||
// Define a template for a bit field of N bits, using the smallest type that can hold N bits
|
||||
template<size_t N, bool UseArray = (N > 64)>
|
||||
struct Flags;
|
||||
|
||||
// Flag bits for <= 64 states
|
||||
template<size_t N>
|
||||
struct Flags {
|
||||
struct Flags<N, false> {
|
||||
typedef bits_t(N) flagbits_t;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1; } N8;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1; } N16;
|
||||
typedef struct { bool b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1, b8:1, b9:1, b10:1, b11:1, b12:1, b13:1, b14:1, b15:1,
|
||||
b16:1, b17:1, b18:1, b19:1, b20:1, b21:1, b22:1, b23:1, b24:1, b25:1, b26:1, b27:1, b28:1, b29:1, b30:1, b31:1; } N32;
|
||||
union {
|
||||
flagbits_t b;
|
||||
typename IF<(N>16), N32, typename IF<(N>8), N16, N8>::type>::type flag;
|
||||
flagbits_t b;
|
||||
|
||||
class BitProxy {
|
||||
public:
|
||||
BitProxy(flagbits_t& data, int bit) : data_(data), bit_(bit) {}
|
||||
|
||||
BitProxy& operator=(const bool value) {
|
||||
if (value)
|
||||
data_ |= (flagbits_t(1) << bit_);
|
||||
else
|
||||
data_ &= ~(flagbits_t(1) << bit_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator bool() const { return bool(data_ & (flagbits_t(1) << bit_)); }
|
||||
|
||||
private:
|
||||
flagbits_t& data_;
|
||||
uint8_t bit_;
|
||||
};
|
||||
|
||||
FI void reset() { b = 0; }
|
||||
FI void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
|
||||
FI void set(const int n) { b |= (flagbits_t)_BV(n); }
|
||||
FI void clear(const int n) { b &= ~(flagbits_t)_BV(n); }
|
||||
FI bool test(const int n) const { return TEST(b, n); }
|
||||
FI bool operator[](const int n) { return test(n); }
|
||||
FI void set(const int n) { b |= (flagbits_t(1) << n); }
|
||||
FI void clear(const int n) { b &= ~(flagbits_t(1) << n); }
|
||||
FI bool test(const int n) const { return bool(b & (flagbits_t(1) << n)); }
|
||||
FI BitProxy operator[](const int n) { return BitProxy(b, n); }
|
||||
FI bool operator[](const int n) const { return test(n); }
|
||||
FI int size() const { return sizeof(b); }
|
||||
FI operator bool() const { return b; }
|
||||
FI operator bool() const { return b != 0; }
|
||||
};
|
||||
|
||||
// Flag bits for more than 64 states
|
||||
template<size_t N>
|
||||
struct Flags<N, true> {
|
||||
uint8_t bitmask[(N+7)>>3];
|
||||
// Proxy class for handling bit assignment
|
||||
class BitProxy {
|
||||
public:
|
||||
BitProxy(uint8_t data[], int n) : data_(data[n >> 3]), bit_(n & 7) {}
|
||||
|
||||
// Assignment operator
|
||||
BitProxy& operator=(const bool value) {
|
||||
if (value)
|
||||
data_ |= _BV(bit_);
|
||||
else
|
||||
data_ &= ~_BV(bit_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Conversion operator to bool
|
||||
operator bool() const { return TEST(data_, bit_); }
|
||||
|
||||
private:
|
||||
uint8_t& data_;
|
||||
uint8_t bit_;
|
||||
};
|
||||
|
||||
FI void reset() { for (uint8_t b = 0; b < sizeof(bitmask); ++b) bitmask[b] = 0; }
|
||||
FI void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
|
||||
FI void set(const int n) { bitmask[n >> 3] |= _BV(n & 7); }
|
||||
FI void clear(const int n) { bitmask[n >> 3] &= ~_BV(n & 7); }
|
||||
FI bool test(const int n) const { return TEST(bitmask[n >> 3], n & 7); }
|
||||
FI BitProxy operator[](const int n) { return BitProxy(bitmask, n); }
|
||||
FI bool operator[](const int n) const { return test(n); }
|
||||
FI int size() const { return sizeof(bitmask); }
|
||||
FI operator bool() const { for (uint8_t b : bitmask) if (b) return true; return false; }
|
||||
};
|
||||
|
||||
// Specialization for a single bool flag
|
||||
template<>
|
||||
struct Flags<1> {
|
||||
struct Flags<1, false> {
|
||||
bool b;
|
||||
FI void reset() { b = false; }
|
||||
FI void set(const int n, const bool onoff) { onoff ? set(n) : clear(n); }
|
||||
@ -218,7 +272,7 @@ typedef struct {
|
||||
FI bool operator[](const int n) { return flags[n]; }
|
||||
FI bool operator[](const int n) const { return flags[n]; }
|
||||
FI int size() const { return sizeof(flags); }
|
||||
FI operator bool() const { return flags; }
|
||||
FI operator bool() const { return (bool)flags; }
|
||||
} AxisFlags;
|
||||
|
||||
//
|
||||
|
@ -146,9 +146,9 @@ public:
|
||||
transfer_timeout = millis() + TIMEOUT;
|
||||
switch (static_cast<FileTransfer>(packet_type)) {
|
||||
case FileTransfer::QUERY:
|
||||
SERIAL_ECHOPGM("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
SERIAL_ECHO(F("PFT:version:"), VERSION_MAJOR, C('.'), VERSION_MINOR, C('.'), VERSION_PATCH);
|
||||
#if ENABLED(BINARY_STREAM_COMPRESSION)
|
||||
SERIAL_ECHOLNPGM(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS);
|
||||
SERIAL_ECHOLN(F(":compression:heatshrink,"), HEATSHRINK_STATIC_WINDOW_BITS, C(','), HEATSHRINK_STATIC_LOOKAHEAD_BITS);
|
||||
#else
|
||||
SERIAL_ECHOLNPGM(":compression:none");
|
||||
#endif
|
||||
@ -322,7 +322,7 @@ public:
|
||||
if (packet.header.checksum == packet.header_checksum) {
|
||||
// The SYNC control packet is a special case in that it doesn't require the stream sync to be correct
|
||||
if (static_cast<Protocol>(packet.header.protocol()) == Protocol::CONTROL && static_cast<ProtocolControl>(packet.header.type()) == ProtocolControl::SYNC) {
|
||||
SERIAL_ECHOLNPGM("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH);
|
||||
SERIAL_ECHOLN(F("ss"), sync, C(','), buffer_size, C(','), VERSION_MAJOR, C('.'), VERSION_MINOR, C('.'), VERSION_PATCH);
|
||||
stream_state = StreamState::PACKET_RESET;
|
||||
break;
|
||||
}
|
||||
|
@ -58,10 +58,10 @@
|
||||
*
|
||||
* L # Layer Layer height. (Height of nozzle above bed) If not specified .20mm will be used.
|
||||
*
|
||||
* O # Ooooze How much your nozzle will Ooooze filament while getting in position to print. This
|
||||
* is over kill, but using this parameter will let you get the very first 'circle' perfect
|
||||
* so you have a trophy to peel off of the bed and hang up to show how perfectly you have your
|
||||
* Mesh calibrated. If not specified, a filament length of .3mm is assumed.
|
||||
* O # Ooze How much your nozzle will Ooooze filament while getting in position to print. If not
|
||||
* specified, a filament length of .3mm is assumed. This might be overkill, but this
|
||||
* parameter ensures the very first 'circle' is perfect (providing an ideal trophy to hang
|
||||
* up to show off your perfectly calibrated Mesh).
|
||||
*
|
||||
* P # Prime Prime the nozzle with specified length of filament. If this parameter is not
|
||||
* given, no prime action will take place. If the parameter specifies an amount, that much
|
||||
|
@ -37,7 +37,7 @@
|
||||
* F<feedrate> : Feedrate in mm/min
|
||||
* I<index> : X axis point index
|
||||
* J<index> : Y axis point index
|
||||
* P<bool> : Flag to put the prove at the given point
|
||||
* P : Flag to put the probe at the given point
|
||||
*/
|
||||
void GcodeSuite::G42() {
|
||||
if (MOTION_CONDITIONS) {
|
||||
@ -58,7 +58,7 @@ void GcodeSuite::G42() {
|
||||
if (hasJ) destination.y = bedlevel.get_mesh_y(iy);
|
||||
|
||||
#if HAS_PROBE_XY_OFFSET
|
||||
if (parser.boolval('P')) {
|
||||
if (parser.seen_test('P')) {
|
||||
if (hasI) destination.x -= probe.offset_xy.x;
|
||||
if (hasJ) destination.y -= probe.offset_xy.y;
|
||||
}
|
||||
|
@ -30,41 +30,78 @@
|
||||
#define DEBUG_OUT ENABLED(SAVED_POSITIONS_DEBUG)
|
||||
#include "../../../core/debug_out.h"
|
||||
|
||||
bool report_stored_position(const uint8_t slot) {
|
||||
if (!did_save_position[slot]) return false;
|
||||
const xyze_pos_t &pos = stored_position[slot];
|
||||
SERIAL_ECHO(STR_SAVED_POSITION, slot, C(':'));
|
||||
#if NUM_AXES
|
||||
SERIAL_ECHOPGM_P(
|
||||
LIST_N(DOUBLE(NUM_AXES),
|
||||
SP_X_LBL, pos.x, SP_Y_LBL, pos.y, SP_Z_LBL, pos.z,
|
||||
SP_I_LBL, pos.i, SP_J_LBL, pos.j, SP_K_LBL, pos.k,
|
||||
SP_U_LBL, pos.u, SP_V_LBL, pos.v, SP_W_LBL, pos.w
|
||||
)
|
||||
);
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
SERIAL_ECHOPGM_P(SP_E_LBL, pos.e);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* G60: Save current position
|
||||
* G60: Saved Positions
|
||||
*
|
||||
* S<slot> - Memory slot # (0-based) to save into (default 0)
|
||||
* S<slot> - Save to a memory slot. (default 0)
|
||||
* Q<slot> - Restore from a memory slot. (default 0)
|
||||
* D<slot> - Delete a memory slot. With no number, delete all.
|
||||
*/
|
||||
void GcodeSuite::G60() {
|
||||
const uint8_t slot = parser.byteval('S');
|
||||
// With no parameters report any saved positions
|
||||
if (!parser.seen_any()) {
|
||||
uint8_t count = 0;
|
||||
for (uint8_t s = 0; s < SAVED_POSITIONS; ++s)
|
||||
if (report_stored_position(s)) ++count;
|
||||
if (!count) SERIAL_ECHOLNPGM("No Saved Positions");
|
||||
return;
|
||||
}
|
||||
|
||||
if (slot >= SAVED_POSITIONS) {
|
||||
// Only one of these parameters is permitted
|
||||
const uint8_t seenD = parser.seen_test('D'),
|
||||
seenQ = parser.seen_test('Q'),
|
||||
seenS = parser.seen_test('S');
|
||||
if (seenD + seenQ + seenS > 1) return;
|
||||
|
||||
// G60 D : Delete all saved positions
|
||||
if (seenD && !parser.seenval('D')) {
|
||||
did_save_position.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
// G60 Dn / Q / S : Get the slot value
|
||||
const uint8_t slot = parser.byteval(seenD ? 'D' : seenQ ? 'Q' : 'S');
|
||||
|
||||
// G60 Q : Redirect to G61(slot)
|
||||
if (seenQ) return G61(slot);
|
||||
|
||||
// Valid slot number?
|
||||
if (SAVED_POSITIONS < 256 && slot >= SAVED_POSITIONS) {
|
||||
SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
|
||||
return;
|
||||
}
|
||||
|
||||
stored_position[slot] = current_position;
|
||||
SBI(saved_slots[slot >> 3], slot & 0x07);
|
||||
|
||||
#if ENABLED(SAVED_POSITIONS_DEBUG)
|
||||
{
|
||||
const xyze_pos_t &pos = stored_position[slot];
|
||||
DEBUG_ECHOPGM(STR_SAVED_POS " S", slot, " :");
|
||||
#if NUM_AXES
|
||||
DEBUG_ECHOPGM_P(
|
||||
LIST_N(DOUBLE(NUM_AXES),
|
||||
SP_X_LBL, pos.x, SP_Y_LBL, pos.y, SP_Z_LBL, pos.z,
|
||||
SP_I_LBL, pos.i, SP_J_LBL, pos.j, SP_K_LBL, pos.k,
|
||||
SP_U_LBL, pos.u, SP_V_LBL, pos.v, SP_W_LBL, pos.w
|
||||
)
|
||||
);
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
DEBUG_ECHOPGM_P(SP_E_LBL, pos.e);
|
||||
#endif
|
||||
DEBUG_EOL();
|
||||
// G60 Dn
|
||||
if (seenD) {
|
||||
SERIAL_ECHOLNPGM(STR_SAVED_POSITION, slot, ": DELETED");
|
||||
did_save_position.clear(slot);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// G60 S
|
||||
stored_position[slot] = current_position;
|
||||
did_save_position.set(slot);
|
||||
report_stored_position(slot);
|
||||
}
|
||||
|
||||
#endif // SAVED_POSITIONS
|
||||
|
@ -54,52 +54,64 @@
|
||||
*
|
||||
* If no axes are specified then all axes are restored.
|
||||
*/
|
||||
void GcodeSuite::G61() {
|
||||
void GcodeSuite::G61(int8_t slot/*=-1*/) {
|
||||
|
||||
const uint8_t slot = parser.byteval('S');
|
||||
if (slot < 0) slot = parser.byteval('S');
|
||||
|
||||
#define SYNC_E(POINT) TERN_(HAS_EXTRUDERS, planner.set_e_position_mm((destination.e = current_position.e = (POINT))))
|
||||
#define SYNC_E(E) planner.set_e_position_mm(current_position.e = (E))
|
||||
|
||||
#if SAVED_POSITIONS < 256
|
||||
if (slot >= SAVED_POSITIONS) {
|
||||
SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (SAVED_POSITIONS < 256 && slot >= SAVED_POSITIONS) {
|
||||
SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS));
|
||||
return;
|
||||
}
|
||||
|
||||
// No saved position? No axes being restored?
|
||||
if (!TEST(saved_slots[slot >> 3], slot & 0x07)) return;
|
||||
if (!did_save_position[slot]) return;
|
||||
|
||||
// Apply any given feedrate over 0.0
|
||||
REMEMBER(saved, feedrate_mm_s);
|
||||
const float fr = parser.linearval('F');
|
||||
if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr);
|
||||
|
||||
// No XYZ...E parameters, move to stored position
|
||||
|
||||
float epos = stored_position[slot].e;
|
||||
if (!parser.seen_axis()) {
|
||||
DEBUG_ECHOLNPGM("Default position restore");
|
||||
DEBUG_ECHOLNPGM(STR_RESTORING_POSITION, slot, " (all axes)");
|
||||
// Move to the saved position, all axes except E
|
||||
do_blocking_move_to(stored_position[slot], feedrate_mm_s);
|
||||
SYNC_E(stored_position[slot].e);
|
||||
// Just set E to the saved position without moving it
|
||||
TERN_(HAS_EXTRUDERS, SYNC_E(stored_position[slot].e));
|
||||
report_current_position();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (parser.seen(STR_AXES_MAIN)) {
|
||||
DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot);
|
||||
LOOP_NUM_AXES(i) {
|
||||
destination[i] = parser.seen(AXIS_CHAR(i))
|
||||
? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i)
|
||||
: current_position[i];
|
||||
|
||||
// With XYZ...E return specified axes + optional offset
|
||||
|
||||
DEBUG_ECHOPGM(STR_RESTORING_POSITION " S", slot);
|
||||
|
||||
if (parser.seen(STR_AXES_MAIN)) {
|
||||
destination = current_position;
|
||||
LOOP_NUM_AXES(i) {
|
||||
if (parser.seen(AXIS_CHAR(i))) {
|
||||
destination[i] = stored_position[slot][i] + parser.value_axis_units((AxisEnum)i);
|
||||
DEBUG_ECHO(C(' '), C(AXIS_CHAR(i)), p_float_t(destination[i], 2));
|
||||
}
|
||||
DEBUG_EOL();
|
||||
// Move to the saved position
|
||||
prepare_line_to_destination();
|
||||
}
|
||||
#if HAS_EXTRUDERS
|
||||
if (parser.seen_test('E')) {
|
||||
DEBUG_ECHOLNPGM(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e);
|
||||
SYNC_E(stored_position[slot].e);
|
||||
}
|
||||
#endif
|
||||
prepare_line_to_destination();
|
||||
}
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
if (parser.seen('E')) {
|
||||
epos += parser.value_axis_units(E_AXIS);
|
||||
DEBUG_ECHOPGM(" E", epos);
|
||||
SYNC_E(epos);
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_EOL();
|
||||
|
||||
report_current_position();
|
||||
}
|
||||
|
||||
#endif // SAVED_POSITIONS
|
||||
|
@ -606,7 +606,7 @@ private:
|
||||
|
||||
#if SAVED_POSITIONS
|
||||
static void G60();
|
||||
static void G61();
|
||||
static void G61(int8_t slot=-1);
|
||||
#endif
|
||||
|
||||
#if ENABLED(GCODE_MOTION_MODES)
|
||||
|
@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2024-07-16"
|
||||
#define STRING_DISTRIBUTION_DATE "2024-07-29"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -694,6 +694,10 @@
|
||||
#error "Z_SAFE_HOMING is recommended when homing with a probe. (Enable Z_SAFE_HOMING or define NO_Z_SAFE_HOMING_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC_CONFIG && NONE(EDGE_STEPPING, NO_EDGE_STEPPING_WARNING)
|
||||
#error "EDGE_STEPPING is strongly recommended with Trinamic stepper drivers. (Enable EDGE_STEPPING or define NO_EDGE_STEPPING_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BIQU_MICROPROBE_V2) && NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, NO_MICROPROBE_WARNING)
|
||||
#warning "BIQU MicroProbe V2 detect signal requires a strong pull-up. Some processors have weak internal pull-up capabilities, so we recommended connecting MicroProbe SIGNAL / GND to Z-MIN / Z-STOP instead of the dedicated PROBE port. (Define NO_MICROPROBE_WARNING to suppress this warning.)"
|
||||
#endif
|
||||
|
@ -794,15 +794,7 @@ namespace LanguageNarrow_it {
|
||||
LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Appianamento");
|
||||
|
||||
LSTR MSG_FIXED_TIME_MOTION = _UxGT("Movimento a Tempo-Fisso");
|
||||
LSTR MSG_FTM_MODE = _UxGT("Modo Movimento:");
|
||||
//LSTR MSG_FTM_ZV = _UxGT("ZV");
|
||||
//LSTR MSG_FTM_ZVD = _UxGT("ZVD");
|
||||
//LSTR MSG_FTM_ZVDD = _UxGT("ZVDD");
|
||||
//LSTR MSG_FTM_ZVDDD = _UxGT("ZVDDD");
|
||||
//LSTR MSG_FTM_EI = _UxGT("EI");
|
||||
//LSTR MSG_FTM_2HEI = _UxGT("2HEI");
|
||||
//LSTR MSG_FTM_3HEI = _UxGT("3HEI");
|
||||
//LSTR MSG_FTM_MZV = _UxGT("MZV");
|
||||
LSTR MSG_FTM_CMPN_MODE = _UxGT("@ Modo Comp:");
|
||||
LSTR MSG_FTM_DYN_MODE = _UxGT("Modo DF:");
|
||||
LSTR MSG_FTM_Z_BASED = _UxGT("Base-Z");
|
||||
LSTR MSG_FTM_MASS_BASED = _UxGT("Base-Massa");
|
||||
|
@ -805,8 +805,8 @@ namespace LanguageNarrow_ru {
|
||||
LSTR MSG_HOST_SHUTDOWN = _UxGT("Выключить хост");
|
||||
|
||||
// did not translate as there is no local terms/slang yet
|
||||
LSTR MSG_FIXED_TIME_MOTION = _UxGT("Fixed-Time Motion");
|
||||
LSTR MSG_FTM_MODE = _UxGT("Motion Mode:");
|
||||
LSTR MSG_FIXED_TIME_MOTION = _UxGT("FT Motion");
|
||||
LSTR MSG_FTM_CMPN_MODE = _UxGT("@ Режим комп.:");
|
||||
LSTR MSG_FTM_ZV = _UxGT("ZV");
|
||||
LSTR MSG_FTM_ZVD = _UxGT("ZVD");
|
||||
LSTR MSG_FTM_EI = _UxGT("EI");
|
||||
|
@ -792,7 +792,7 @@ namespace LanguageNarrow_tr {
|
||||
LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Yumuşatma");
|
||||
|
||||
LSTR MSG_FIXED_TIME_MOTION = _UxGT("Sabit Zamanlı Hareket");
|
||||
LSTR MSG_FTM_MODE = _UxGT("Hareket Modu:");
|
||||
LSTR MSG_FTM_CMPN_MODE = _UxGT("@ Telafi Modu:");
|
||||
LSTR MSG_FTM_ZV = _UxGT("ZV");
|
||||
LSTR MSG_FTM_ZVD = _UxGT("ZVD");
|
||||
LSTR MSG_FTM_ZVDD = _UxGT("ZVDD");
|
||||
|
@ -95,96 +95,114 @@
|
||||
//
|
||||
// About Printer > Thermistors
|
||||
//
|
||||
void menu_info_thermistors() {
|
||||
if (ui.use_click()) return ui.go_back();
|
||||
#if HAS_TEMP_SENSOR
|
||||
void menu_info_thermistors() {
|
||||
if (ui.use_click()) return ui.go_back();
|
||||
|
||||
START_SCREEN();
|
||||
START_SCREEN();
|
||||
|
||||
#define THERM_ITEMS(LBL,HTR,WAT) \
|
||||
STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT); \
|
||||
PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \
|
||||
PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \
|
||||
STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \
|
||||
#define THERM_ITEM_NAME(LBL) \
|
||||
STATIC_ITEM_F(F(LBL ": " THERMISTOR_NAME), SS_INVERT);
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
#define THERMISTOR_ID TEMP_SENSOR_0
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS);
|
||||
#endif
|
||||
#define THERM_ITEMS(LBL,HTR,WAT) \
|
||||
THERM_ITEM_NAME(LBL) \
|
||||
PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HTR##_MINTEMP), SS_FULL); \
|
||||
PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HTR##_MAXTEMP), SS_FULL); \
|
||||
STATIC_ITEM(TERN(WAT, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_FULL) \
|
||||
|
||||
#if TEMP_SENSOR_1 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_1
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_0 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_0
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E0, HEATER_0, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_2 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_2
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_1 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_1
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E1, HEATER_1, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_3 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_3
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_2 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_2
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E2, HEATER_2, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_4 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_4
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_3 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_3
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E3, HEATER_3, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_5 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_5
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_4 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_4
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E4, HEATER_4, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_6 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_6
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_5 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_5
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E5, HEATER_5, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_7 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_7
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS);
|
||||
#endif
|
||||
#if TEMP_SENSOR_6 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_6
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E6, HEATER_6, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
#define THERMISTOR_ID TEMP_SENSOR_BED
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS("BED", BED, WATCH_BED);
|
||||
#endif
|
||||
#if TEMP_SENSOR_7 != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_7
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS(STR_E7, HEATER_7, WATCH_HOTENDS);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_CHAMBER
|
||||
#define THERMISTOR_ID TEMP_SENSOR_CHAMBER
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
#define THERMISTOR_ID TEMP_SENSOR_BED
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS("BED", BED, WATCH_BED);
|
||||
#endif
|
||||
|
||||
#if HAS_COOLER
|
||||
#define THERMISTOR_ID TEMP_SENSOR_COOLER
|
||||
#include "../thermistornames.h"
|
||||
#undef THERMISTOR_ID
|
||||
THERM_ITEMS("COOL", COOLER, WATCH_COOLER);
|
||||
#endif
|
||||
#if HAS_HEATED_CHAMBER
|
||||
#define THERMISTOR_ID TEMP_SENSOR_CHAMBER
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS("CHAM", CHAMBER, WATCH_CHAMBER);
|
||||
#endif
|
||||
|
||||
END_SCREEN();
|
||||
}
|
||||
#if HAS_COOLER
|
||||
#define THERMISTOR_ID TEMP_SENSOR_COOLER
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEMS("COOL", COOLER, WATCH_COOLER);
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_PROBE != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_PROBE
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEM_NAME("PROBE");
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_BOARD != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_BOARD
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEM_NAME("BOARD");
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_SOC != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_SOC
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEM_NAME("SOC");
|
||||
#endif
|
||||
|
||||
#if TEMP_SENSOR_REDUNDANT != 0
|
||||
#define THERMISTOR_ID TEMP_SENSOR_REDUNDANT
|
||||
#include "../thermistornames.h"
|
||||
THERM_ITEM_NAME("REDUNDANT");
|
||||
#endif
|
||||
|
||||
END_SCREEN();
|
||||
}
|
||||
#endif // HAS_TEMP_SENSOR
|
||||
|
||||
//
|
||||
// About Printer > Board Info
|
||||
@ -256,7 +274,7 @@ void menu_info() {
|
||||
#else
|
||||
SUBMENU(MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info >
|
||||
SUBMENU(MSG_INFO_BOARD_MENU, menu_info_board); // Board Info >
|
||||
#if HAS_EXTRUDERS
|
||||
#if HAS_TEMP_SENSOR
|
||||
SUBMENU(MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors >
|
||||
#endif
|
||||
#endif
|
||||
|
@ -325,6 +325,32 @@ void menu_move() {
|
||||
#include "../../module/ft_motion.h"
|
||||
#include "../../gcode/gcode.h"
|
||||
|
||||
FSTR_P get_shaper_name(const AxisEnum axis=X_AXIS) {
|
||||
switch (ftMotion.cfg.shaper[axis]) {
|
||||
default: return nullptr;
|
||||
case ftMotionShaper_NONE: return GET_TEXT_F(MSG_LCD_OFF);
|
||||
case ftMotionShaper_ZV: return GET_TEXT_F(MSG_FTM_ZV);
|
||||
case ftMotionShaper_ZVD: return GET_TEXT_F(MSG_FTM_ZVD);
|
||||
case ftMotionShaper_ZVDD: return GET_TEXT_F(MSG_FTM_ZVDD);
|
||||
case ftMotionShaper_ZVDDD: return GET_TEXT_F(MSG_FTM_ZVDDD);
|
||||
case ftMotionShaper_EI: return GET_TEXT_F(MSG_FTM_EI);
|
||||
case ftMotionShaper_2HEI: return GET_TEXT_F(MSG_FTM_2HEI);
|
||||
case ftMotionShaper_3HEI: return GET_TEXT_F(MSG_FTM_3HEI);
|
||||
case ftMotionShaper_MZV: return GET_TEXT_F(MSG_FTM_MZV);
|
||||
}
|
||||
}
|
||||
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
FSTR_P get_dyn_freq_mode_name() {
|
||||
switch (ftMotion.cfg.dynFreqMode) {
|
||||
default:
|
||||
case dynFreqMode_DISABLED: return GET_TEXT_F(MSG_LCD_OFF);
|
||||
case dynFreqMode_Z_BASED: return GET_TEXT_F(MSG_FTM_Z_BASED);
|
||||
case dynFreqMode_MASS_BASED: return GET_TEXT_F(MSG_FTM_MASS_BASED);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void ftm_menu_set_cmpn(const AxisEnum axis, const ftMotionShaper_t s) {
|
||||
ftMotion.cfg.shaper[axis] = s;
|
||||
ftMotion.update_shaping_params();
|
||||
@ -389,35 +415,17 @@ void menu_move() {
|
||||
#endif // HAS_DYNAMIC_FREQ
|
||||
|
||||
void menu_ft_motion() {
|
||||
ft_config_t &c = ftMotion.cfg;
|
||||
|
||||
FSTR_P ftshaper[1 + ENABLED(HAS_Y_AXIS)] {};
|
||||
|
||||
// Define stuff ahead of the menu loop
|
||||
MString<20> shaper_name[1 + ENABLED(HAS_Y_AXIS)] {};
|
||||
#if HAS_X_AXIS
|
||||
for (uint_fast8_t a = X_AXIS; a <= TERN(HAS_Y_AXIS, Y_AXIS, X_AXIS); ++a) {
|
||||
switch (c.shaper[a]) {
|
||||
case ftMotionShaper_NONE: ftshaper[a] = GET_TEXT_F(MSG_LCD_OFF); break;
|
||||
case ftMotionShaper_ZV: ftshaper[a] = GET_TEXT_F(MSG_FTM_ZV); break;
|
||||
case ftMotionShaper_ZVD: ftshaper[a] = GET_TEXT_F(MSG_FTM_ZVD); break;
|
||||
case ftMotionShaper_ZVDD: ftshaper[a] = GET_TEXT_F(MSG_FTM_ZVDD); break;
|
||||
case ftMotionShaper_ZVDDD: ftshaper[a] = GET_TEXT_F(MSG_FTM_ZVDDD);break;
|
||||
case ftMotionShaper_EI: ftshaper[a] = GET_TEXT_F(MSG_FTM_EI); break;
|
||||
case ftMotionShaper_2HEI: ftshaper[a] = GET_TEXT_F(MSG_FTM_2HEI); break;
|
||||
case ftMotionShaper_3HEI: ftshaper[a] = GET_TEXT_F(MSG_FTM_3HEI); break;
|
||||
case ftMotionShaper_MZV: ftshaper[a] = GET_TEXT_F(MSG_FTM_MZV); break;
|
||||
}
|
||||
}
|
||||
for (uint_fast8_t a = X_AXIS; a <= TERN(HAS_Y_AXIS, Y_AXIS, X_AXIS); ++a)
|
||||
shaper_name[a] = get_shaper_name(AxisEnum(a));
|
||||
#endif
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
MString<20> dmode = get_dyn_freq_mode_name();
|
||||
#endif
|
||||
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
FSTR_P dmode;
|
||||
switch (c.dynFreqMode) {
|
||||
default:
|
||||
case dynFreqMode_DISABLED: dmode = GET_TEXT_F(MSG_LCD_OFF); break;
|
||||
case dynFreqMode_Z_BASED: dmode = GET_TEXT_F(MSG_FTM_Z_BASED); break;
|
||||
case dynFreqMode_MASS_BASED: dmode = GET_TEXT_F(MSG_FTM_MASS_BASED); break;
|
||||
}
|
||||
#endif
|
||||
ft_config_t &c = ftMotion.cfg;
|
||||
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_MOTION);
|
||||
@ -431,7 +439,7 @@ void menu_move() {
|
||||
if (c.active) {
|
||||
#if HAS_X_AXIS
|
||||
SUBMENU_N(X_AXIS, MSG_FTM_CMPN_MODE, menu_ftm_cmpn_x);
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(ftshaper[X_AXIS]); MENU_ITEM_ADDON_END();
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(shaper_name[X_AXIS]); MENU_ITEM_ADDON_END();
|
||||
|
||||
if (CMPNSTR_HAS_SHAPER(X_AXIS)) {
|
||||
EDIT_ITEM_FAST_N(float42_52, X_AXIS, MSG_FTM_BASE_FREQ_N, &c.baseFreq[X_AXIS], FTM_MIN_SHAPE_FREQ, (FTM_FS) / 2, ftMotion.update_shaping_params);
|
||||
@ -442,7 +450,7 @@ void menu_move() {
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
SUBMENU_N(Y_AXIS, MSG_FTM_CMPN_MODE, menu_ftm_cmpn_y);
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(ftshaper[Y_AXIS]); MENU_ITEM_ADDON_END();
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(shaper_name[Y_AXIS]); MENU_ITEM_ADDON_END();
|
||||
|
||||
if (CMPNSTR_HAS_SHAPER(Y_AXIS)) {
|
||||
EDIT_ITEM_FAST_N(float42_52, Y_AXIS, MSG_FTM_BASE_FREQ_N, &c.baseFreq[Y_AXIS], FTM_MIN_SHAPE_FREQ, (FTM_FS) / 2, ftMotion.update_shaping_params);
|
||||
@ -473,14 +481,46 @@ void menu_move() {
|
||||
END_MENU();
|
||||
}
|
||||
|
||||
void menu_tune_ft_motion() {
|
||||
// Define stuff ahead of the menu loop
|
||||
MString<20> shaper_name[1 + ENABLED(HAS_Y_AXIS)] {};
|
||||
#if HAS_X_AXIS
|
||||
for (uint_fast8_t a = X_AXIS; a <= TERN(HAS_Y_AXIS, Y_AXIS, X_AXIS); ++a)
|
||||
shaper_name[a] = get_shaper_name(AxisEnum(a));
|
||||
#endif
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
MString<20> dmode = get_dyn_freq_mode_name();
|
||||
#endif
|
||||
|
||||
ft_config_t &c = ftMotion.cfg;
|
||||
|
||||
START_MENU();
|
||||
|
||||
#if HAS_X_AXIS
|
||||
SUBMENU_N(X_AXIS, MSG_FTM_CMPN_MODE, menu_ftm_cmpn_x);
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(shaper_name[X_AXIS]); MENU_ITEM_ADDON_END();
|
||||
#endif
|
||||
#if HAS_Y_AXIS
|
||||
SUBMENU_N(Y_AXIS, MSG_FTM_CMPN_MODE, menu_ftm_cmpn_y);
|
||||
MENU_ITEM_ADDON_START_RJ(5); lcd_put_u8str(shaper_name[Y_AXIS]); MENU_ITEM_ADDON_END();
|
||||
#endif
|
||||
|
||||
#if HAS_DYNAMIC_FREQ
|
||||
SUBMENU(MSG_FTM_DYN_MODE, menu_ftm_dyn_mode);
|
||||
MENU_ITEM_ADDON_START_RJ(dmode.length()); lcd_put_u8str(dmode); MENU_ITEM_ADDON_END();
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
EDIT_ITEM(bool, MSG_LINEAR_ADVANCE, &ftMotion.cfg.linearAdvEna);
|
||||
#endif
|
||||
|
||||
END_MENU();
|
||||
|
||||
}
|
||||
|
||||
#endif // FT_MOTION_MENU
|
||||
|
||||
void menu_motion() {
|
||||
|
||||
#if ENABLED(FT_MOTION_MENU)
|
||||
const bool is_busy = printer_busy();
|
||||
#endif
|
||||
|
||||
START_MENU();
|
||||
|
||||
//
|
||||
@ -510,7 +550,7 @@ void menu_motion() {
|
||||
// M493 - Fixed-Time Motion
|
||||
//
|
||||
#if ENABLED(FT_MOTION_MENU)
|
||||
if (!is_busy) SUBMENU(MSG_FIXED_TIME_MOTION, menu_ft_motion);
|
||||
SUBMENU(MSG_FIXED_TIME_MOTION, menu_ft_motion);
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -190,6 +190,14 @@ void menu_tune() {
|
||||
|
||||
#endif // HAS_FAN
|
||||
|
||||
//
|
||||
// FT_MOTION
|
||||
//
|
||||
#if ENABLED(FT_MOTION_MENU)
|
||||
void menu_tune_ft_motion();
|
||||
SUBMENU(MSG_FIXED_TIME_MOTION, menu_tune_ft_motion);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Flow:
|
||||
//
|
||||
|
@ -171,4 +171,10 @@
|
||||
#elif THERMISTOR_ID == 1000
|
||||
#define THERMISTOR_NAME "Custom"
|
||||
|
||||
// SOC thermistor`
|
||||
#elif THERMISTOR_ID == 100
|
||||
#define THERMISTOR_NAME "SOC"
|
||||
|
||||
#endif // THERMISTOR_ID
|
||||
|
||||
#undef THERMISTOR_ID
|
||||
|
@ -51,7 +51,7 @@ class CircularQueue {
|
||||
* of item this queue will handle and N defines the maximum number of
|
||||
* items that can be stored on the queue.
|
||||
*/
|
||||
CircularQueue<T, N>() {
|
||||
CircularQueue() {
|
||||
buffer.size = N;
|
||||
buffer.count = buffer.head = buffer.tail = 0;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ xyze_pos_t destination; // {0}
|
||||
|
||||
// G60/G61 Position Save and Return
|
||||
#if SAVED_POSITIONS
|
||||
uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3];
|
||||
Flags<SAVED_POSITIONS> did_save_position;
|
||||
xyze_pos_t stored_position[SAVED_POSITIONS];
|
||||
#endif
|
||||
|
||||
|
@ -50,7 +50,7 @@ extern xyze_pos_t current_position, // High-level current tool position
|
||||
|
||||
// G60/G61 Position Save and Return
|
||||
#if SAVED_POSITIONS
|
||||
extern uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3]; // TODO: Add support for HAS_I_AXIS
|
||||
extern Flags<SAVED_POSITIONS> did_save_position;
|
||||
extern xyze_pos_t stored_position[SAVED_POSITIONS];
|
||||
#endif
|
||||
|
||||
|
@ -3153,6 +3153,14 @@ void Planner::set_machine_position_mm(const abce_pos_t &abce) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the machine positions in millimeters (soon) given the native position.
|
||||
* Synchonized with the planner queue.
|
||||
*
|
||||
* - Modifiers are applied for skew, leveling, retract, etc.
|
||||
* - Kinematics are applied to remap cartesian positions to stepper positions.
|
||||
* - The resulting stepper positions are synchronized at the end of the planner queue.
|
||||
*/
|
||||
void Planner::set_position_mm(const xyze_pos_t &xyze) {
|
||||
xyze_pos_t machine = xyze;
|
||||
TERN_(HAS_POSITION_MODIFIERS, apply_modifiers(machine, true));
|
||||
@ -3169,12 +3177,13 @@ void Planner::set_position_mm(const xyze_pos_t &xyze) {
|
||||
#if HAS_EXTRUDERS
|
||||
|
||||
/**
|
||||
* Setters for planner position (also setting stepper position).
|
||||
* Special setter for planner E position (also setting E stepper position).
|
||||
*/
|
||||
void Planner::set_e_position_mm(const_float_t e) {
|
||||
const uint8_t axis_index = E_AXIS_N(active_extruder);
|
||||
TERN_(DISTINCT_E_FACTORS, last_extruder = active_extruder);
|
||||
|
||||
// Unapply the current retraction before (immediately) setting the planner position
|
||||
const float e_new = DIFF_TERN(FWRETRACT, e, fwretract.current_retract[active_extruder]);
|
||||
position.e = LROUND(settings.axis_steps_per_mm[axis_index] * e_new);
|
||||
TERN_(HAS_POSITION_FLOAT, position_float.e = e_new);
|
||||
@ -3183,12 +3192,14 @@ void Planner::set_position_mm(const xyze_pos_t &xyze) {
|
||||
if (has_blocks_queued())
|
||||
buffer_sync_block(BLOCK_BIT_SYNC_POSITION);
|
||||
else
|
||||
stepper.set_axis_position(E_AXIS, position.e);
|
||||
stepper.set_e_position(position.e);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // HAS_EXTRUDERS
|
||||
|
||||
// Recalculate the steps/s^2 acceleration rates, based on the mm/s^2
|
||||
/**
|
||||
* Recalculate steps/s^2 acceleration rates based on mm/s^2 acceleration rates
|
||||
*/
|
||||
void Planner::refresh_acceleration_rates() {
|
||||
uint32_t highest_rate = 1;
|
||||
LOOP_DISTINCT_AXES(i) {
|
||||
|
@ -3361,40 +3361,40 @@ void Stepper::_set_position(const abce_long_t &spos) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// AVR requires guards to ensure any atomic memory operation greater than 8 bits
|
||||
#define ATOMIC_SECTION_START() const bool was_enabled = suspend()
|
||||
#define ATOMIC_SECTION_END() if (was_enabled) wake_up()
|
||||
#define AVR_ATOMIC_SECTION_START() TERN_(__AVR__, ATOMIC_SECTION_START())
|
||||
#define AVR_ATOMIC_SECTION_END() TERN_(__AVR__, ATOMIC_SECTION_END())
|
||||
|
||||
/**
|
||||
* Get a stepper's position in steps.
|
||||
*/
|
||||
int32_t Stepper::position(const AxisEnum axis) {
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position. Only required for AVR, as
|
||||
// any 32bit CPU offers atomic access to 32bit variables
|
||||
const bool was_enabled = suspend();
|
||||
#endif
|
||||
|
||||
AVR_ATOMIC_SECTION_START();
|
||||
const int32_t v = count_position[axis];
|
||||
|
||||
#ifdef __AVR__
|
||||
// Reenable Stepper ISR
|
||||
if (was_enabled) wake_up();
|
||||
#endif
|
||||
AVR_ATOMIC_SECTION_END();
|
||||
return v;
|
||||
}
|
||||
|
||||
// Set the current position in steps
|
||||
/**
|
||||
* Set all axis stepper positions in steps
|
||||
*/
|
||||
void Stepper::set_position(const xyze_long_t &spos) {
|
||||
planner.synchronize();
|
||||
const bool was_enabled = suspend();
|
||||
ATOMIC_SECTION_START();
|
||||
_set_position(spos);
|
||||
if (was_enabled) wake_up();
|
||||
ATOMIC_SECTION_END();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a single axis stepper position in steps
|
||||
*/
|
||||
void Stepper::set_axis_position(const AxisEnum a, const int32_t &v) {
|
||||
planner.synchronize();
|
||||
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position. Only required for AVR, as
|
||||
// any 32bit CPU offers atomic access to 32bit variables
|
||||
const bool was_enabled = suspend();
|
||||
#if ANY(__AVR__, INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
ATOMIC_SECTION_START();
|
||||
#endif
|
||||
|
||||
count_position[a] = v;
|
||||
@ -3402,43 +3402,47 @@ void Stepper::set_axis_position(const AxisEnum a, const int32_t &v) {
|
||||
TERN_(INPUT_SHAPING_Y, if (a == Y_AXIS) shaping_y.last_block_end_pos = v);
|
||||
TERN_(INPUT_SHAPING_Z, if (a == Z_AXIS) shaping_z.last_block_end_pos = v);
|
||||
|
||||
#ifdef __AVR__
|
||||
// Reenable Stepper ISR
|
||||
if (was_enabled) wake_up();
|
||||
#if ANY(__AVR__, INPUT_SHAPING_X, INPUT_SHAPING_Y, INPUT_SHAPING_Z)
|
||||
ATOMIC_SECTION_END();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
|
||||
void Stepper::set_e_position(const int32_t &v) {
|
||||
planner.synchronize();
|
||||
|
||||
AVR_ATOMIC_SECTION_START();
|
||||
count_position.e = v;
|
||||
AVR_ATOMIC_SECTION_END();
|
||||
}
|
||||
|
||||
#endif // HAS_EXTRUDERS
|
||||
|
||||
#if ENABLED(FT_MOTION)
|
||||
|
||||
void Stepper::ftMotion_syncPosition() {
|
||||
//planner.synchronize(); planner already synchronized in M493
|
||||
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position. Only required for AVR, as
|
||||
// any 32bit CPU offers atomic access to 32bit variables
|
||||
const bool was_enabled = suspend();
|
||||
#endif
|
||||
|
||||
// Update stepper positions from the planner
|
||||
AVR_ATOMIC_SECTION_START();
|
||||
count_position = planner.position;
|
||||
|
||||
#ifdef __AVR__
|
||||
// Reenable Stepper ISR
|
||||
if (was_enabled) wake_up();
|
||||
#endif
|
||||
AVR_ATOMIC_SECTION_END();
|
||||
}
|
||||
|
||||
#endif // FT_MOTION
|
||||
|
||||
// Signal endstops were triggered - This function can be called from
|
||||
// an ISR context (Temperature, Stepper or limits ISR), so we must
|
||||
// be very careful here. If the interrupt being preempted was the
|
||||
// Stepper ISR (this CAN happen with the endstop limits ISR) then
|
||||
// when the stepper ISR resumes, we must be very sure that the movement
|
||||
// is properly canceled
|
||||
/**
|
||||
* Record stepper positions and discard the rest of the current block
|
||||
*
|
||||
* WARNING! This function may be called from ISR context!
|
||||
* If the Stepper ISR is preempted (e.g., by the endstop ISR) we
|
||||
* must ensure the move is properly canceled before the ISR resumes.
|
||||
*/
|
||||
void Stepper::endstop_triggered(const AxisEnum axis) {
|
||||
|
||||
const bool was_enabled = suspend();
|
||||
ATOMIC_SECTION_START(); // Suspend the Stepper ISR on all platforms
|
||||
|
||||
endstops_trigsteps[axis] = (
|
||||
#if IS_CORE
|
||||
(axis == CORE_AXIS_2
|
||||
@ -3461,23 +3465,14 @@ void Stepper::endstop_triggered(const AxisEnum axis) {
|
||||
// Discard the rest of the move if there is a current block
|
||||
quick_stop();
|
||||
|
||||
if (was_enabled) wake_up();
|
||||
ATOMIC_SECTION_END(); // Suspend the Stepper ISR on all platforms
|
||||
}
|
||||
|
||||
// Return the "triggered" position for an axis (that hit an endstop)
|
||||
int32_t Stepper::triggered_position(const AxisEnum axis) {
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position. Only required for AVR, as
|
||||
// any 32bit CPU offers atomic access to 32bit variables
|
||||
const bool was_enabled = suspend();
|
||||
#endif
|
||||
|
||||
AVR_ATOMIC_SECTION_START();
|
||||
const int32_t v = endstops_trigsteps[axis];
|
||||
|
||||
#ifdef __AVR__
|
||||
// Reenable Stepper ISR
|
||||
if (was_enabled) wake_up();
|
||||
#endif
|
||||
|
||||
AVR_ATOMIC_SECTION_END();
|
||||
return v;
|
||||
}
|
||||
|
||||
@ -3506,18 +3501,9 @@ void Stepper::report_a_position(const xyz_long_t &pos) {
|
||||
}
|
||||
|
||||
void Stepper::report_positions() {
|
||||
|
||||
#ifdef __AVR__
|
||||
// Protect the access to the position.
|
||||
const bool was_enabled = suspend();
|
||||
#endif
|
||||
|
||||
AVR_ATOMIC_SECTION_START();
|
||||
const xyz_long_t pos = count_position;
|
||||
|
||||
#ifdef __AVR__
|
||||
if (was_enabled) wake_up();
|
||||
#endif
|
||||
|
||||
AVR_ATOMIC_SECTION_END();
|
||||
report_a_position(pos);
|
||||
}
|
||||
|
||||
|
@ -540,6 +540,11 @@ class Stepper {
|
||||
static void set_position(const xyze_long_t &spos);
|
||||
static void set_axis_position(const AxisEnum a, const int32_t &v);
|
||||
|
||||
#if HAS_EXTRUDERS
|
||||
// Save a little when E is the only one used
|
||||
static void set_e_position(const int32_t &v);
|
||||
#endif
|
||||
|
||||
// Report the positions of the steppers, in steps
|
||||
static void report_a_position(const xyz_long_t &pos);
|
||||
static void report_positions();
|
||||
|
@ -23,13 +23,13 @@
|
||||
|
||||
/**
|
||||
* Smoothieware Smoothieboard pin assignments
|
||||
* Schematic: http://smoothieware.org/_media///external/http.i.imgur.com.oj4zqs3.png
|
||||
* See https://smoothieware.github.io/Webif-pack/documentation/web/html/smoothieboard.html
|
||||
*/
|
||||
|
||||
#include "env_validate.h"
|
||||
|
||||
#define BOARD_INFO_NAME "Smoothieboard"
|
||||
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
|
||||
#define BOARD_WEBSITE_URL "smoothieware.github.io"
|
||||
|
||||
//
|
||||
// Servos
|
||||
@ -131,12 +131,7 @@
|
||||
|
||||
/**
|
||||
* The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either
|
||||
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board
|
||||
* found at http://smoothieware.org/rrdglcdadapter
|
||||
*
|
||||
* Other links to information about setting up a display panel with Smoothieboard
|
||||
* http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
|
||||
* http://smoothieware.org/panel
|
||||
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board.
|
||||
*/
|
||||
#if IS_RRD_FG_SC
|
||||
// EXP1 Pins
|
||||
|
@ -25,7 +25,7 @@
|
||||
* Cheaptronic v2.0 pin assignments
|
||||
* Built and sold by Michal Dyntar - RRO
|
||||
* www.reprapobchod.cz (DOES NOT EXIST ANYMORE)
|
||||
* https://web.archive.org/web/20190306201523/http://reprapobchod.cz/
|
||||
* https://web.archive.org/web/20190306201523/reprapobchod.cz
|
||||
* ATmega2560
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* CartesioV11 pin assignments
|
||||
* Comes with an Arduino Mega, see
|
||||
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
|
||||
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
|
||||
* ATmega2560, ATmega1280
|
||||
*/
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* CartesioV12 pin assignments
|
||||
* Comes with an Arduino Mega, see
|
||||
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
|
||||
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
|
||||
* ATmega2560, ATmega1280
|
||||
*/
|
||||
|
||||
|
@ -604,6 +604,7 @@
|
||||
#define BTN_ENC 32
|
||||
#define LCD_SDSS SDSS
|
||||
#define KILL_PIN 41
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -745,21 +745,21 @@
|
||||
#elif MB(BLACK_STM32F407VE)
|
||||
#include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black
|
||||
#elif MB(BTT_SKR_PRO_V1_1)
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BIGTREE_SKR_PRO env:BIGTREE_SKR_PRO_usb_flash_drive
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_1.h" // STM32F4 env:BTT_SKR_PRO env:BTT_SKR_PRO_usb_flash_drive
|
||||
#elif MB(BTT_SKR_PRO_V1_2)
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_2.h" // STM32F4 env:BIGTREE_SKR_PRO env:BIGTREE_SKR_PRO_usb_flash_drive
|
||||
#include "stm32f4/pins_BTT_SKR_PRO_V1_2.h" // STM32F4 env:BTT_SKR_PRO env:BTT_SKR_PRO_usb_flash_drive
|
||||
#elif MB(BTT_GTR_V1_0)
|
||||
#include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0 env:BIGTREE_GTR_V1_0_usb_flash_drive
|
||||
#include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BTT_GTR_V1_0 env:BTT_GTR_V1_0_usb_flash_drive
|
||||
#elif MB(BTT_BTT002_V1_0)
|
||||
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002 env:BIGTREE_BTT002_VET6
|
||||
#include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BTT_BTT002 env:BTT_BTT002_VET6
|
||||
#elif MB(BTT_E3_RRF)
|
||||
#include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BIGTREE_E3_RRF
|
||||
#include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BTT_E3_RRF
|
||||
#elif MB(BTT_SKR_MINI_E3_V3_0_1)
|
||||
#include "stm32f4/pins_BTT_SKR_MINI_E3_V3_0_1.h" // STM32F4 env:STM32F401RC_btt env:STM32F401RC_btt_xfer
|
||||
#elif MB(BTT_SKR_V2_0_REV_A)
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB env:BIGTREE_SKR_2_USB_debug
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:STM32F407VG_btt env:STM32F407VG_btt_USB env:STM32F407VG_btt_USB_debug
|
||||
#elif MB(BTT_SKR_V2_0_REV_B)
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB env:BIGTREE_SKR_2_USB_debug env:BIGTREE_SKR_2_F429 env:BIGTREE_SKR_2_F429_USB env:BIGTREE_SKR_2_F429_USB_debug
|
||||
#include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:STM32F407VG_btt env:STM32F407VG_btt_USB env:STM32F407VG_btt_USB_debug env:STM32F429VG_btt env:STM32F429VG_btt_USB env:STM32F429VG_btt_USB_debug
|
||||
#elif MB(BTT_OCTOPUS_V1_0)
|
||||
#include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:STM32F446ZE_btt env:STM32F446ZE_btt_usb_flash_drive
|
||||
#elif MB(BTT_OCTOPUS_V1_1)
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* BAM&DICE Due (Arduino Mega) pin assignments
|
||||
* Schematic: http://www.2printbeta.de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
|
||||
* Schematic: http://www.2printbeta.de/de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
|
||||
* ATmega2560, ATmega1280
|
||||
*/
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* Velleman K8800 (Vertex)
|
||||
* Schematic: https://www.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf
|
||||
* Schematic: https://cdn.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf
|
||||
* ATmega2560, ATmega1280
|
||||
*/
|
||||
|
||||
|
@ -742,6 +742,7 @@
|
||||
#define BTN_ENC AUX4_03
|
||||
#define LCD_SDSS SDSS
|
||||
#define KILL_PIN EXP2_08_PIN
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -430,6 +430,7 @@
|
||||
#define BTN_ENC 32
|
||||
#define LCD_SDSS EXP2_04_PIN
|
||||
//#define KILL_PIN 41
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema4.SchDoc
|
||||
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema5.SchDoc
|
||||
* Schematics (Original+):
|
||||
* Schematic (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_(x1)/Ultimainboard%20rev.%202.1.1%20altium.zip
|
||||
* Schematic (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_%28x1%29/Ultimainboard%20rev.%202.1.1%20altium.zip
|
||||
* ATmega2560
|
||||
*/
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
||||
|
||||
/**
|
||||
* RADDS Extension Board V2 / V3
|
||||
* http://doku.radds.org/dokumentation/extension-board
|
||||
* https://web.archive.org/web/20210627142010/doku.radds.org/dokumentation/extension-board/
|
||||
*/
|
||||
//#define RADDS_EXTENSION 2
|
||||
#if RADDS_EXTENSION >= 2
|
||||
|
@ -271,7 +271,7 @@
|
||||
|
||||
#elif ENABLED(SPARK_FULL_GRAPHICS)
|
||||
|
||||
//http://doku.radds.org/dokumentation/other-electronics/sparklcd/
|
||||
// https://sparklab-shop.de/elektronik/40/sparklcd-adapter
|
||||
#error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D."
|
||||
//#define LCD_PINS_D4 29 //?
|
||||
//#define LCD_PINS_EN 27 //?
|
||||
|
@ -361,6 +361,7 @@
|
||||
//#define BTN_ENC 32
|
||||
//#define LCD_SDSS SDSS
|
||||
//#define KILL_PIN EXP1_01_PIN
|
||||
//#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -413,6 +413,7 @@
|
||||
//#define BTN_ENC 32
|
||||
//#define LCD_SDSS SDSS
|
||||
//#define KILL_PIN EXP1_01_PIN
|
||||
//#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -308,6 +308,7 @@
|
||||
//#define BTN_ENC 32
|
||||
//#define LCD_SDSS SDSS
|
||||
//#define KILL_PIN EXP1_01_PIN
|
||||
//#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -564,6 +564,7 @@
|
||||
#define BTN_ENC AUX4_03
|
||||
#define LCD_SDSS SDSS
|
||||
#define KILL_PIN AUX4_07
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -206,7 +206,7 @@
|
||||
#elif IS_RRD_FG_SC
|
||||
|
||||
// Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
|
||||
// display using an adapter board. See https://go.aisler.net/benlye/anet-lcd-adapter/pcb
|
||||
// display using an adapter board. See https://aisler.net/benlye/anet-lcd-adapter/pcb
|
||||
// See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
|
||||
|
||||
#if ENABLED(CTC_A10S_A13)
|
||||
@ -305,8 +305,8 @@
|
||||
* ====================================================================
|
||||
*
|
||||
* Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring
|
||||
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse
|
||||
* pin pin functions | | | | .com/thing:2103748
|
||||
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse.com/thing:2103748
|
||||
* pin pin functions | | | |
|
||||
*--------------------------------------------------------------------------------------------------------------------
|
||||
* ANET-J3.1 8 *** | N/A | J3_TX *** | |
|
||||
* ANET-J3.2 9 *** | N/A | J3_RX *** | |
|
||||
|
@ -69,7 +69,7 @@
|
||||
*
|
||||
* When installing select 1.0.2
|
||||
*
|
||||
* Installation instructions can be found at http://learn.sparkfun.com/pages/CustomBoardsArduino
|
||||
* Installation instructions can be found at https://learn.sparkfun.com:443/pages/CustomBoardsArduino
|
||||
* Just use the above JSON URL instead of Sparkfun's JSON.
|
||||
*
|
||||
* Once installed select the Sanguino board and then select the CPU.
|
||||
|
@ -263,6 +263,7 @@
|
||||
#else
|
||||
#define BTN_ENC AUX1_07
|
||||
#endif
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#else // !LCD_FOR_MELZI && !ZONESTAR_LCD && !LCD_I2C_PANELOLU2
|
||||
|
||||
|
@ -308,7 +308,7 @@
|
||||
#define FORCE_SOFT_SPI
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP."
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1 and MKS_LCD12864A/B are currently supported on the SKR E3 DIP."
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -348,7 +348,7 @@
|
||||
#define FORCE_SOFT_SPI
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3."
|
||||
#error "Only CR10_STOCKDISPLAY, LCD_FOR_MELZI, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, TFTGLCD_PANEL_(SPI|I2C), FYSETC_MINI_12864_2_1, MKS_MINI_12864_V3, and BTT_MINI_12864 are currently supported on the SKR Mini E3."
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -161,6 +161,7 @@
|
||||
#define LCD_SDSS PD5 // 53
|
||||
#define SD_DETECT_PIN -1
|
||||
#define KILL_PIN PC9 // 41
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#elif ENABLED(LCD_I2C_VIKI)
|
||||
|
||||
|
@ -282,7 +282,7 @@
|
||||
#endif
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3."
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the SKR Mini E3."
|
||||
#endif
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* Pin assignments for the RUMBA32
|
||||
*
|
||||
* https://aus3d.com.au/rumba32
|
||||
* https://aus3d.com.au/products/rumba32-control-board
|
||||
* https://github.com/Aus3D/RUMBA32
|
||||
*/
|
||||
|
||||
|
@ -247,7 +247,7 @@
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
#define NEOPIXEL_PIN EXP1_02_PIN
|
||||
#else
|
||||
#error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3 with SKR_MINI_SCREEN_ADAPTER."
|
||||
#error "Only FYSETC_MINI_12864_2_1 / MKS_MINI_12864_V3 / BTT_MINI_12864 / BEEZ_MINI_12864 are currently supported on the SKR Mini E3 with SKR_MINI_SCREEN_ADAPTER."
|
||||
#endif
|
||||
|
||||
#else
|
||||
@ -374,7 +374,7 @@
|
||||
#define LCD_BACKLIGHT_PIN -1
|
||||
|
||||
#else
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BIGTREE_SKR_MINI_E3."
|
||||
#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, FYSETC_MINI_12864_2_1, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the SKR Mini E3."
|
||||
#endif
|
||||
|
||||
#endif // SKR_MINI_SCREEN_ADAPTER
|
||||
|
@ -442,7 +442,7 @@
|
||||
#define NEOPIXEL_PIN EXP1_06_PIN
|
||||
|
||||
#elif HAS_WIRED_LCD
|
||||
#error "Only BTT_MINI_12864 (BTT Mini 12864 V2.0 with FPC cable) is currently supported on the BIGTREE_OCTOPUS_MAX_EZ."
|
||||
#error "Only BTT_MINI_12864 (BTT Mini 12864 V2.0 with FPC cable) is currently supported on the Octopus Max EZ."
|
||||
#endif
|
||||
|
||||
//
|
||||
|
@ -160,6 +160,7 @@
|
||||
#define BTN_ENC 41 // F3 JP2-4
|
||||
|
||||
#define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2
|
||||
#undef LCD_PINS_EN // not used, causes false pin conflict report
|
||||
|
||||
#else
|
||||
|
||||
|
@ -532,6 +532,59 @@ MARLIN_TEST(types, Flags_32) {
|
||||
TEST_ASSERT_EQUAL(4, flags.size());
|
||||
}
|
||||
|
||||
MARLIN_TEST(types, Flags_64) {
|
||||
Flags<64> flags;
|
||||
|
||||
flags.reset();
|
||||
TEST_ASSERT_EQUAL(0, flags.b);
|
||||
|
||||
flags.set(0, true);
|
||||
flags.set(63, true);
|
||||
TEST_ASSERT_EQUAL(9223372036854775809ULL, flags.b);
|
||||
|
||||
flags.clear(0);
|
||||
flags.clear(63);
|
||||
TEST_ASSERT_EQUAL(0, flags.b);
|
||||
|
||||
flags.set(0, true);
|
||||
flags.set(63, true);
|
||||
TEST_ASSERT_EQUAL(true, flags.test(0));
|
||||
TEST_ASSERT_EQUAL(true, flags.test(63));
|
||||
TEST_ASSERT_EQUAL(false, flags.test(1));
|
||||
TEST_ASSERT_EQUAL(false, flags.test(62));
|
||||
|
||||
TEST_ASSERT_EQUAL(true, flags[0]);
|
||||
TEST_ASSERT_EQUAL(true, flags[63]);
|
||||
TEST_ASSERT_EQUAL(false, flags[1]);
|
||||
TEST_ASSERT_EQUAL(false, flags[62]);
|
||||
|
||||
TEST_ASSERT_EQUAL(8, flags.size());
|
||||
}
|
||||
|
||||
MARLIN_TEST(types, Flags_302) {
|
||||
Flags<302> flags;
|
||||
|
||||
flags.reset();
|
||||
TEST_ASSERT_EQUAL(false, (bool)flags);
|
||||
|
||||
flags.set(0, true);
|
||||
flags.set(301, true);
|
||||
|
||||
TEST_ASSERT_EQUAL(true, (bool)flags);
|
||||
|
||||
TEST_ASSERT_EQUAL(true, flags.test(0));
|
||||
TEST_ASSERT_EQUAL(true, flags.test(301));
|
||||
TEST_ASSERT_EQUAL(false, flags.test(1));
|
||||
TEST_ASSERT_EQUAL(false, flags.test(300));
|
||||
|
||||
TEST_ASSERT_EQUAL(true, flags[0]);
|
||||
TEST_ASSERT_EQUAL(true, flags[301]);
|
||||
TEST_ASSERT_EQUAL(false, flags[1]);
|
||||
TEST_ASSERT_EQUAL(false, flags[300]);
|
||||
|
||||
TEST_ASSERT_EQUAL(38, flags.size());
|
||||
}
|
||||
|
||||
MARLIN_TEST(types, AxisFlags_const_as_bools) {
|
||||
const AxisFlags axis_flags_const_false = {0};
|
||||
TEST_ASSERT_FALSE(axis_flags_const_false);
|
||||
|
@ -15,7 +15,7 @@
|
||||
]
|
||||
],
|
||||
"mcu": "stm32f407vgt6",
|
||||
"variant": "MARLIN_BIGTREE_BTT002"
|
||||
"variant": "MARLIN_BTT_BTT002"
|
||||
},
|
||||
"debug": {
|
||||
"jlink_device": "STM32F407VG",
|
@ -15,7 +15,7 @@
|
||||
]
|
||||
],
|
||||
"mcu": "stm32f407vet6",
|
||||
"variant": "MARLIN_BIGTREE_BTT002"
|
||||
"variant": "MARLIN_BTT_BTT002"
|
||||
},
|
||||
"debug": {
|
||||
"jlink_device": "STM32F407VE",
|
@ -15,7 +15,7 @@
|
||||
]
|
||||
],
|
||||
"mcu": "stm32f407zgt6",
|
||||
"variant": "MARLIN_BIGTREE_GTR_V1"
|
||||
"variant": "MARLIN_BTT_GTR_V1"
|
||||
},
|
||||
"debug": {
|
||||
"jlink_device": "STM32F407ZG",
|
@ -5,7 +5,7 @@
|
||||
"f_cpu": "168000000L",
|
||||
"mcu": "stm32f429zgt6",
|
||||
"product_line": "STM32F429xx",
|
||||
"variant": "MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429"
|
||||
"variant": "MARLIN_BTT_OCTOPUS_PRO_V1_F429"
|
||||
},
|
||||
"connectivity": [
|
||||
"can"
|
@ -4,7 +4,7 @@
|
||||
"extra_flags": "-DSTM32F446xx",
|
||||
"f_cpu": "180000000L",
|
||||
"mcu": "stm32f446zet6",
|
||||
"variant": "MARLIN_BIGTREE_OCTOPUS_V1"
|
||||
"variant": "MARLIN_BTT_OCTOPUS_V1"
|
||||
},
|
||||
"connectivity": [
|
||||
"can"
|
@ -15,7 +15,7 @@
|
||||
]
|
||||
],
|
||||
"mcu": "stm32f407zgt6",
|
||||
"variant": "MARLIN_BIGTREE_SKR_PRO_11"
|
||||
"variant": "MARLIN_BTT_SKR_PRO_11"
|
||||
},
|
||||
"debug": {
|
||||
"jlink_device": "STM32F407ZG",
|
@ -20,7 +20,7 @@
|
||||
"showDevDebugOutput": false,
|
||||
"configFiles": [ "interface/stlink.cfg", "target/stm32f4x.cfg" ],
|
||||
"device": "stlink",
|
||||
"executable": "${workspaceRoot}/.pio/build/BIGTREE_SKR_2_USB_debug/firmware.elf",
|
||||
"executable": "${workspaceRoot}/.pio/build/STM32F407VG_btt_USB_debug/firmware.elf",
|
||||
"openOCDLaunchCommands": [ "init", "reset init" ],
|
||||
"svdFile": "${env:HOME}/.platformio/platforms/ststm32@12.1.1/misc/svd/STM32F40x.svd",
|
||||
},
|
||||
|
@ -62,6 +62,28 @@ if pioutil.is_pio_build():
|
||||
if 'MARLIN_FEATURES' not in env:
|
||||
raise SystemExit("Error: this script should be used after common Marlin scripts.")
|
||||
|
||||
# Useful values
|
||||
project_dir = Path(env['PROJECT_DIR'])
|
||||
config_files = ("Configuration.h", "Configuration_adv.h")
|
||||
|
||||
#
|
||||
# Update old macros BOTH and EITHER in configuration files
|
||||
#
|
||||
conf_modified = False
|
||||
for f in config_files:
|
||||
conf_path = project_dir / "Marlin" / f
|
||||
if conf_path.is_file():
|
||||
with open(conf_path, 'r', encoding="utf8") as file:
|
||||
text = file.read()
|
||||
modified_text = text.replace("BOTH(", "ALL(").replace("EITHER(", "ANY(")
|
||||
if text != modified_text:
|
||||
conf_modified = True
|
||||
with open(conf_path, 'w') as file:
|
||||
file.write(modified_text)
|
||||
|
||||
if conf_modified:
|
||||
raise SystemExit('WARNING: Configuration files needed an update to remove incompatible items. Try the build again to use the updated files.')
|
||||
|
||||
if len(env['MARLIN_FEATURES']) == 0:
|
||||
raise SystemExit("Error: Failed to parse Marlin features. See previous error messages.")
|
||||
|
||||
@ -78,10 +100,6 @@ if pioutil.is_pio_build():
|
||||
( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) )
|
||||
raise SystemExit(err)
|
||||
|
||||
# Useful values
|
||||
project_dir = Path(env['PROJECT_DIR'])
|
||||
config_files = ("Configuration.h", "Configuration_adv.h")
|
||||
|
||||
#
|
||||
# Check for Config files in two common incorrect places
|
||||
#
|
||||
@ -140,22 +158,5 @@ if pioutil.is_pio_build():
|
||||
err = "ERROR: FILAMENT_RUNOUT_SCRIPT needs a %c parameter (e.g., \"M600 T%c\") when NUM_RUNOUT_SENSORS is > 1"
|
||||
raise SystemExit(err)
|
||||
|
||||
#
|
||||
# Update old macros BOTH and EITHER in configuration files
|
||||
#
|
||||
conf_modified = False
|
||||
for f in config_files:
|
||||
conf_path = project_dir / "Marlin" / f
|
||||
if conf_path.is_file():
|
||||
with open(conf_path, 'r', encoding="utf8") as file:
|
||||
text = file.read()
|
||||
modified_text = text.replace("BOTH(", "ALL(").replace("EITHER(", "ANY(")
|
||||
if text != modified_text:
|
||||
conf_modified = True
|
||||
with open(conf_path, 'w') as file:
|
||||
file.write(modified_text)
|
||||
|
||||
if conf_modified:
|
||||
raise SystemExit('WARNING: Configuration files needed an update to remove incompatible items. Try the build again to use the updated files.')
|
||||
|
||||
sanity_check_target()
|
||||
|
@ -31,7 +31,6 @@ def enabled_defines(filepath):
|
||||
our crude scraping method and the actual compiler output.
|
||||
We end up with the actual configured state,
|
||||
better than what the config files say. You can then use the
|
||||
a decent reflection of all enabled options that (probably) came from
|
||||
resulting config.ini to produce more exact configuration files.
|
||||
'''
|
||||
outdict = {}
|
||||
@ -188,7 +187,7 @@ def compute_build_signature(env):
|
||||
|
||||
ini_fmt = '{0:40} = {1}'
|
||||
ext_fmt = '{0:40} {1}'
|
||||
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXPORT')
|
||||
ignore = ('CONFIGURATION_H_VERSION', 'CONFIGURATION_ADV_H_VERSION', 'CONFIG_EXAMPLES_DIR', 'CONFIG_EXPORT')
|
||||
|
||||
if extended_dump:
|
||||
# Extended export will dump config options by section
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user