This shows you the differences between two versions of the page.
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 | | Start a log block | ||
| ::: | | | ::: | | ||
- | | ::: | | + | | ::: | |
| Stop a log block | | Stop a log block | ||
| ::: | | | ::: | | ||
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 | + | block header contains 3 byte timestamp, its value is number of microseconds |
^ **Byte** | ^ **Byte** | ||
| | | | ||
- | | 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, | + | Computer -> CF : 0x[5, |
- | CF -> Computer : 0x[5, | + | CF -> Computer : 0x[5, |
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 |
</ | </ | ||
==== Parameters ==== | ==== Parameters ==== |