This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:crazyflie:firmware:log [2012-10-07 13:56] arnaud |
projects:crazyflie:firmware:log [2021-06-24 16:49] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and will be archived. Please go to [[https:// | ||
+ | </ | ||
====== Crazyflie LOG subsystem ====== | ====== Crazyflie LOG subsystem ====== | ||
- | The purpose of the logging is to be able to log variables that are available in the copter during runtime. The Crazyflie log system is design in such a way that the copter firmware is mostly | + | The purpose of the logging is to be able to log variables that are available in the copter during runtime. The Crazyflie log system is design in such a way that the copter firmware is mostly |
This mechanism is used both for regular log operation (ie. user requested log to inspect and debug flight data) but also to update indication in the GUI application. | This mechanism is used both for regular log operation (ie. user requested log to inspect and debug flight data) but also to update indication in the GUI application. | ||
- | Each variable to log is contained in a | + | Each variable to log is contained in a group group and has a name. The system is designed to make it easy to add a log variable in the Firmware and have it available in the ground station GUI: |
- | ===== Communication protocol ===== | + | {{: |
- | The log port is separated in 3 channels: | + | ===== Firmware usage ===== |
- | ^ **Port** | + | A couple |
- | | | + | |
- | | | + | |
- | | | + | |
- | ==== Table of content access ==== | + | < |
- | + | LOG_GROUP_START(stabilizer) | |
- | This channel is used to access the loggable variables table of content. | + | LOG_ADD(LOG_FLOAT, |
- | + | LOG_ADD(LOG_FLOAT, pitch, & | |
- | The first byte of each messages correspond a command. All communication on this port are initated by the client and all answer from the copter will contain the same command byte. | + | LOG_ADD(LOG_FLOAT, yaw, & |
- | + | LOG_GROUP_STOP(stabilizer) | |
- | ^ TOC command byte ^ Meaning | + | |
- | | 0 | Get TOC Element | + | |
- | | 1 | Get TOC information | | + | |
- | + | ||
- | === Get TOC element === | + | |
- | + | ||
- | < | + | |
- | Request | + | |
- | | + | |
- | | Command | + | |
- | | + | |
- | Length | + | |
- | + | ||
- | Answer | + | |
- | | + | |
- | | Command | + | |
- | +-------------+------------+------+------------+--------------+ | + | |
- | Length | + | |
</ | </ | ||
- | ^ Request fields ^ Content | ||
- | | Command | ||
- | | Element ID | ID of the element to be retrieved. The variables are numbered from 0 to LOG_LEN (see GET_INFO command) | | ||
- | ^ Answer fields | + | ^ Macro |
- | | Command | + | | LOG_GROUP_START(grp_name) |
- | | Element ID | ID of the element returned | + | | LOG_GROUP_STOP(grp_name) |
- | | Type | Variable | + | | LOG_ADD(type, |
- | | Group | Null-terminated string containing variable group | | + | |
- | | Name | Null-terminated string containing | + | |
+ | ^ Type defines ^ Corresponding C99 type ^ Note ^ | ||
+ | | LOG_UINT8 | ||
+ | | LOG_UINT16 | ||
+ | | LOG_UINT32 | ||
+ | | LOG_INT8 | ||
+ | | LOG_INT16 | ||
+ | | LOG_INT32 | ||
+ | | LOG_FLOAT | ||
+ | | LOG_FP16 |