Fix ExtUI SD sorting, compile issues

This commit is contained in:
Marcio Teixeira 2020-09-08 14:31:20 -06:00 committed by Scott Lahteine
parent 006b7f3f17
commit 328d8b5952
3 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,8 @@
* *
*/ */
#ifdef __STM32F1__
#include "../../inc/MarlinConfigPre.h" #include "../../inc/MarlinConfigPre.h"
#include "MarlinSerial.h" #include "MarlinSerial.h"
#include <libmaple/usart.h> #include <libmaple/usart.h>
@ -91,3 +93,5 @@ static inline __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb
#if SERIAL_PORT == 5 || SERIAL_PORT_2 == 5 || DGUS_SERIAL_PORT == 5 #if SERIAL_PORT == 5 || SERIAL_PORT_2 == 5 || DGUS_SERIAL_PORT == 5
DEFINE_HWSERIAL_UART_MARLIN(MSerial5, 5); DEFINE_HWSERIAL_UART_MARLIN(MSerial5, 5);
#endif #endif
#endif // __STM32F1__

View File

@ -61,7 +61,7 @@ namespace ExtUI {
if (AT_SCREEN(StatusScreen) || isPrintingFromMedia()) if (AT_SCREEN(StatusScreen) || isPrintingFromMedia())
StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED)); StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen) if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
} }
void onMediaError() { void onMediaError() {

View File

@ -1003,7 +1003,7 @@ namespace ExtUI {
bool FileList::seek(const uint16_t pos, const bool skip_range_check) { bool FileList::seek(const uint16_t pos, const bool skip_range_check) {
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
if (!skip_range_check && (pos + 1) > count()) return false; if (!skip_range_check && (pos + 1) > count()) return false;
card.getfilename_sorted(pos); card.getfilename_sorted(SD_ORDER(pos, count()));
return card.filename[0] != '\0'; return card.filename[0] != '\0';
#else #else
UNUSED(pos); UNUSED(pos);