User Tools

Site Tools


projects:crazyflie:firmware:log

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyflie:firmware:log [2012-10-07 14:18]
arnaud
projects:crazyflie:firmware:log [2012-10-08 07:05]
arnaud [Log control]
Line 5: Line 5:
 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: 
 + 
 +{{:projects:crazyflie:firmware:logmagic.png?800|}}
  
 ===== Communication protocol ===== ===== Communication protocol =====
Line 12: Line 14:
  
 ^ **Port**  ^ **Channel** ^ **Function**      ^ ^ **Port**  ^ **Channel** ^ **Function**      ^
-|            0        | [[comm_protocol#table_of_content_access|Table of content access]] +|            0        | Table of content access | 
-|            1        | [[comm_protocol#log_settings_access| Log settings access]] +|            1        | Log control 
-|            2        | [[comm_protocol#log_data_access|Log data access]] |+|            2        | Log data |
  
 ==== Table of content access ==== ==== Table of content access ====
Line 38: Line 40:
  
 Answer (Copter to PC): Answer (Copter to PC):
 +        +--------------+----+
 +        | GET_ITEM (0) | ID |                                        If index out of range
         +--------------+----+------+------------+--------------+         +--------------+----+------+------------+--------------+
-        | GET_ITEM (0) | ID | Type |   Group    |     Name     |+        | GET_ITEM (0) | ID | Type |   Group    |     Name         If returning Item
         +--------------+----+------+------------+--------------+         +--------------+----+------+------------+--------------+
 Length        1          1        < Null terminated strings > Length        1          1        < Null terminated strings >
Line 53: Line 57:
 | Group          | Null-terminated string containing variable group | | Group          | Null-terminated string containing variable group |
 | Name           | Null-terminated string containing the variable name | | Name           | Null-terminated string containing the variable name |
 +
 +Type, group and name are not sent if the required ID is higher than TOC_LEN-1.
  
 === Get Info === === Get Info ===
Line 81: Line 87:
 | LOG_MAX_PACKET | Maximum number of log packets that can be programmed in the copter | | LOG_MAX_PACKET | Maximum number of log packets that can be programmed in the copter |
 | LOG_MAX_OPS    | Maximum number of operation programmable in the copter. An operation is one log variable retrieval programming | | LOG_MAX_OPS    | Maximum number of operation programmable in the copter. An operation is one log variable retrieval programming |
 +
 +==== Log control ====
 +
 +The log control channel permits to setup, activate, deactivate and remove log packets. Like the TOC access channel the first data byte represents a command.
 +
 +^ Control command byte ^ Command       ^ Operation ^
 +|                    0 | CREATE_BLOCK  | Create a new log block |
 +|                    1 | APPEND_BLOCK  | Append variables to an existing block |
 +|                    2 | DELETE_BLOCK  | Delete log block |
 +|                    3 | START_BLOCK   | Enable log block transmition |
 +|                    4 | STOP_BLOCK    | Disable log block transmition |
  
  
projects/crazyflie/firmware/log.txt · Last modified: 2021-06-24 16:49 by kimberly