From c8f1fbd9d898bb00dc32a7346edeec55348ceed3 Mon Sep 17 00:00:00 2001
From: Dirk Eichel <eichel@bytelink.de>
Date: Tue, 12 Feb 2013 17:35:46 +0100
Subject: [PATCH] Add SD-Card change and SD-Card init.
Add SD-Card change and SD-Card init. for reprap electronics without
SD-Chard change detect pin.
---
Marlin/ultralcd.cpp | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp
index 6176136cd3..31b570ca64 100644
--- a/Marlin/ultralcd.cpp
+++ b/Marlin/ultralcd.cpp
@@ -199,9 +199,15 @@ static void lcd_main_menu()
MENU_ITEM(function, MSG_STOP_PRINT, lcd_sdcard_stop);
}else{
MENU_ITEM(submenu, MSG_CARD_MENU, lcd_sdcard_menu);
+#if SDCARDDETECT < 1
+ MENU_ITEM(gcode, MSG_CNG_SDCARD, PSTR("M21")); // SD-card changed by user
+#endif
}
}else{
MENU_ITEM(submenu, MSG_NO_CARD, lcd_sdcard_menu);
+#if SDCARDDETECT < 1
+ MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually initialize the SD-card via user interface
+#endif
}
#endif
END_MENU();
@@ -516,9 +522,9 @@ static void lcd_control_motion_menu()
MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
MENU_ITEM_EDIT(float51, MSG_ESTEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);
-#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
- MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
-#endif
+#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
+ MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
+#endif
END_MENU();
}
@@ -889,10 +895,10 @@ char *ftostr31(const float &x)
char *ftostr32(const float &x)
{
- long xx=x*100;
+ long xx=x*100;
if (xx >= 0)
- conv[0]=(xx/10000)%10+'0';
- else
+ conv[0]=(xx/10000)%10+'0';
+ else
conv[0]='-';
xx=abs(xx);
conv[1]=(xx/1000)%10+'0';
--
GitLab