Revert "Sync with Sergey1560"

This reverts commit 72431de8e5.
This commit is contained in:
X-Dron
2020-11-06 20:32:48 +03:00
parent 72431de8e5
commit 12ac9daecf
9 changed files with 13 additions and 32 deletions

View File

@@ -120,7 +120,8 @@
*
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
*/
#define BAUDRATE 250000
#define BAUDRATE 115200
#define USB_BAUDRATE 250000
// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH

View File

@@ -1614,7 +1614,7 @@
#define BABYSTEP_INVERT_Z false // Change if Z babysteps should go the other way
#define BABYSTEP_MILLIMETER_UNITS // Specify BABYSTEP_MULTIPLICATOR_(XY|Z) in mm instead of micro-steps
#define BABYSTEP_MULTIPLICATOR_Z 0.01 // (steps or mm) Steps or millimeter distance for each Z babystep
//#define BABYSTEP_MULTIPLICATOR_XY 0.01 // (steps or mm) Steps or millimeter distance for each XY babystep
//#define BABYSTEP_MULTIPLICATOR_XY 10 // (steps or mm) Steps or millimeter distance for each XY babystep
#define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
#if ENABLED(DOUBLECLICK_FOR_Z_BABYSTEPPING)

View File

@@ -984,15 +984,11 @@ void setup() {
#endif
#endif
MYSERIAL0.begin(BAUDRATE);
MYSERIAL0.begin(USB_BAUDRATE);
uint32_t serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#if HAS_MULTI_SERIAL
#if ENABLED(MKS_WIFI)
MYSERIAL1.begin(MKS_WIFI_BAUDRATE);
#else
MYSERIAL1.begin(BAUDRATE);
#endif
serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#endif

View File

@@ -58,6 +58,7 @@ extern uint8_t marlin_debug_flags;
#else
#define SERIAL_OUT(WHAT, V...) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH) (void)MYSERIAL0.WHAT(V); \
if ( serial_port_index) (void)MYSERIAL1.WHAT(V); \
}while(0)
#endif
@@ -81,14 +82,8 @@ extern uint8_t marlin_debug_flags;
#define SERIAL_ECHO(x) SERIAL_OUT(print, x)
#endif
#if ENABLED(MKS_WIFI)
#define SERIAL_ECHO_F(V...) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH ) SERIAL_OUT(print, V); \
if ( serial_port_index) mks_wifi_print_f(V); \
}while(0)
#else
#define SERIAL_ECHO_F(V...) SERIAL_OUT(print, V)
#endif
#if ENABLED(MKS_WIFI)
#define SERIAL_ECHOLN(x) do{ \
if (!serial_port_index || serial_port_index == SERIAL_BOTH ) SERIAL_OUT(println, x); \

View File

@@ -199,8 +199,6 @@ void mks_wifi_start_file_upload(ESP_PROTOC_FRAME *packet){
while(dma_timeout-- > 0){
iwdg_feed();
if(DMA1->ISR & DMA_ISR_TCIF5){
DMA1->IFCR = DMA_IFCR_CGIF5|DMA_IFCR_CTEIF5|DMA_IFCR_CHTIF5|DMA_IFCR_CTCIF5;

View File

@@ -16,15 +16,6 @@ void mks_wifi_print_var(uint8_t count, ...){
va_end(args);
}
void mks_wifi_print_f(float f,uint8_t size){
char str[20];
char format[10];
sprintf(format,"%%0.%df",size);
sprintf(str,format,f);
mks_wifi_out_add((uint8_t *)str, strnlen((char *)str,ESP_PACKET_DATA_MAX_SIZE));
}
// PRINT functions
@@ -97,6 +88,11 @@ void mks_wifi_println(double f){
sprintf(str,"%.2f\n",f);
mks_wifi_out_add((uint8_t *)str, strnlen((char *)str,ESP_PACKET_DATA_MAX_SIZE));
}
/*
void mks_wifi_println(int i){
mks_wifi_println((int32)i);
}
*/
void mks_wifi_println(long int i){
mks_wifi_println((int32)i);
}

View File

@@ -11,8 +11,6 @@
void mks_wifi_print_var(uint8_t count, ...);
void mks_wifi_print_f(float f,uint8_t size);
void mks_wifi_print(const char *s);
void mks_wifi_print(int32 i);
void mks_wifi_print(uint32 i);

View File

@@ -284,8 +284,6 @@ BlTouch
#define MKS_WIFI
#ifdef MKS_WIFI
#define MKS_WIFI_BAUDRATE 115200
#undef PLATFORM_M997_SUPPORT
#define MKS_WIFI_IO0 PA8

View File

@@ -444,7 +444,6 @@ https://easyeda.com/sst78rust/fb4s-led-control
*/
#define MKS_WIFI
#ifdef MKS_WIFI
#define MKS_WIFI_BAUDRATE 115200
#undef PLATFORM_M997_SUPPORT
#define MKS_WIFI_IO0 PC13