Skip to content

Response to gcode commands is not displayed in gcode console #5

Open

Description

@dc42

If a command is sent on the Gcode Console page, and that command returns a non-trivial response (e.g. M114, M119) then the response is not displayed.

To fix this, we need to capture and store the last non-json response received from the host, and have rr_reply return that response. We also need to indicate in the rr_status reply whether or not a new response is available, by adding the 'seq' variable and incrementing it every time a new non-json response (other than "OK") is received.

Activity

  1. toxuin commented on Dec 17, 2015

    @toxuin
    Owner

    this is not trivial to solve, but possible.
    Since Repetier firmware does not store last response and has little RAM - I did not add "seq" field to it. The only way (and the proper way) of doing this is to store the last gcode response on ESP8266 (which is already done) and somehow notify the web interface that the contents has changed (like a replacement to "seq" mechanics). I don't think it would be wize to gut the JSON response and add fields to it on the microcontroller. There is another way that involves little more coding: web interface currently has "compat mode" where it knows that it is not connected to a RepRapFirmware ( = Repetier currently). My point is - we could add a check to web interface that if it is in compat mode - don't look for "seq", just send rr_reply request over and over certain timeout. This was the plan to implement after transitioning to Duet Web Control 1.07 (which is happening in dwc107 branch). If you have another ideas how to make this work (properly :-D ) please let me know.

  2. dc42 commented on Dec 18, 2015

    @dc42
    Author

    A problem I can see with what you propose is that unless the web interface sends rr_reply requests very frequently, responses may be lost. They can already be lost if the host electronics generates responses faster than the polling interval. It seems much easier to me to patch the 'seq' field into the response from M408.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions