• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Modify Duet Web Control

Scheduled Pinned Locked Moved
Firmware installation
3
6
2.5k
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.
  • undefined
    blandified
    last edited by 7 Mar 2018, 04:44

    Hey all!

    So we have everything set up now and have used the Duet Web Control (DWC) to send gcode commands and gcode files to the Duet.

    We plan on using the DWC but we would like to simplify the design quite a bit. For example, we want to take out the central "Head movement" spot to clean things up so that the user can have a simplified version of the interface.

    I am assuming we would need to modify the source code and recompile? Looking for some info on this, thank you in advance!

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 7 Mar 2018, 09:16

      You can find DWC at https://github.com/chrishamm/DuetWebControl. It's all written in html, Javascript and css. Most of the files are compressed using gzip for better loading speed, but you can use uncompressed files too

      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
      • undefined
        blandified
        last edited by 7 Mar 2018, 21:22

        @dc42:

        You can find DWC at https://github.com/chrishamm/DuetWebControl. It's all written in html, Javascript and css. Most of the files are compressed using gzip for better loading speed, but you can use uncompressed files too

        Thank you!

        If I wanted to edit in an IDE and remove the section I mentioned, the big block in the DWC that is the x-100, x-10, x-1 etc, where would I start?

        1 Reply Last reply Reply Quote 0
        • undefined
          Danal
          last edited by 7 Mar 2018, 21:35

          I've recently done some mods to DWC.

          I'd recommend the following:

          1. Clone the github repository, and/or download it. The whole thing.

          2. You will find that if you go into the "Core" directory and launch the "reprap.htm" page, it will run from your local file system, WITHOUT doing any of the build scripts, and without having to mess with any of the zip or gz files. Everything works in this mode, with the single exception of language support.

          3. I highly, highly, highly recommend chrome, no matter what you use on a regular basis, because of its developer support. So I am going to assume that you use it.

          4. In chrome, press F12, and then select "sources". The two tabs "sources" and "console" will represent 90% of what you want.

          Beyond that, open the files in your favorite editor (sublime text for me, even though it does cost money, it is worth it), make changes, and refresh the browser.

          As for your specific request, most of your editing will be in the repreap.htm file, with some in the various JS files (because things may break in the javascript when certain parts of the html are removed).

          Those are my techniques for changing DWC. What the above is not is any kind of guide to html or javascript programming. That's WAY beyond forum comments. 🙂

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 1
          • undefined
            Danal
            last edited by 7 Mar 2018, 21:41

            Also, to your original question, there is no "recompile". Using the above, just change an html or js file in the editor, save it, refresh the browser.

            When all your mods are finished, you may wish to compress and zip up YOUR version and put it on your Duet. You don't have to… it runs fine from a local PC file system. If you wish to put it on a duet, you can:

            1. Follow the build scripts, which only run on Linux (not even a Mac!!). Then upload the resulting zip via DWC's standard upload.

            2. Do the rough equivalent of the build scripts by hand. That is, compress and zip and gzip things. Personally, I'd skip all the minifiy stuff if I was the only person using it. Again, upload via DWC.

            3. Don't even compress or anything, just load your files "as is" to the Duet SD. If you do this, there is one quirk to know about: If Duet sees a given file, say "reprap.htm" and the gzipped version of that same file, say "reprap.htm.gz", it will use the .gz. The easiest way round this is to put the SD card in a PC/Mac and completely clean out the /www directory, then put your files in /www.

            Any of these three will work fine. I've done them all and verified that they work.

            Delta / Kossel printer fanatic

            1 Reply Last reply Reply Quote 0
            • undefined
              blandified
              last edited by 7 Mar 2018, 21:56

              @Danal:

              Also, to your original question, there is no "recompile". Using the above, just change an html or js file in the editor, save it, refresh the browser.

              When all your mods are finished, you may wish to compress and zip up YOUR version and put it on your Duet. You don't have to… it runs fine from a local PC file system. If you wish to put it on a duet, you can:

              1. Follow the build scripts, which only run on Linux (not even a Mac!!). Then upload the resulting zip via DWC's standard upload.

              2. Do the rough equivalent of the build scripts by hand. That is, compress and zip and gzip things. Personally, I'd skip all the minifiy stuff if I was the only person using it. Again, upload via DWC.

              3. Don't even compress or anything, just load your files "as is" to the Duet SD. If you do this, there is one quirk to know about: If Duet sees a given file, say "reprap.htm" and the gzipped version of that same file, say "reprap.htm.gz", it will use the .gz. The easiest way round this is to put the SD card in a PC/Mac and completely clean out the /www directory, then put your files in /www.

              Any of these three will work fine. I've done them all and verified that they work.

              Dude, I can't believe how helpful this is!! You're amazing!! Thank you so much, this is exactly what I am looking for.

              The way our project is set up, we don't have physical access to all our gear (duet, rpi, etc) during the week since it stays in the boss-man's office, so that's why I spend all week asking questions, so when we meet in our weekly meeting we are ready and raring to go lol.

              This is such a great few posts, thanks again!

              1 Reply Last reply Reply Quote 1
              5 out of 6
              • First post
                5/6
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA