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 [2013-03-20 10:14] 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. | ||
| Line 9: | Line 12: | ||
| {{: | {{: | ||
| + | ===== Firmware usage ===== | ||
| + | A couple of macros are declared in //log.h// to define new log variables. All log variables should be in a log group. Example: | ||
| + | |||
| + | <code style=" | ||
| + | LOG_GROUP_START(stabilizer) | ||
| + | LOG_ADD(LOG_FLOAT, | ||
| + | LOG_ADD(LOG_FLOAT, | ||
| + | LOG_ADD(LOG_FLOAT, | ||
| + | LOG_GROUP_STOP(stabilizer) | ||
| + | </ | ||
| + | |||
| + | ^ Macro ^ Usage ^ | ||
| + | | LOG_GROUP_START(grp_name) | ||
| + | | LOG_GROUP_STOP(grp_name) | ||
| + | | LOG_ADD(type, | ||
| + | |||
| + | ^ Type defines ^ Corresponding C99 type ^ Note ^ | ||
| + | | LOG_UINT8 | ||
| + | | LOG_UINT16 | ||
| + | | LOG_UINT32 | ||
| + | | LOG_INT8 | ||
| + | | LOG_INT16 | ||
| + | | LOG_INT32 | ||
| + | | LOG_FLOAT | ||
| + | | LOG_FP16 | ||