Hi,everybody here,

      There is a question about python code.When the python code is executed by the cpu of the APM,how will the cpu allocate the computation resource?Will the APM lock in the python code?Especially there is a "while loop" ,will the APM be blocking?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Can you please tell me on which multi-copter model you are running all these python scripts? because I got control over APM2.5 with python but the problem is i'm not able to experiments on my 450 and 550 models.

  • Developer

    Zheng,

         There's actually no way to run python code on the APM or Pixhawk (as far as I know).  The APM just doesn't have the cpu resources required, the Pixhawk probably does but I've never seen it done and there's no python installed on it.  Perhaps in a future linux-based version of the autopilot it will be possible.

    • Randy,

      Thanks for your reply.We can upload a python file from mission planner.

      3702484521?profile=original

      https://storage.ning.com/topology/rest/1.0/file/get/3702484521?profile=original
      • Developer

        Zheng,

             That's actually running a script on the mission planner, not on the flight controller.

        • Randy,

                   Thank you so much.I got it!

This reply was deleted.

Activity