|
@@ -140,6 +140,11 @@
|
|
|
#define PRINTING_TYPE_SD 0
|
|
|
#define PRINTING_TYPE_USB 1
|
|
|
|
|
|
+//filament types
|
|
|
+#define FILAMENT_DEFAULT 0
|
|
|
+#define FILAMENT_FLEX 1
|
|
|
+#define FILAMENT_PVA 2
|
|
|
+
|
|
|
// look here for descriptions of G-codes: http://linuxcnc.org/handbook/gcode/g-code.html
|
|
|
// http://objects.reprap.org/wiki/Mendel_User_Manual:_RepRapGCodes
|
|
|
|
|
@@ -6289,6 +6294,29 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
+ case 403: //M403 set filament type (material) for particular extruder and send this information to mmu
|
|
|
+ {
|
|
|
+ //currently three different materials are needed (default, flex and PVA)
|
|
|
+ //add storing this information for different load/unload profiles etc. in the future
|
|
|
+ //firmware does not wait for "ok" from mmu
|
|
|
+
|
|
|
+ uint8_t extruder;
|
|
|
+ uint8_t filament;
|
|
|
+
|
|
|
+ if(code_seen('E')) extruder = code_value();
|
|
|
+ if(code_seen('F')) filament = code_value();
|
|
|
+
|
|
|
+ printf_P(PSTR("Extruder: %d; "), extruder);
|
|
|
+ switch (filament) {
|
|
|
+ case FILAMENT_FLEX: printf_P(PSTR("Flex\n")); break;
|
|
|
+ case FILAMENT_PVA: printf_P(PSTR("PVA\n")); break;
|
|
|
+ default: printf_P(PSTR("Default\n")); break;
|
|
|
+ }
|
|
|
+ printf_P(PSTR("F%d%d\n"), extruder, filament);
|
|
|
+ fprintf_P(uart2io, PSTR("F%d%d\n"), extruder, filament);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+
|
|
|
case 500: // M500 Store settings in EEPROM
|
|
|
{
|
|
|
Config_StoreSettings(EEPROM_OFFSET);
|