A library which you could include into your c++ project and run the functions in here to code yourself a program for the crazyflie. A c++ version of crazyflie-lib-python
sudo apt install -y libusb-1.0-0-dev
git clone https://github.com/M-R-VulcaN/crazyflie-link-cpp-expanded.git
cd crazyflie-link-cpp-expanded
First you must build:
mkdir build
cd build
cmake ..
make
Before you can run an example:
./example_<example_name>
src
- source files for crazyflie lib classes and functions
examples
- example files
include/crazflieLinkCpp
- contains all header files for crazyflie lib
- Install vscode
code <path_to_repo_directory>
- Install
c/c++
add-on - Install
CMakeLists
add-on - Click
Allow
intelisense for c/c++ - Click
Allow
intelisense for CMakeLists and selectunspecified
compiler
-
src
- source files for crazyflie lib classes and functions -
examples
- example files which you can run -
include
- contains all header files for crazyflie lib
-
parameter TOC structure
Note: The difference between V2 and V1 is the use of 2 bytes instead of 1 to represent the ID of the param, increasing the potential size of the TOC by 256 times.
You can view the uml using this link
Set Param Value:
Send:
Byte # | 2 | sizeof(<param type>) |
Value: | <param id> | <param value> |
Description: | Param ID | The value of the param |
Receive:
Byte # | 2 | sizeof(<param type>) |
Value: | <param id> | <new param value> |
Description: | Param ID | The new value of the param |
Read Param Value:
Send:
Byte # | 2 |
Value: | <param id> |
Description: | Param ID |
Receive:
Byte # | 2 | sizeof(<param type>) |
Value: | <param id> | <param value> |
Description: | Param ID | The value of the param |
Get Toc Item V2:
Send:
Byte # | 1 | 2 |
Value: | 2 | <param id> |
Description: | Command Number | Param ID |
Receive:
Byte # | 1 | 2 | 1 | strlen | strlen |
Value: | 2 | <param id> | <type code> | <group name string> | <param name string> |
Description: | Command # | Param ID | Param Type | Group Name | Param Name |
Get Toc Info V2:
Send:
Byte # | 1 |
Value: | 3 |
Description: | Command Number |
Receive:
Byte # | 1 | 2 | 4 |
Value: | 3 | <size> | <crc> |
Description: | Command # | Number of elements in the Toc | Current Cyclic Redundancy Check value |