Description

The RotationInfoStream command is used to enable or disable the streaming of real-time rotation information. If Neblina is attached to a wheel, the rotation information will include real-time cadence (revolutions per minute) as well as the total number of rotations.

Protocol

This command uses the Command-Ack-Response-Data protocol.

Command

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x41 ( 0b010 / 0b00001 )
1 Payload Length uint8_t 2
2 CRC uint8_t Calculated
3 Command uint8_t 0x12

Payload

Byte Name C Type Value
4 State uint8_t 0x00 (Disable) or 0x01 (Enable)
5 Algorithm uint8_t See Below

The following table shows the list of rotation algorithm:

Identifier Algorithm
0x00 Magnetometer
0x01 Gyroscope
0x02 Two Edge Wheel
0x03 Three Edge Wheel

Response

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x01 ( 0b000 / 0b00001 )
1 Payload Length uint8_t 4
2 CRC uint8_t Calculated
3 Command uint8_t 0x12

Payload

Byte Name C Type Value
4 - 5 Downsample uint16_t Varies
6 - 7 Rate uint16_t Varies

Data

Header

Byte Name C Type Value
0 Control Byte ( Packet Type (7:5) / SubSystem (4:0) ) uint8_t 0x61 ( 0b011 / 0b00001 )
1 Payload Length uint8_t 10
2 CRC uint8_t Calculated
3 Command uint8_t 0x12

Payload

Byte Name C Type Value
4 - 7 Timestamp uint32_t Varies
8 - 11 Rotation Count uint16_t Varies
12 - 13 Revolutions per Minute uint16_t Varies