Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Reporting Buffer Remaining

    Firmware wishlist
    http rrstatus buffer
    3
    6
    70
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CliveB
      CliveB last edited by

      At present the only way to find out if there is space in the gcode buffer to send another command is by sending a rr_gcode command.

      	NetworkGCodeInput * const httpInput = reprap.GetGCodes().GetHTTPInput();
      	httpInput->Put(HttpMessage, GetKeyValue("gcode"));
      	response->printf("{\"buff\":%u}", httpInput->BufferSpaceLeft());
      

      would it be possible to add the "buff" value into an existing rr_status or to create another one?

      Would the buffer just be read and not otherwise be affected by
      NetworkGCodeInput * const httpInput = reprap.GetGCodes().GetHTTPInput();
      response->printf("{"buff":%u}", httpInput->BufferSpaceLeft());

      I do not wish to move away from a standard build otherwise I would have a go at implementing the idea.

      Thanks

      Retirement: when you work just as hard but without financial reward!
      You only stop learning when the lid is screwed down.
      www.remap.org.uk www.kyaningacdc.org
      Prusa i3 Mk3 - my workhorse

      chrishamm 1 Reply Last reply Reply Quote 0
      • dc42
        dc42 administrators last edited by dc42

        I think it would make more sense to either report the buffer space left in the object model, or change HttpResponder so that if you send an empty command string with rr_gcode, it doesn't try to execute the command but just returns the buffer space. I'll make that second change in the next 3.01-RC release.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • chrishamm
          chrishamm administrators @CliveB last edited by

          @CliveB For now you can send an empty rr_gcode request to get the remaining buffer space, e.g. http://ormerod/rr_gcode?gcode= is sufficient even though it looks a bit odd.

          But I agree it would make more sense to be able to omit the gcode key if it isn't used.

          Duet software engineer

          dc42 CliveB 2 Replies Last reply Reply Quote 0
          • dc42
            dc42 administrators @chrishamm last edited by

            @chrishamm said in Reporting Buffer Remaining:

            @CliveB For now you can send an empty rr_gcode request to get the remaining buffer space, e.g. http://ormerod/rr_gcode?gcode= is sufficient even though it looks a bit odd.

            But I agree it would make more sense to be able to omit the gcode key if it isn't used.

            Currently, that will use up 1 byte of buffer space. I've changed it so that in future it won't. But if the buffer is full, it shouldn't matter anyway, the empty GCode line will get thrown away.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            CliveB 1 Reply Last reply Reply Quote 0
            • CliveB
              CliveB @chrishamm last edited by

              @chrishamm Thank you for the response, it will make life a lot easier

              Retirement: when you work just as hard but without financial reward!
              You only stop learning when the lid is screwed down.
              www.remap.org.uk www.kyaningacdc.org
              Prusa i3 Mk3 - my workhorse

              1 Reply Last reply Reply Quote 0
              • CliveB
                CliveB @dc42 last edited by

                @dc42 Thank you, fully understood and will solve the problem.

                Retirement: when you work just as hard but without financial reward!
                You only stop learning when the lid is screwed down.
                www.remap.org.uk www.kyaningacdc.org
                Prusa i3 Mk3 - my workhorse

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA