mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2026-01-04 05:40:31 -07:00
Pass file name to export function
This commit is contained in:
parent
75e78ef20d
commit
81d7e39660
3 changed files with 7 additions and 3 deletions
|
|
@ -1960,8 +1960,8 @@ uint8_t expand_u8str_P(char * const outstr, PGM_P const ptpl, const int8_t ind,
|
|||
}
|
||||
#endif
|
||||
#if ENABLED(EXPORT_SETTINGS)
|
||||
void MarlinUI::export_settings() {
|
||||
if (sr_file_open("M503.gc")) {
|
||||
void MarlinUI::export_settings(const char* filename) {
|
||||
if (sr_file_open(filename)) {
|
||||
settings.report(true);
|
||||
completion_feedback(sr_file_close() && sr_write_res != -1);
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -784,6 +784,10 @@ public:
|
|||
static void export_settings();
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXPORT_SETTINGS)
|
||||
static void export_settings(const char* filename);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Special handling if a move is underway
|
||||
//
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ void menu_advanced_settings() {
|
|||
#endif
|
||||
|
||||
#if ENABLED(EXPORT_SETTINGS)
|
||||
ACTION_ITEM(MSG_EXPORT_SETTINGS, ui.export_settings);
|
||||
ACTION_ITEM(MSG_EXPORT_SETTINGS, []{ui.export_settings("M503.GC");});
|
||||
#endif
|
||||
|
||||
END_MENU();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue