Hello
I'm a newbie and would like to make a small change in the standard C-code so I can make an new parameter that could let the drone fly to an altitude that can be set and let it hover at this altitude
Greetings!
Crazyflie 2.0 Stable Drone At Set Altitude
Re: Crazyflie 2.0 Stable Drone At Set Altitude
Hi chill380, welcome to the forum!chill380 wrote:Hello
I'm a newbie and would like to make a small change in the standard C-code so I can make an new parameter that could let the drone fly to an altitude that can be set and let it hover at this altitude
Greetings!
You can clone the firmware repository and make whatever changes you'd like. Then you can flash the firmware and see how it works. If you poke around in the wiki, you'll find info on how to build and flash firmware.
Also, you might want to know about the altitude hold feature. You could conceivably piggy back on that to make what you want happen since code is already there both in the firmware and the GUI client for that feature.
If you haven't done so yet, you might want to use the GUI client to log out the barometer data and possible plot it as well ("Log blocks" and "Plotter" tabs respectively) so you can see what kind of data you're dealing with.
To help set expectations, I'll mention that the barometer is not super-precise and fluctuations in temperature and pressure can have a sizable effect on the sensor data. Don't get your hopes up that you'l be able to get it to rise to exactly 5 feet high and stay there until the battery runs out - that level of precision just won't happen with the available hardware.
Of course, don't let this discourage you from trying an implementation. You might find a great way to accomplish what you want, and when you do, you can always submit a pull request in Github to get your code put into the firmware for everyone!
Good luck!!
BTW, I moved this post into Crazyflie->Developer discussions sub-forum where it is more appropriate and removed the one from the Quadcopters forum where it is less appropriate and a duplicate. Regards!
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.