Add reversing motor direction flag for mirrored axis steppers in next Release (MPCNC and similar)

Greetings,

I am building a MPCNC and since i like Repetier-Firmware I am setting it up in that.
I am mirroring the X-axis to the E0 exturder, but realized there is no invert dir flag for the mirrored motor.
The physical fix is to just rewire the motors, but I like to keep wiring consistent and do the flips in software.
So i just added my changes to printer.h to invert the dir for that motor.

1.)  Would it be better to add some additional compile flags to the configuration?
2.)  Is simple gantry Cartesian with dual axis motors something repetier-firmware community is pursuing?  Is this something already done and I am to dense to find it?

Adding to this:
Also the point of having two motors on a Cartesian is to fix racking with two end stops and some differential stepping. 
But i do not see where end stops can be configured for the mirrored axis motor.
(Similar to a delta tower offset.)
From my limited view, it looks like mirror just mirrors. 
Where Dual adds additional end stop checking (which would be necessary to do all that dual extrude magic).

I had to manually change this in printer.h:
/** Change to invert second axis motor */    static INLINE void setXDirection(bool positive)    {        if(positive)        {            WRITE(X_DIR_PIN,!INVERT_X_DIR);#if FEATURE_TWO_XSTEPPER || DUAL_X_AXIS            WRITE(X2_DIR_PIN,INVERT_X_DIR);#endif        }        else        {            WRITE(X_DIR_PIN,INVERT_X_DIR);#if FEATURE_TWO_XSTEPPER || DUAL_X_AXIS            WRITE(X2_DIR_PIN,!INVERT_X_DIR);#endif        }    }



Comments

  • Just tested with dev version and there is a invert flag. Select mirror x motor and you see an entry
    "Invert direction of 2nd motor(INVERT_X2_DIR)"

    so it is already included.
  • I have started to play with the dev code since it is more set up for CnC use.  Should have checked the readme on Github.

    Thanks for the info.
Sign In or Register to comment.