Prusa MINI Firmware overview
|
#include "gui.h"
#include "dbg.h"
#include "window_file_list.h"
#include "window_header.h"
#include "config.h"
#include "stdlib.h"
#include "usb_host.h"
#include "cmsis_os.h"
#include "marlin_client.h"
#include "screen_print_preview.h"
#include "screen_printing.h"
#include "print_utils.h"
#include "../Marlin/src/sd/cardreader.h"
#include "../Marlin/src/gcode/queue.h"
#include "../Marlin/src/gcode/lcd/M73_PE.h"
◆ MAXPATHNAMELENGTH
◆ LOG_ERROR
#define LOG_ERROR |
( |
|
... | ) |
_dbg3("FILEBROWSER ERROR: " __VA_ARGS__) |
◆ pd
◆ screen_filebrowser_init()
◆ screen_filebrowser_done()
◆ screen_filebrowser_draw()
◆ on_print_preview_action()
◆ screen_filebrowser_event()
106 if (!strcmp(file_item->
fname,
"..") && !strcmp(filelist->
altpath,
"/")) {
112 if (strcmp(file_item->
fname,
"..")) {
118 size_t len = strlen(filelist->
altpath);
119 if (filelist->
altpath[len - 1] !=
'/') {
120 filelist->
altpath[len++] =
'/';
122 strcpy(filelist->
altpath + len, file_item->altname[0] == 0 ? file_item->
fname : file_item->altname);
126 char *last = strrchr(filelist->
altpath,
'/');
127 if (last == filelist->
altpath) {
142 if (!strcmp(filelist->
altpath,
"/"))
144 "/%s", file_item->altname);
147 "%s/%s", filelist->
altpath, file_item->altname);
150 LOG_ERROR(
"failed to prepare file path for print");
◆ screen_filebrowser_sort
◆ filters
const char* filters[] = { "*.gcode", "*.gco", "*.g" } |
|
static |
◆ filt_cnt
◆ screen_filebrowser
◆ pscreen_filebrowser
Definition: screen_print_preview.h:10
void print_begin(const char *filename)
Definition: print_utils.cpp:6
#define IDR_PNG_filescreen_icon_folder
Definition: resource.h:41
BYTE fattrib
Definition: ff.h:201
void window_file_list_load(window_file_list_t *window, const char **filters, size_t filters_cnt, WF_Sort_t sort)
Definition: window_file_list.c:63
Definition: screen_filebrowser.cpp:31
#define pd
Definition: screen_filebrowser.cpp:39
static void screen_filebrowser_init(screen_t *screen)
Definition: screen_filebrowser.cpp:47
char screen_printing_file_path[_MAX_LFN+2]
Definition: screen_printing.cpp:165
static rect_ui16_t rect_ui16(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
Definition: guitypes.h:159
const char * screen_print_preview_get_gcode_filepath()
Definition: screen_print_preview.c:85
void window_destroy(int16_t id)
Definition: window.c:132
char altpath[F_MAXPATHNAMELENGTH - 12]
Definition: window_file_list.h:73
static void screen_filebrowser_draw(screen_t *screen)
Definition: screen_filebrowser.cpp:76
char screen_printing_file_name[_MAX_LFN+1]
Definition: screen_printing.cpp:164
void screen_print_preview_set_gcode_filename(const char *fname)
Definition: screen_print_preview.c:89
void screen_open(int16_t screen_id)
Definition: screen.c:62
static void on_print_preview_action(print_preview_action_t action)
Definition: screen_filebrowser.cpp:78
void screen_close(void)
Definition: screen.c:80
Definition: screen_print_preview.h:9
void window_disable(int16_t id)
Definition: window.c:523
void window_set_text(int16_t id, const char *text)
Definition: window.c:340
static void screen_filebrowser_done(_screen_t *screen)
Definition: screen_filebrowser.cpp:72
screen_t * pscreen_printing
Definition: screen_printing.cpp:161
#define WINDOW_CLS_FRAME
Definition: window.h:9
static int screen_filebrowser_event(screen_t *screen, window_t *window, uint8_t event, void *param)
Definition: screen_filebrowser.cpp:89
void window_set_focus(int16_t id)
Definition: window.c:480
static const size_t filt_cnt
Definition: screen_filebrowser.cpp:45
void screen_print_preview_set_gcode_filepath(const char *fpath)
Definition: screen_print_preview.c:81
FILINFO file_items[SDSORT_LIMIT]
Definition: window_file_list.h:74
TCHAR fname[13]
Definition: ff.h:206
void screen_print_preview_set_on_action(print_preview_action_handler_t handler)
Definition: screen_print_preview.c:93
#define AM_DIR
Definition: ff.h:354
static WF_Sort_t screen_filebrowser_sort
Definition: screen_filebrowser.cpp:42
#define WINDOW_EVENT_CLICK
Definition: window.h:46
int16_t WINDOW_CLS_FILE_LIST
Definition: window_file_list.c:24
#define MAXPATHNAMELENGTH
Definition: screen_filebrowser.cpp:26
int16_t window_create_ptr(int16_t cls_id, int16_t id_parent, rect_ui16_t rect, void *ptr)
Definition: window.c:102
int16_t id
Definition: screen.h:19
void window_file_set_item_index(window_file_list_t *window, int index)
Definition: window_file_list.c:118
#define MARLIN_EVT_MediaRemoved
Definition: marlin_events.h:13
static const char * filters[]
Definition: screen_filebrowser.cpp:44
#define LOG_ERROR(...)
Definition: screen_filebrowser.cpp:29
Definition: window_file_list.h:62
screen_t *const pscreen_print_preview
Definition: screen_print_preview.c:77
int marlin_event_clr(uint8_t evt_id)
Definition: marlin_client.c:252