Duet3D Logo

    Duet3D

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

    Solved (C++ question) wait for connected state

    PanelDue
    2
    3
    62
    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.
    • oozeBot
      oozeBot last edited by oozeBot

      Does anyone have any examples of a non-blocking loop that could be implemented on the PanelDue to wait until it has exited the "connecting" status? There are some setup items we want to add that are dependent on knowing if the printer is in an "off" status.

      primitive example:

      OM::PrinterStatus status = GetStatus();
      while (status == OM::PrinterStatus::connecting)
           {
           // Non-blocking code here
           OM::PrinterStatus status = GetStatus();
           }
      carry on..
      

      Thanks

      1 Reply Last reply Reply Quote 0
      • mfs12
        mfs12 last edited by mfs12

        the architecture of paneldue is rather "stateless". it is a more or less passive device which shows only the status of the printer.

        if you want to do something like that you need to build a state machine for that.

        Visit me on github at https://github.com/mfs12/

        1 Reply Last reply Reply Quote 0
        • oozeBot
          oozeBot last edited by oozeBot

          Was afraid of that.. and certainly don't want to reinvent the wheel for something trivial. I was able to get it worked out another way. Thanks

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