Обновление кода
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
#include "mks_test_sdio.h"
|
||||
|
||||
#include "../../MarlinCore.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../libs/Segger/log.h"
|
||||
#include "../../sd/cardreader.h"
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
|
||||
void mks_test_sdio(void){
|
||||
uint8_t data[512];
|
||||
CardReader::mount();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef MKS_WIFI_SDIOTEST_H
|
||||
#define MKS_WIFI_SDIOTEST_H
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
void mks_test_sdio(void);
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "mks_wifi.h"
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
|
||||
#include "../../lcd/ultralcd.h"
|
||||
#include "mks_wifi_sd.h"
|
||||
#include "mks_test_sdio.h"
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
|
||||
#define MKS_OUT_BUFF_SIZE (ESP_PACKET_DATA_MAX_SIZE)
|
||||
#define MKS_IN_BUFF_SIZE (ESP_PACKET_DATA_MAX_SIZE + 30)
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
#include "mks_wifi_gcodes.h"
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
|
||||
const uint8_t pak[5]={0xA5,0x07,0x00,0x00,0xFC};
|
||||
|
||||
const char m997_idle[]="M997 IDLE\n";
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#ifndef MKS_WIFI_GCODES_H
|
||||
#define MKS_WIFI_GCODES_H
|
||||
|
||||
@@ -10,7 +9,6 @@
|
||||
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
|
||||
void mks_m991(void);
|
||||
void mks_m997(void);
|
||||
void mks_m115(void);
|
||||
|
||||
@@ -118,9 +118,8 @@ void mks_wifi_start_file_upload(ESP_PROTOC_FRAME *packet){
|
||||
|
||||
thermalManager.setTargetBed(0);
|
||||
thermalManager.setTargetHotend(0,0);
|
||||
thermalManager.manage_heater();
|
||||
OUT_WRITE(HEATER_1_PIN,HIGH);
|
||||
//safe_delay(10);
|
||||
|
||||
//Установить имя файла. Смещение на 3 байта, чтобы добавить путь к диску
|
||||
file_name[0]='0';
|
||||
file_name[1]=':';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#ifdef MKS_WIFI
|
||||
|
||||
#ifndef MKS_WIFI_SETTINGS_H
|
||||
#define MKS_WIFI_SETTINGS_H
|
||||
|
||||
@@ -9,5 +7,3 @@
|
||||
#define MKS_WIFI_KEY "password"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,8 @@
|
||||
#include "../../lcd/tft/tft.h"
|
||||
#include "../../lcd/tft/tft_color.h"
|
||||
#include "../../lcd/ultralcd.h"
|
||||
#include "../temperature.h"
|
||||
|
||||
|
||||
extern TFT tft;
|
||||
char str[100];
|
||||
@@ -14,6 +16,11 @@ void mks_update_status(char *filename,uint32_t current_filesize, uint32_t file_s
|
||||
static uint32_t last_value = 200;
|
||||
uint32_t percent_done;
|
||||
uint16_t width;
|
||||
|
||||
thermalManager.setTargetBed(0);
|
||||
thermalManager.setTargetHotend(0,0);
|
||||
OUT_WRITE(HEATER_1_PIN,HIGH);
|
||||
thermalManager.manage_heater();
|
||||
|
||||
//При расчете процентов размер файла превышает максимум для uint32_t
|
||||
if(current_filesize >= (UINT32_MAX/100) ){
|
||||
@@ -40,6 +47,7 @@ void mks_update_status(char *filename,uint32_t current_filesize, uint32_t file_s
|
||||
|
||||
tft.queue.sync();
|
||||
last_value = percent_done;
|
||||
ui.update();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1836,4 +1836,4 @@ typedef struct
|
||||
#define SPI_CRCPR_CRCPOLY SPI_CRCPR_CRCPOLY_Msk /*!< CRC polynomial register */
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user