LEGO / lego-ble-wireless-protocol-docs

This repository contains information about LEGO Hubs (name, battery level, etc.) and to interact with any sensors and motors connected to it.
https://lego.github.io/lego-ble-wireless-protocol-docs
MIT License
340 stars 43 forks source link

3.32.1. Port Output Command Feedback Format - unknown feedback - 0x0A #16

Open marcrupprath opened 4 years ago

marcrupprath commented 4 years ago

I got a little lost: I send a normal drive command : 0x08,0x00,0x81,0x00,0x11,0x51,0x00,0x25} and got : 05-00-82-00-0A

What does response code "0A" mean, could not find in documentation

Thanks

Marc

teolag commented 4 years ago

This one bugged me for a while as well until I realised the value is coded as BIT-fields https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#port-output-command-feedback-format

The hex value 0A is in decimal form 10. In binary format 10 is equal to 1010. 1010 is one 8 and one 2

2 = Buffer Empty + Command Completed 8 = Idle

Therefor, 0A is the same as: Buffer Empty + Command completed + Idle