User Tools

Site Tools


projects:crazyflie:firmware:comm_protocol

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:comm_protocol [2013-09-17 10:39]
ledvinap [Logging]
projects:crazyflie:firmware:comm_protocol [2014-05-09 04:21]
fred [Logging] fixed tiny but significant typo in hex string that cost me an hour of debugging
Line 200: Line 200:
 | Start a log block                          | 0x03 (CONTROL_START_BLOCK) to identify the command for enabling logging data from an existing block  | | Start a log block                          | 0x03 (CONTROL_START_BLOCK) to identify the command for enabling logging data from an existing block  |
 |        :::                        |          | Block ID | |        :::                        |          | Block ID |
-|        :::                        |          | Period in 10th of ms |+|        :::                        |          | Period in 10ms increments |
 |  Stop a log block                          | 0x04 (CONTROL_STOP_BLOCK) to identify the command for disabling logging data from an existing block  | |  Stop a log block                          | 0x04 (CONTROL_STOP_BLOCK) to identify the command for disabling logging data from an existing block  |
 |        :::                        |          | Block ID | |        :::                        |          | Block ID |
Line 305: Line 305:
 === Log data access (Port 5 channel 2) === === Log data access (Port 5 channel 2) ===
 Logging data is sent back to the copter as raw data with only the block id. This means that the lookup of what data is for what variable has to be done on the computer side. Log  Logging data is sent back to the copter as raw data with only the block id. This means that the lookup of what data is for what variable has to be done on the computer side. Log 
-block header contains 3 byte timestamp, its value is number of milliseconds from Crazyflie system start (it will wrap around in about 5 hours). All values are sent in little endian format.+block header contains 3 byte timestamp, its value is number of microseconds from Crazyflie system start (it will wrap around in about 16 seconds. Is is also currently based on xTaskGetTickCount, so resolution is only 1ms). All values are sent in little endian format.
  
 ^  **Byte**  ^  **Description**  ^ ^  **Byte**  ^  **Description**  ^
 |          | Block ID | |          | Block ID |
-|    1-3     | Block send time timestamp in ms, LSB first  |+|    1-3     | Block send time timestamp in us, LSB first  |
 |    4-31    | Logged variable values, LSB first  | |    4-31    | Logged variable values, LSB first  |
  
Line 316: Line 316:
 Computer -> CF : 0x[5,1] 0x00 0xbb 0x02 0x55       // create logging block Computer -> CF : 0x[5,1] 0x00 0xbb 0x02 0x55       // create logging block
 CF -> Computer : 0x[5,1] 0x00 0x55 0x00            // OK CF -> Computer : 0x[5,1] 0x00 0x55 0x00            // OK
-Computer -> CF : 0x[5,1] 0x00 0xbb 0x0A            // start sending block with 100ms interval +Computer -> CF : 0x[5,1] 0x03 0xbb 0x0A            // start sending block with 100ms interval 
-CF -> Computer : 0x[5,1] 0x00 0x55 0x00            // OK+CF -> Computer : 0x[5,1] 0x03 0x55 0x00            // OK
  
 Receiving a log block 0xbb with timestamp 130.532s (0x1FDE4 ms), logging uint16 variable with value 0xBABE: Receiving a log block 0xbb with timestamp 130.532s (0x1FDE4 ms), logging uint16 variable with value 0xBABE:
-CF -> Computer : 0x[5,2] 0xBB 0xE4 0xDF 0x01 0xBE 0xBA+CF -> Computer : 0x[5,2] 0xBB 0xE4 0xFD 0x01 0xBE 0xBA
 </code> </code>
 ==== Parameters ==== ==== Parameters ====
projects/crazyflie/firmware/comm_protocol.txt · Last modified: 2021-06-24 16:49 by kimberly