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

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. PX4 mavlink flight modes

PX4 mavlink flight modes

Scheduled Pinned Locked Moved Ask your questions right here!
2 Posts 2 Posters 714 Views
  • 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.
  • R Offline
    R Offline
    relevinsky
    Contributor
    wrote on last edited by
    #1

    Hi,

    I have two questions:

    1. Could you help to point me to mavlink px4 dialect c files, specifically I'm looking for Enum of copter flight modes like in Arducopter (like in ardupilotmega mavlink cfiles)?

    2. c mavlink function/command that set px4 to offboard flight mode.

    Thanks.

    1 Reply Last reply
    0
    • Cliff WongC Offline
      Cliff WongC Offline
      Cliff Wong
      ModalAI Team
      wrote on last edited by
      #2

      Mavlink messages for setting flight mode use the MAVLINK_MSG_ID_SET_MODE message type (same as APM).

      Modes are defined in the uOrb layer under the vehicle_status.msg fie, which C headers are auto-generated at build time. The auto-generated file is under the build directory as vehicle_status.h via the NAVIGATION_STATE_* variables.

      And example of using modes in runtime code are in the mavlink_messages.cpp file
      (search for vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION) and modes are processed in the Commander.cpp file. Both files under the src/modules directory of PX4.

      1 Reply Last reply
      0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      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