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

    Remote buttons on Vision-hub or MAVlink-server

    Modal Pipe Architecture (MPA)
    2
    5
    304
    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.
    • C
      Caio Licínio Vasconcelos Pantarotto
      last edited by 4 Oct 2023, 11:10

      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

      E 1 Reply Last reply 4 Oct 2023, 15:39 Reply Quote 0
      • E
        Eric Katzfey ModalAI Team @Caio Licínio Vasconcelos Pantarotto
        last edited by 4 Oct 2023, 15:39

        @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?

        C 1 Reply Last reply 4 Oct 2023, 16:37 Reply Quote 0
        • C
          Caio Licínio Vasconcelos Pantarotto @Eric Katzfey
          last edited by 4 Oct 2023, 16:37

          @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.

          E 1 Reply Last reply 5 Oct 2023, 15:39 Reply Quote 0
          • E
            Eric Katzfey ModalAI Team @Caio Licínio Vasconcelos Pantarotto
            last edited by 5 Oct 2023, 15:39

            @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.)

            C 1 Reply Last reply 9 Oct 2023, 12:02 Reply Quote 1
            • C
              Caio Licínio Vasconcelos Pantarotto @Eric Katzfey
              last edited by 9 Oct 2023, 12:02

              @Eric-Katzfey Thank You! it worked great.

              1 Reply Last reply Reply Quote 0
              1 out of 5
              • First post
                1/5
                Last post
              Powered by NodeBB | Contributors