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

    DWC Time sync

    Scheduled Pinned Locked Moved
    Firmware developers
    3
    5
    447
    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.
    • Dan_55undefined
      Dan_55
      last edited by

      Hello,

      I want to add an RTC clock to keep track of current time and send the value to Duet every time it is powered on, so that the current date can be displayed on LCD panel without the need for internet connection. My problem is that every time I connect to DWC it automatically overrides the actual date. I would like to change it and create a button for single synchronization event.
      Could you guide me how the sync is done ? Which line of code is responsible for this ? I assume the code is somewhere inside dwc.js file but I can't find it.

      Thanks.

      wilrikerundefined 1 Reply Last reply Reply Quote 0
      • wilrikerundefined
        wilriker @Dan_55
        last edited by

        @dan_55 Look for the rr_connect request. It's one of the two parameters of this request (the other is the password).

        Manuel
        Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
        with probably always latest firmware/DWC (incl. betas or self-compiled)
        My Tool Collection

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

          There is also https://duet3d.dozuki.com/Wiki/Gcode#Section_M905_Set_local_date_and_time.

          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
          • Dan_55undefined
            Dan_55
            last edited by

            @wilriker Thanks ! I will look into that.

            @dc42 Yes, I know but DWC always overrides this value when connecting. It's not a big deal, but it creates a little mess in my code and I'd like to disable it.

            dc42undefined 1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @Dan_55
              last edited by

              @dan_55 said in DWC Time sync:

              @wilriker Thanks ! I will look into that.

              @dc42 Yes, I know but DWC always overrides this value when connecting. It's not a big deal, but it creates a little mess in my code and I'd like to disable it.

              You will need to patch DWC not to set the date/time in rr_connect, whether you use rr_connect or M905 to set the time and date yourself. I am fairly sure that you can just have DWC omit the date/time parameter when it sends the rr_connect request.

              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
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA