Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Feature Requests
  3. voxl-send-command exit status implementation request

voxl-send-command exit status implementation request

Scheduled Pinned Locked Moved Unsolved Feature Requests
4 Posts 2 Posters 2.3k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jameskuesel
    Contributor
    wrote on last edited by jameskuesel
    #1

    Super super low priority but I noticed that voxl-send-command doesn't output a return code. Even on an error can look like a success since echo will return exit status 0. This is particularly frustrating when an error does actually occur.

    https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/scripts/voxl-send-command?ref_type=heads

    Here is a fix below:

    if [ -p "/run/mpa/${1}/control" ]; then
        _CONTROL_FILE="/run/mpa/${1}/control"
        shift
        echo "$@" >> "$_CONTROL_FILE"
        echo "Successfully sent command to ${_CONTROL_FILE}"
        exit 0
    
    elif [ -p "${1}/control" ]; then
        _CONTROL_FILE="${1}/control"
        shift
        echo "$@" >> "$_CONTROL_FILE"
        echo "Successfully sent command to ${_CONTROL_FILE}"
        exit 0
    else
        echo "Unable to find valid pipe that accepts control commands at: ${1}"
        exit 1
    fi
    
    
    

    Would love to see an update here!

    Also side note: Let me know if this is the proper channel so submit code issues like these.

    Eric KatzfeyE 1 Reply Last reply
    0
    • J jameskuesel

      Super super low priority but I noticed that voxl-send-command doesn't output a return code. Even on an error can look like a success since echo will return exit status 0. This is particularly frustrating when an error does actually occur.

      https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/blob/master/scripts/voxl-send-command?ref_type=heads

      Here is a fix below:

      if [ -p "/run/mpa/${1}/control" ]; then
          _CONTROL_FILE="/run/mpa/${1}/control"
          shift
          echo "$@" >> "$_CONTROL_FILE"
          echo "Successfully sent command to ${_CONTROL_FILE}"
          exit 0
      
      elif [ -p "${1}/control" ]; then
          _CONTROL_FILE="${1}/control"
          shift
          echo "$@" >> "$_CONTROL_FILE"
          echo "Successfully sent command to ${_CONTROL_FILE}"
          exit 0
      else
          echo "Unable to find valid pipe that accepts control commands at: ${1}"
          exit 1
      fi
      
      
      

      Would love to see an update here!

      Also side note: Let me know if this is the proper channel so submit code issues like these.

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      @jameskuesel Feel free to make the change and submit a PR

      J 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @jameskuesel Feel free to make the change and submit a PR

        J Offline
        J Offline
        jameskuesel
        Contributor
        wrote on last edited by
        #3

        @Eric-Katzfey

        Sorry my bad! Done!

        Eric KatzfeyE 1 Reply Last reply
        0
        • J jameskuesel

          @Eric-Katzfey

          Sorry my bad! Done!

          Eric KatzfeyE Offline
          Eric KatzfeyE Offline
          Eric Katzfey
          ModalAI Team
          wrote on last edited by
          #4

          @jameskuesel Thanks! Merged

          1 Reply Last reply
          0

          Reading along? Create a free ModalAI Forum account to join in.

          With an account you can reply, ask your own question, get an email when a ModalAI engineer answers, and mark the reply that solved it. Your place in each thread is saved between visits.

          Questions about VOXL, Flight Core, ESCs and ModalAI drones are answered here by the engineers who build them.

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          ModalAI
          Categories Recent Tags ModalAI.com Docs
          © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups