Hello everybody,
I'm trying to create a custom set of gcode commands.
To do this I decided for instance to use the letter 'K'. SO my point is to use the letter K as the letter M.
Let's say I want to turn the fan on with the command K1 and turn it off with k2.
Basically I add a method in the gcode.h that I called "hasK" just following the repetier firmware implementation.
In gcode.cpp I add little piece of code in the functions:
-
void GCode::printCommand()
-
bool GCode::parseBinary
-
bool GCode::parseAscii
I marked the lines I added with " !!!!!!!!!!!! " so it is easy to find.
Then I added a which case inside the function void Commands::executeGCode
I'm able to compile this code on my megatronics V3 and run repetier host, but unfortunately the "K" case is not working.
Worst I can NOT use any gcode command that is write after this branch of the "else if".
I'm sure there is something wrong with the communication protocol but I can figure it out.
I attached the modified files. The original firmware version is the 0.95F on [
www.repetier.com]
Is this clear?
Anybody could help???
Thanks ^_^