Browse Source

update from 2.0.x

FB4S_WIFI
Sergey 3 years ago
parent
commit
8b7e1f735c
  1. 28
      Marlin/src/core/types.h
  2. 2
      Marlin/src/gcode/calibrate/M852.cpp
  3. 2
      buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h
  4. 3
      ini/stm32f4.ini

28
Marlin/src/core/types.h

@ -536,19 +536,9 @@ struct XYZEval {
// Reset all to 0 // Reset all to 0
FI void reset() { LOGICAL_AXIS_GANG(e =, x =, y =, z =, i =, j =, k =) 0; } FI void reset() { LOGICAL_AXIS_GANG(e =, x =, y =, z =, i =, j =, k =) 0; }
// Setters taking struct types and arrays // Setters for some number of linear axes, not all
FI void set(const T px) { x = px; } FI void set(const T px) { x = px; }
FI void set(const T px, const T py) { x = px; y = py; } FI void set(const T px, const T py) { x = px; y = py; }
FI void set(const XYval<T> pxy) { x = pxy.x; y = pxy.y; }
FI void set(const XYZval<T> pxyz) { set(LINEAR_AXIS_ELEM(pxyz)); }
#if HAS_Z_AXIS
FI void set(LINEAR_AXIS_ARGS(const T)) { LINEAR_AXIS_CODE(a = x, b = y, c = z, u = i, v = j, w = k); }
#endif
#if LOGICAL_AXES > LINEAR_AXES
FI void set(const XYval<T> pxy, const T pe) { set(pxy); e = pe; }
FI void set(const XYZval<T> pxyz, const T pe) { set(pxyz); e = pe; }
FI void set(LOGICAL_AXIS_ARGS(const T)) { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, u = i, v = j, w = k); }
#endif
#if HAS_I_AXIS #if HAS_I_AXIS
FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; } FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; }
#endif #endif
@ -558,6 +548,18 @@ struct XYZEval {
#if HAS_K_AXIS #if HAS_K_AXIS
FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; } FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; }
#endif #endif
// Setters taking struct types and arrays
FI void set(const XYval<T> pxy) { x = pxy.x; y = pxy.y; }
FI void set(const XYZval<T> pxyz) { set(LINEAR_AXIS_ELEM(pxyz)); }
#if HAS_Z_AXIS
FI void set(LINEAR_AXIS_ARGS(const T)) { LINEAR_AXIS_CODE(a = x, b = y, c = z, u = i, v = j, w = k); }
#endif
FI void set(const XYval<T> pxy, const T pz) { set(pxy); TERN_(HAS_Z_AXIS, z = pz); }
#if LOGICAL_AXES > LINEAR_AXES
FI void set(const XYval<T> pxy, const T pz, const T pe) { set(pxy, pz); e = pe; }
FI void set(const XYZval<T> pxyz, const T pe) { set(pxyz); e = pe; }
FI void set(LOGICAL_AXIS_ARGS(const T)) { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, u = i, v = j, w = k); }
#endif
// Length reduced to one dimension // Length reduced to one dimension
FI T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k)); } FI T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k)); }

2
Marlin/src/gcode/calibrate/M852.cpp

@ -93,7 +93,7 @@ void GcodeSuite::M852() {
void GcodeSuite::M852_report(const bool forReplay/*=true*/) { void GcodeSuite::M852_report(const bool forReplay/*=true*/) {
report_heading_etc(forReplay, F(STR_SKEW_FACTOR)); report_heading_etc(forReplay, F(STR_SKEW_FACTOR));
SERIAL_ECHOPAIR_F(" M851 I", planner.skew_factor.xy, 6); SERIAL_ECHOPAIR_F(" M852 I", planner.skew_factor.xy, 6);
#if ENABLED(SKEW_CORRECTION_FOR_Z) #if ENABLED(SKEW_CORRECTION_FOR_Z)
SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6); SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6);
SERIAL_ECHOPAIR_F(" K", planner.skew_factor.yz, 6); SERIAL_ECHOPAIR_F(" K", planner.skew_factor.yz, 6);

2
buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_V2/variant.h

@ -104,7 +104,7 @@ extern "C" {
// Timer Definitions // Timer Definitions
// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
#define TIMER_TONE TIM5 #define TIMER_TONE TIM5
#define TIMER_SERVO TIM7 #define TIMER_SERVO TIM4
// UART Definitions // UART Definitions
// Define here Serial instance number to map on Serial generic name // Define here Serial instance number to map on Serial generic name

3
ini/stm32f4.ini

@ -531,11 +531,14 @@ build_unflags = -DUSBD_USE_CDC
extends = stm32_variant extends = stm32_variant
board = genericSTM32F405RG board = genericSTM32F405RG
board_build.variant = MARLIN_TH3D_EZBOARD_V2 board_build.variant = MARLIN_TH3D_EZBOARD_V2
board_build.encrypt = firmware.bin
board_build.offset = 0xC000 board_build.offset = 0xC000
board_upload.offset_address = 0x0800C000 board_upload.offset_address = 0x0800C000
build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0 build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0
debug_tool = stlink debug_tool = stlink
upload_protocol = stlink upload_protocol = stlink
extra_scripts = ${stm32_variant.extra_scripts}
buildroot/share/PlatformIO/scripts/openblt.py
# #
# BOARD_MKS_ROBIN_NANO_V1_3_F4 # BOARD_MKS_ROBIN_NANO_V1_3_F4

Loading…
Cancel
Save