Browse Source

Применение обновления из Marlin

Исправлен вывод в uart на команды
из файла на карте.
pull/1/head
Sergey 5 years ago
parent
commit
dd65922e9c
  1. 10
      Marlin/src/core/serial.h
  2. 16
      Marlin/src/core/types.h

10
Marlin/src/core/serial.h

@ -53,8 +53,8 @@ extern uint8_t marlin_debug_flags;
#define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p) #define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p)
#define _PORT_RESTORE(n) RESTORE(n) #define _PORT_RESTORE(n) RESTORE(n)
#define SERIAL_OUT(WHAT, V...) do{ \ #define SERIAL_OUT(WHAT, V...) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \ if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) (void)MYSERIAL0.WHAT(V); \
if ( serial_port_index) (void)MYSERIAL1.WHAT(V); \ if ( serial_port_index ) (void)MYSERIAL1.WHAT(V); \
}while(0) }while(0)
#define SERIAL_ASSERT(P) if(serial_port_index!=(P)){ debugger(); } #define SERIAL_ASSERT(P) if(serial_port_index!=(P)){ debugger(); }
#else #else
@ -69,7 +69,7 @@ extern uint8_t marlin_debug_flags;
#if ENABLED(MKS_WIFI) #if ENABLED(MKS_WIFI)
#define SERIAL_ECHO(x) do{ \ #define SERIAL_ECHO(x) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) SERIAL_OUT(print, x); \ if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1 ) SERIAL_OUT(print, x); \
if ( serial_port_index) mks_wifi_print(x); \ if ( serial_port_index) mks_wifi_print(x); \
}while(0) }while(0)
#else #else
@ -80,7 +80,7 @@ extern uint8_t marlin_debug_flags;
#if ENABLED(MKS_WIFI) #if ENABLED(MKS_WIFI)
#define SERIAL_ECHOLN(x) do{ \ #define SERIAL_ECHOLN(x) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) SERIAL_OUT(println, x); \ if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) SERIAL_OUT(println, x); \
if ( serial_port_index) mks_wifi_println(x); \ if ( serial_port_index) mks_wifi_println(x); \
}while(0) }while(0)
#else #else
@ -116,7 +116,7 @@ extern uint8_t marlin_debug_flags;
#if ENABLED(MKS_WIFI) #if ENABLED(MKS_WIFI)
#define SERIAL_CHAR(V...) do{ \ #define SERIAL_CHAR(V...) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) _CHAR_N(NUM_ARGS(V),V); \ if (!serial_port_index || serial_port_index == SERIAL_BOTH || serial_port_index == -1) _CHAR_N(NUM_ARGS(V),V); \
if ( serial_port_index) mks_wifi_print_var(NUM_ARGS(V),V); \ if ( serial_port_index) mks_wifi_print_var(NUM_ARGS(V),V); \
}while(0) }while(0)
#else #else

16
Marlin/src/core/types.h

@ -347,14 +347,14 @@ struct XYZval {
FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; }
FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; }
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; } FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; } FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; } FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; } FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
FI XYZval<T> operator/ (const float &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; } FI XYZval<T> operator/ (const float &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
FI XYZval<T> operator/ (const float &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; } FI XYZval<T> operator/ (const float &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
FI XYZval<T> operator/ (const int &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; } FI XYZval<T> operator/ (const int &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
FI XYZval<T> operator/ (const int &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; } FI XYZval<T> operator/ (const int &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
FI XYZval<T> operator>>(const int &v) const { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; } FI XYZval<T> operator>>(const int &v) const { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; }
FI XYZval<T> operator>>(const int &v) { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; } FI XYZval<T> operator>>(const int &v) { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; }
FI XYZval<T> operator<<(const int &v) const { XYZval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); return ls; } FI XYZval<T> operator<<(const int &v) const { XYZval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); return ls; }

Loading…
Cancel
Save