ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Remote buttons on Vision-hub or MAVlink-server

    Modal Pipe Architecture (MPA)
    2
    5
    277
    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.
    • Caio Licínio Vasconcelos PantarottoC
      Caio Licínio Vasconcelos Pantarotto
      last edited by

      I want to get information from the remote controller for the state of each channel (the idea is to trigger some functionalities when a certain button is pressed) I managed to get some data from the MPA "mavlink_to_gcs".. But I believe this is probably low frequency.. I wonder if vision-hub outputs this kind of data or do I have to connect directly to mavlink-server? (the documentation says to avoid connecting to mavlink-server directly) Maybe via "mavlink_onboard" or "mavlink_sys_status"

      Thank You

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @Caio Licínio Vasconcelos Pantarotto
        last edited by

        @Caio-Licínio-Vasconcelos-Pantarotto What kind of remote controller are you using? What platform are you on (e.g. Which drone or development board)? What software release are you using on that platform?

        Caio Licínio Vasconcelos PantarottoC 1 Reply Last reply Reply Quote 0
        • Caio Licínio Vasconcelos PantarottoC
          Caio Licínio Vasconcelos Pantarotto @Eric Katzfey
          last edited by

          @Eric-Katzfey Hi I have an out of the box Starling.. voxl2(up-to-date), ELRS 915MHz. I was currently trying to subscribe to "mavlink_onboard".. following the Portal Header source code I managed to get

          if (msg->msgid == MAVLINK_MSG_ID_HEARTBEAT){
          bool armed = (mavlink_msg_heartbeat_get_base_mode(msg) & MAV_MODE_FLAG_SAFETY_ARMED);
          uint8_t main_mode = (mavlink_msg_heartbeat_get_custom_mode(msg) & 0x00FF0000) >> 16;
          uint32_t sub_mode = (mavlink_msg_heartbeat_get_custom_mode(msg) & 0xFF000000) >> 24;

          sub_mode its always 0.. I don't know what sub_mode is supposed to be.. but I would like for example to when I press the right button I wanna trigger something like snapshot. I also wonder if the best way to do this is to use the send-command hires snapshot or maybe get the camera feed directly. I want to make a client pipe that will receive the photo and some other info from other pipes, like vio, and tof.. it would be great to find a way where when I press the button all this info is captured and saved on disk.. and would be good that all of this happens at same time (or the closest as possible). Thank You for the reply.

          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
          • Eric KatzfeyE
            Eric Katzfey ModalAI Team @Caio Licínio Vasconcelos Pantarotto
            last edited by

            @Caio-Licínio-Vasconcelos-Pantarotto You need to look for MAVLINK_MSG_ID_RC_CHANNELS. That contains the raw channel values for all of the RC channels (including the switches, buttons, etc.)

            Caio Licínio Vasconcelos PantarottoC 1 Reply Last reply Reply Quote 1
            • Caio Licínio Vasconcelos PantarottoC
              Caio Licínio Vasconcelos Pantarotto @Eric Katzfey
              last edited by

              @Eric-Katzfey Thank You! it worked great.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors