Custom M-codes

edited February 2017 in Repetier-Firmware
Hi,

is there a way to replace a mcode in Custom M-codes?

for example M48 is implemented in standard Firmware,
can i replace it in Custom M-code without modifying original parser?

so i think it just depends on the order if custom part is parsed before the standard it should work?
I´m not shure what happens, so i ask

Comments

  • I have uploaded a fix that now checks first for custom codes and only tests own codes if false is returned. I think that is the more flexible solution.
  • OK, so if i have M48 in custom code  it will execute it and not the M48 in Commands::processMCode(GCode *com) ?
  • WIth that change yes. But you need to return true for executed codes or it will executed twice.
  • You see it's now

    void Commands::processMCode(GCode *com) {
        if(EVENT_UNHANDLED_M_CODE(com))
            return;


  • ok, as i saw its same for processGcode  , nice :-)  makes Custom events even more attractive
Sign In or Register to comment.