Skip to content

Implement M119: Get Endstop Status #72

@Wallacoloo

Description

@Wallacoloo

J.S. sent me the following code for his M119 implementation (in state.h):

} else if (cmd.isM119()) { //output endstop status
        LOGW("Warning (state.h): OP_M119 (output endstop status) not implemented\n");
        std::string msgTRIGGERED = "TRIGGERED";
        std::string msgOPEN = "open";
        return gparse::Response(gparse::ResponseOk,
            "Reporting endstop status x_min:" + ((driver.endstopHit(0) == true ) ? msgTRIGGERED : msgOPEN ) +
            " y_min:" + ((driver.endstopHit(1) == true ) ? msgTRIGGERED : msgOPEN ) +
            " z_min:" + ((driver.endstopHit(2) == true ) ? msgTRIGGERED : msgOPEN )  );

It shouldn't be too difficult to get this to compile with the current devel version / machines.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions