Altitude hold in Python API

Firmware/software/electronics/mechanics
Post Reply
moejoe
Beginner
Posts: 2
Joined: Sat Feb 14, 2015 12:49 am

Altitude hold in Python API

Post by moejoe »

Hi all,

thanks for building all this amazing stuff.

My question: With my crazyflie 2.0 - is there a way to invoke altitude hold mode through the Python API?

Thanks!
moejoe
Beginner
Posts: 2
Joined: Sat Feb 14, 2015 12:49 am

Re: Altitude hold in Python API

Post by moejoe »

Okay, I got an idea now. It seems to be

Code: Select all

crazyflie.param.set_value('flightmode.althold', true);
Going to try that now.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Altitude hold in Python API

Post by arnaud »

Hi,

Yes this is how you enable altitude hold, once enabled the thrust sent to the copter is interpreted as vertical rate where 32767 is 0. See https://github.com/bitcraze/crazyflie-c ... ut.py#L275 for scaling implementation in the joystick driver.
Post Reply