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

    M291 T value to return a result

    Scheduled Pinned Locked Moved
    Firmware wishlist
    3
    4
    303
    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.
    • moth4017undefined
      moth4017
      last edited by moth4017

      When using the M291 with a T value for time out , i carnt seem to capture this event .

      M291 R"Do you want to Run G29" P"your choice" S4 T5 J1 K{"Yes", "Reuse height map" ,"clear heightMap"} F5
          if input = 0
              echo input
              G29    ; use saved height map
          elif input = 1
              echo input
              G29 S1 P"/sys/heightmap.csv"; load previous height map   
          elif input = 2
              echo input
              G29 S2 ; clear height map
          else 
              echo "no selection pressed" ;G29 S1 ; load previous height map 
              echo input
      

      selection 1 returns this:-
      8/31/2024, 4:02:19 PM M292 R{1} S21
      1
      time ouit selection nothing returned

      <

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

        @moth4017 I think this is related to https://github.com/Duet3D/RepRapFirmware/issues/959. Timing out is equivalent to pressing the Cancel button, if there is one.

        benagricola created this issue in Duet3D/RepRapFirmware

        closed [FeatureRequest]: Allow `M291` to set `result` to `-1` when blocking modal "Cancel" clicked. #959

        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

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

          @dc42

          have i done this correctly to capture the "Time out"

          M291 R"Do you want to Run G29" P"your choice" S4 T5 J2 K{"Yes", "Reuse height map" ,"clear heightMap"} F5
              if input = 0
                  echo input
                  G29    ; use saved height map
              elif input = 1
                  echo input
                  G29 S1 P"/sys/heightmap.csv"; load previous height map   
              elif input = 2
                  echo input
                  G29 S2 ; clear height map
              elif input = -1 
                  echo "no selection pressed" ;G29 S1 ; load previous height map 
                  echo input
          

          <

          gloomyandyundefined 1 Reply Last reply Reply Quote 0
          • gloomyandyundefined
            gloomyandy @moth4017
            last edited by

            @moth4017 What you are seeing is the current expected behaviour, there is a feature request to change this, but I do not think it has been implemented yet (or if there is any commitment to implement it).

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