MKFirmware / MK4duo

MK4duo Firmware Printers 3D for Arduino and Arduino due
http://www.marlinkimbra.it
GNU General Public License v3.0
206 stars 117 forks source link

Extruder/Laser/CNC selection #119

Closed chromvis closed 7 years ago

chromvis commented 7 years ago

I may be doing something wrong, but I could not get laser to work with MK4duo, it perfectly working with buildlog-lasercutter-marlin though. If I set "#define EXTRUDERS 0" in cinfig.basic.h - I am getting compilation error, But, If it is not zero the system could not go to Laser (or CNC) mode because of the following code in MK_main.cpp image

(lines 75 - 83 in MK_main.cpp) How anyone overcome this?

MagoKimbra commented 7 years ago

Why? If you enable LASERBEAM printer_mode = PRINTER_MODE_FFF, and with M450-M451-M452 you must change mode... The extruder must set min 1 because the base it is a printer 3d...

chromvis commented 7 years ago

Again, I may be wrong, or do not understand correctly how "if ... elif.." works, but if the first condition is TRUE (#if EXTRUDERS > 0) than it will never check next #elif statement. The first TRUE statement send program pointer to #endif. I.e. as far as EXTERUDERS > 0 system will never check if LASERBEAM is enabled or not.

if ... #elif ... #elif ... construction return only one, the very first TRUE statement

Sorry for my misunderstanding, but could you please explain where I am wrong?

chromvis commented 7 years ago

This configuration in MK_Main.cpp should work. I will check today. image