mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 08:08:25 +00:00
🐛 Fix LVGL / MKS WiFi long filename (#25483)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
88da531e5d
commit
d0669527c4
5 changed files with 472 additions and 449 deletions
|
@ -298,10 +298,8 @@ void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv
|
|||
W25QXX.init(SPI_QUARTER_SPEED);
|
||||
}
|
||||
|
||||
#define TICK_CYCLE 1
|
||||
|
||||
uint16_t getTickDiff(uint16_t curTick, uint16_t lastTick) {
|
||||
return TICK_CYCLE * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick));
|
||||
uint16_t getTickDiff(const uint16_t curTick, const uint16_t lastTick) {
|
||||
return (TICK_CYCLE) * (lastTick <= curTick ? (curTick - lastTick) : (0xFFFFFFFF - lastTick + curTick));
|
||||
}
|
||||
|
||||
static bool get_point(int16_t *x, int16_t *y) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -163,8 +163,8 @@ typedef struct {
|
|||
//uint8_t uartTxBuffer[UART_FIFO_BUFFER_SIZE];
|
||||
} SZ_USART_FIFO;
|
||||
|
||||
#define WIFI_GCODE_BUFFER_LEAST_SIZE 96
|
||||
#define WIFI_GCODE_BUFFER_SIZE (WIFI_GCODE_BUFFER_LEAST_SIZE * 3)
|
||||
#define WIFI_GCODE_BUFFER_LEAST_SIZE 96
|
||||
#define WIFI_GCODE_BUFFER_SIZE (WIFI_GCODE_BUFFER_LEAST_SIZE * 3)
|
||||
typedef struct {
|
||||
uint8_t wait_tick;
|
||||
uint8_t Buffer[WIFI_GCODE_BUFFER_SIZE];
|
||||
|
@ -179,14 +179,14 @@ extern CLOUD_PARA cloud_para;
|
|||
|
||||
extern WIFI_GCODE_BUFFER espGcodeFifo;
|
||||
|
||||
uint32_t getWifiTick();
|
||||
uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick);
|
||||
millis_t getWifiTick();
|
||||
millis_t getWifiTickDiff(const millis_t lastTick, const millis_t curTick);
|
||||
|
||||
void mks_esp_wifi_init();
|
||||
extern int cfg_cloud_flag;
|
||||
int send_to_wifi(uint8_t *buf, int len);
|
||||
int send_to_wifi(uint8_t * const buf, const int len);
|
||||
void wifi_looping();
|
||||
int raw_send_to_wifi(uint8_t *buf, int len);
|
||||
int raw_send_to_wifi(uint8_t * const buf, const int len);
|
||||
int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len);
|
||||
void get_wifi_list_command_send();
|
||||
void get_wifi_commands();
|
||||
|
|
|
@ -38,10 +38,8 @@
|
|||
|
||||
extern SZ_USART_FIFO WifiRxFifo;
|
||||
|
||||
extern int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len);
|
||||
extern int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len);
|
||||
void esp_port_begin(uint8_t interrupt);
|
||||
void wifi_delay(int n);
|
||||
void wifi_delay(const uint16_t n);
|
||||
|
||||
#define ARRAY_SIZE(a) sizeof(a) / sizeof((a)[0])
|
||||
|
||||
|
@ -246,7 +244,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t
|
|||
|
||||
const size_t headerLength = 8;
|
||||
|
||||
uint32_t startTime = getWifiTick();
|
||||
const millis_t startTime = getWifiTick();
|
||||
uint8_t hdr[headerLength];
|
||||
uint16_t hdrIdx = 0;
|
||||
|
||||
|
|
|
@ -59,8 +59,8 @@ typedef struct {
|
|||
UploadState state;
|
||||
uint32_t retriesPerBaudRate;
|
||||
uint32_t connectAttemptNumber;
|
||||
uint32_t lastAttemptTime;
|
||||
uint32_t lastResetTime;
|
||||
millis_t lastAttemptTime;
|
||||
millis_t lastResetTime;
|
||||
uint32_t uploadBlockNumber;
|
||||
uint32_t uploadNextPercentToReport;
|
||||
EspUploadResult uploadResult;
|
||||
|
|
Loading…
Reference in a new issue