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

3.4-rc1: different behaviour for absolute paths in M98

Scheduled Pinned Locked Moved
Beta Firmware
4
7
357
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
    resam
    last edited by 20 Feb 2022, 15:57

    Small call out because I couldn't find anything about it in the changelogs:

    I'm now running Duet 2 with SBC and 3.4-rc1 firmware, DSF, DWC, etc.

    I previously used to call macros and other sys gcode files with M98 P"0:sys/partial-homez.g".

    With 3.4-rc1 this is no longer valid, because apparently the path was not absolute.
    The now valid way of specifying the path is: M98 P"0:/sys/partial-homez.g".

    Not sure if my code just worked by accident in previous versions, or if this is a new change that is not documented yet?

    undefined undefined 2 Replies Last reply 20 Feb 2022, 17:37 Reply Quote 0
    • undefined
      Stephen6309 @resam
      last edited by 20 Feb 2022, 17:37

      @resam I've always had to use a full path, "/macros/PLAOffset", it couldn't find it without the "/macros/" or "/sys/". The 0: hasn't been needed.

      1 Reply Last reply Reply Quote 0
      • undefined
        Phaedrux Moderator @resam
        last edited by 20 Feb 2022, 20:59

        @resam said in 3.4-rc1: different behaviour for absolute paths in M98:

        my code just worked by accident in previous versions

        I think so. P"0:sys/ sticks out to me like a sore thumb. There's a drive call without a slash. 🙊

        Z-Bot CoreXY Build | Thingiverse Profile

        undefined 1 Reply Last reply 20 Feb 2022, 21:14 Reply Quote 0
        • undefined
          resam @Phaedrux
          last edited by 20 Feb 2022, 21:14

          @phaedrux I never thought about it... in my mind the 0: served the same as / to anchor a path to the "root".
          Apparently I just got lucky for the last years. I'm using this on multiple places since at least 2019!

          undefined 1 Reply Last reply 22 Feb 2022, 17:21 Reply Quote 0
          • undefined
            chrishamm administrators @resam
            last edited by 22 Feb 2022, 17:21

            @resam You are right, it should work in SBC mode as well since FatFs supports paths like 0:sys/foobar. I'll fix it in v3.4-rc2.

            Duet software engineer

            undefined 1 Reply Last reply 22 Feb 2022, 19:23 Reply Quote 1
            • undefined
              resam @chrishamm
              last edited by 22 Feb 2022, 19:23

              @chrishamm thanks!

              just a small nitpick: this commit looks like that now the following paths are valid, is this intended, or were you looking for the ? regex operator?

              0:asdf/foobar.bin
              0:/asdf/foobar.bin
              0:///////way/too/many/leading/slashes/foobar.bin

              On second thought, the regex probably doesn't need the /* at all, it's already covered by the second group with .*

              undefined 1 Reply Last reply 22 Feb 2022, 19:26 Reply Quote 0
              • undefined
                chrishamm administrators @resam
                last edited by 22 Feb 2022, 19:26

                @resam It was a shorthand version to ignore double (or even triple) slashes which are also permitted by FatFs, see http://elm-chan.org/fsw/ff/doc/filename.html But I suppose having /?/? instead of /* would also work.

                Duet software engineer

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